/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #2D4CCC 0%, #1E3A8A 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

/* Container */
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    padding: 50px;
    max-width: 650px;
    width: 100%;
}

/* Header */
.header {
    margin-bottom: 30px;
}

.header .logo {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.header .logo svg {
    height: 48px;
    width: auto;
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    text-align: center;
}

.header .greeting {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.header p {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 14px;
    text-align: left;
}

.header p:last-of-type {
    margin-bottom: 0;
}

.header .questions {
    background: #F8F9FF;
    border-left: 4px solid #2D4CCC;
    border-radius: 8px;
    color: #2D4CCC;
    font-weight: bold;
    padding: 20px 20px 20px 24px;
    margin: 18px 0 18px 0;
    list-style: none;
}

.header .questions li {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.header .questions li:last-child {
    margin-bottom: 0;
}

.header .questions li:before {
    content: "•";
    color: #2D4CCC;
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Recording Section */
.recording-section {
    text-align: center;
    margin-bottom: 30px;
}

.recording-controls {
    margin: 40px 0;
}

.recording-status {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}

.recording-status:empty {
    display: none;
    margin-bottom: 0;
}

.recording-status.recording {
    color: #EF4444;
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.recording-time {
    font-size: 48px;
    font-weight: 300;
    color: #2D4CCC;
    margin-bottom: 40px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.recording-time:empty {
    display: none;
    margin-bottom: 0;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #FFD700;
    color: #1a1a1a;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: #FFC700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-danger {
    background: #EF4444;
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: #2D4CCC;
    color: white;
    box-shadow: 0 4px 14px rgba(45, 76, 204, 0.3);
}

.btn-success:hover:not(:disabled) {
    background: #1E3A8A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 76, 204, 0.4);
}

.btn-large {
    padding: 18px 48px;
    font-size: 18px;
}

/* Playback Section */
.playback-section {
    margin-top: 40px;
    padding: 30px;
    background: #F3F4F6;
    border-radius: 16px;
    border: 2px solid #E5E7EB;
}

.playback-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.playback-section audio {
    width: 100%;
    margin-bottom: 25px;
    border-radius: 50px;
}

/* Error Message */
.error-message {
    background: #FEE2E2;
    border: 2px solid #FCA5A5;
    color: #991B1B;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: none;
    font-weight: 500;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Success/Error Pages */
.message-container {
    text-align: center;
}

.message-container .logo {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.message-container .logo svg {
    height: 48px;
    width: auto;
}

.message-container .icon {
    font-size: 80px;
    margin-bottom: 30px;
    color: #2D4CCC;
}

.message-container h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.message-container p {
    font-size: 18px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 35px 25px;
    }

    .header h1 {
        font-size: 26px;
    }

    .header .greeting {
        font-size: 18px;
    }

    .recording-time {
        font-size: 40px;
    }

    .btn {
        padding: 12px 28px;
        font-size: 14px;
    }

    .btn-large {
        padding: 16px 36px;
        font-size: 16px;
    }

    .message-container h1 {
        font-size: 28px;
    }
}
