* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.form-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.form-card h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-record {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    min-width: 150px;
}

.btn-record:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
}

.btn-record.recording {
    background: linear-gradient(135deg, #c0392b 0%, #962d22 100%);
    animation: pulse-record 1s infinite;
}

@keyframes pulse-record {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(231, 76, 60, 0); }
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 14px;
}

.progress-indicator {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step.active {
    background: white;
    color: #667eea;
    transform: scale(1.1);
}

.step.completed {
    background: #28a745;
    color: white;
}

.timer-box {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.timer-label {
    color: #666;
    font-weight: 500;
}

.timer {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.timer.warning {
    color: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.question-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.question-text {
    color: white;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
}

.recording-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.instruction-text {
    color: #333;
    font-size: 16px;
    line-height: 1.8;
    text-align: center;
}

.recording-box {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 25px;
}

.recording-status {
    margin-bottom: 15px;
}

.status-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.status-text {
    font-size: 18px;
    color: #666;
}

.recording-icon {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.recording-timer {
    font-size: 32px;
    font-weight: bold;
    color: #dc3545;
    margin: 15px 0;
}

.max-time {
    color: #999;
    font-size: 20px;
}

.audio-visualizer {
    display: flex;
    justify-content: center;
    gap: 5px;
    height: 40px;
    align-items: flex-end;
}

.bar {
    width: 8px;
    background: #667eea;
    border-radius: 4px;
    animation: wave 0.5s ease-in-out infinite;
}

.bar:nth-child(1) { animation-delay: 0s; height: 20px; }
.bar:nth-child(2) { animation-delay: 0.1s; height: 30px; }
.bar:nth-child(3) { animation-delay: 0.2s; height: 25px; }
.bar:nth-child(4) { animation-delay: 0.3s; height: 35px; }
.bar:nth-child(5) { animation-delay: 0.4s; height: 20px; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.button-group .btn {
    width: auto;
    min-width: 150px;
}

.btn.recording {
    background: #dc3545;
}

.success-card {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.success-message {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

.admin-login-card {
    max-width: 400px;
    margin: 0 auto;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message-inline {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

.admin-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    color: #333;
    font-size: 24px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.settings-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.settings-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.data-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.data-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.answer-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.has-audio {
    color: #28a745;
    font-weight: 500;
}

.no-audio {
    color: #999;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 40px;
}

@media (max-width: 768px) {
    .form-card {
        padding: 25px;
    }
    
    .form-card h1 {
        font-size: 24px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px;
        font-size: 14px;
    }
}
