/* 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;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* Header Section */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.9;
}

.header-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.preview-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.feature-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.main-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.feature-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.feature-dot.green { background: #10b981; }
.feature-dot.blue { background: #3b82f6; }
.feature-dot.purple { background: #8b5cf6; }

/* Main Content Section */
.main-content {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    min-height: 50vh;
}

.content-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    position: relative;
    top: -50px;
}

.card-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
    text-align: center;
}

.status-message {
    text-align: center;
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Audio Input Section */
.audio-section {
    margin-bottom: 30px;
}

.input-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.input-method h3 {
    font-size: 1.3rem;
    color: #374151;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

.upload-content i {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 15px;
}

.upload-content p {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 8px;
}

.upload-content small {
    color: #6b7280;
}

/* Recording Controls */
.recording-controls {
    text-align: center;
}

.record-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto 20px;
}

.record-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.record-btn.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.timer {
    font-size: 2rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
}

.recording-status {
    color: #6b7280;
    font-size: 1rem;
}

/* Processing Section */
.progress-container {
    text-align: center;
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #374151;
    font-weight: 500;
}

/* Results Section */
.slides-preview {
    margin-bottom: 30px;
}

.slides-preview h3 {
    font-size: 1.8rem;
    color: #374151;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slides-container {
    display: grid;
    gap: 150px;
}

/* Professional Full-Width Slide Design */
.slide-preview {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    aspect-ratio: 16 / 10;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.slide-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Slide Backgrounds Based on Type */
.slide-preview[data-slide="1"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.slide-preview[data-slide="2"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.slide-preview[data-slide="3"] {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.slide-preview[data-slide="4"] {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #1a202c;
}

.slide-preview[data-slide="5"] {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #1a202c;
}

.slide-header {
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.slide-number {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.slide-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.slide-visual-icon {
    position: absolute;
    bottom: 30px;
    right: 40px;
    font-size: 120px;
    opacity: 0.15;
    pointer-events: none;
}

.slide-content {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.slide-content li {
    padding: 12px 0;
    font-size: 1.3rem;
    line-height: 1.5;
    position: relative;
    padding-left: 40px;
    margin-bottom: 15px;
    font-weight: 500;
}

.slide-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slide-preview[data-slide="4"] .slide-content li::before,
.slide-preview[data-slide="5"] .slide-content li::before {
    background: rgba(0, 0, 0, 0.1);
}

.speaker-notes {
    position: absolute;
    bottom: -120px;
    left: 0;
    right: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.speaker-notes h4 {
    color: #475569;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speaker-notes p {
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Transcript Section Styling */
.transcript-section {
    margin-bottom: 30px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid #bae6fd;
}

.transcript-section h3 {
    font-size: 1.5rem;
    color: #0c4a6e;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.transcript-display {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e0f2fe;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.1);
}

.transcript-content p:first-child {
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 12px;
}

.transcript-content p:nth-child(2) {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
    font-style: italic;
    color: #475569;
    margin: 10px 0;
    line-height: 1.6;
}

.transcript-content small {
    color: #64748b;
    font-size: 0.9rem;
}

/* Export Options */
.export-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.export-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.export-btn.secondary {
    background: #6b7280;
    cursor: not-allowed;
}

.export-btn.secondary:hover {
    transform: none;
    box-shadow: none;
}

/* Test Button */
.test-btn {
    background: #1f2937;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px auto 0;
    font-size: 1.1rem;
}

.test-btn:hover {
    background: #374151;
    transform: translateY(-2px);
}

/* Help Icon */
.help-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #1f2937;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.help-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

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

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

.modal-content h3 {
    color: #374151;
    margin-bottom: 10px;
}

.modal-content p {
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .input-methods {
        grid-template-columns: 1fr;
    }
    
    .features {
        flex-direction: column;
        gap: 15px;
    }
    
    .content-card {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .export-options {
        flex-direction: column;
    }
    
    .export-btn {
        width: 100%;
        justify-content: center;
    }
    
    .slide-preview {
        margin: 0 -10px;
        aspect-ratio: 16 / 12;
    }
    
    .slide-header {
        padding: 25px;
    }
    
    .slide-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .slide-content li {
        font-size: 1.1rem;
        margin-bottom: 10px;
        padding-left: 35px;
    }
    
    .slide-content li::before {
        width: 16px;
        height: 16px;
    }
    
    .slide-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        right: 15px;
        top: 15px;
    }
    
    .slide-visual-icon {
        font-size: 80px;
        bottom: 20px;
        right: 25px;
    }
    
    .slides-container {
        gap: 120px;
    }
    
    .transcript-section, .slides-preview {
        margin: 0 -10px 25px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .feature-icons {
        gap: 15px;
    }
    
    .icon-circle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .slide-title {
        font-size: 1.5rem !important;
    }
    
    .slide-content li {
        font-size: 1rem !important;
        padding-left: 30px !important;
    }
    
    .slide-visual-icon {
        font-size: 60px !important;
        bottom: 15px !important;
        right: 20px !important;
    }
    
    .slides-container {
        gap: 100px !important;
    }
}

