/* Modern Podcast Transcription App Styles */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main {
    flex: 1;
}

/* ============================================
   Navigation Bar
============================================ */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: none;
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.nav-link:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.nav-link.active {
    border-bottom: 2px solid white;
    padding-bottom: 0.25rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.7rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f1f3f5;
    transform: translateX(4px);
}

/* ============================================
   Hero Section
============================================ */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="15" fill="rgba(255,255,255,0.03)"/><circle cx="80" cy="80" r="20" fill="rgba(255,255,255,0.03)"/><circle cx="70" cy="20" r="10" fill="rgba(255,255,255,0.02)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.95;
    font-weight: 400;
}

/* ============================================
   Brain Cards
============================================ */
.brain-card {
    background: white;
    border: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.brain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brain-color, #007bff);
    transition: all 0.3s ease;
}

.brain-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.brain-card-body {
    padding: 1.5rem;
}

.brain-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.brain-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.5;
    min-height: 2.1rem;
}

.brain-select-btn {
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.brain-select-btn:hover {
    transform: translateY(-2px);
}

/* ============================================
   Welcome Cards
============================================ */
.welcome-card {
    background: white;
    border: none;
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.welcome-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.welcome-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.welcome-card h5 {
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.75rem;
}

.welcome-card p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================================
   Create Brain Form
============================================ */
.create-brain-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
    border: 2px solid #667eea;
    border-radius: 0.75rem;
    padding: 2rem;
}

.create-brain-card h5 {
    color: #667eea;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* ============================================
   Upload Form
============================================ */
.upload-card {
    background: white;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.upload-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.brain-badge {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.upload-card-body {
    padding: 2rem;
}

/* ============================================
   Buttons
============================================ */
.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    transition: all 0.2s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8d 100%);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-outline-primary {
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline-primary:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* ============================================
   Progress Bar
============================================ */
.progress {
    background-color: #e9ecef;
    border-radius: 0.5rem;
    height: 28px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 28px;
}

/* ============================================
   Alert Messages
============================================ */
.alert {
    border: none;
    border-radius: 0.5rem;
    animation: slideIn 0.3s ease-out;
}

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

.alert-info {
    background-color: #cfe2ff;
    border-color: #b6d4fe;
    color: #084298;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

/* ============================================
   Footer
============================================ */
footer {
    background: white;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

/* ============================================
   Episode Cards
============================================ */
.episode-card {
    background: white;
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.episode-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.episode-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
}

.episode-card .card-title {
    margin: 0;
    font-weight: 700;
}

/* ============================================
   Transcript Styling
============================================ */
.transcript-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.transcript-chunk {
    padding: 1rem;
    background-color: white;
    border-radius: 0.5rem;
    border-left: 3px solid transparent;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.transcript-chunk:hover {
    background-color: #cfe2ff;
    border-left-color: #667eea;
}

.transcript-segment {
    cursor: pointer;
    display: inline;
    line-height: 1.8;
    padding: 0.2rem 0;
    transition: all 0.15s ease;
}

.transcript-segment:hover {
    background-color: #fff3cd;
}

.transcript-segment.selected {
    background-color: #fff3cd;
    border-bottom: 2px solid #667eea;
    font-weight: 500;
}

.transcript-chunk.selected-chunk {
    background-color: #cfe2ff;
    border-left-color: #667eea;
}

.timestamp {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    color: #6c757d;
}

/* ============================================
   Modal Styling
============================================ */
.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e0e0e0;
    padding: 1.5rem;
}

/* ============================================
   Responsive Design
============================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1.5rem;
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .upload-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .brain-badge {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   Utility Classes
============================================ */
.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.transition-all {
    transition: all 0.3s ease;
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
