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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    font-weight: 300;
}

main {
    padding: 40px;
}

/* Recording Section */
.recording-section {
    text-align: center;
}

.waveform-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

#waveform {
    width: 100%;
    max-width: 800px;
    height: 200px;
    background: #fff;
    border-radius: 10px;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    padding: 15px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

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

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

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

.btn-icon {
    font-size: 1.2em;
}

.recording-status {
    margin-top: 20px;
    font-size: 1.1em;
    color: #666;
    font-weight: 500;
}

.recording-status.recording {
    color: #dc3545;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

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

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

.loading-section p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 10px;
}

.loading-text {
    font-size: 0.9em;
    color: #999;
}

/* Results Section */
.results-section {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    border-left: 5px solid #667eea;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.result-card:hover {
    transform: translateX(5px);
}

.result-card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 10px;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.result-content::-webkit-scrollbar {
    width: 8px;
}

.result-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.result-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.result-content::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

#newRecordingBtn {
    margin: 30px auto 0;
    display: block;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

.error-message {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    color: #c33;
    font-size: 1.1em;
}

#retryBtn {
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    main {
        padding: 20px;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .waveform-container {
        padding: 15px;
    }

    #waveform {
        height: 150px;
    }
}

/* Live Transcription */
.live-transcript {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.live-transcript h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.live-transcript-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.8;
    color: #444;
    font-size: 1.1em;
}

.live-transcript-content::-webkit-scrollbar {
    width: 8px;
}

.live-transcript-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.live-transcript-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

