:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    --success: #10b981;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    padding-top: 60px; /* Space for fixed nav */
}

/* Glass Navigation bar */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-content {
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link.active {
    color: var(--primary);
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    background: var(--accent);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.blob-3 {
    background: #ec4899;
    top: 40%;
    left: 30%;
    width: 300px;
    height: 300px;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, 100px) scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 80px 20px;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.brand-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.logo {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -2px;
}

.logo span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.glass {
    backdrop-filter: blur(16px);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

textarea,
input[type="url"] {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
    font-family: 'Outfit', monospace;
}

textarea:focus,
input[type="url"]:focus {
    border-color: var(--primary);
}

.example-hint {
    margin-top: 10px;
}

.example-hint details {
    cursor: pointer;
}

.example-hint summary {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px 0;
    user-select: none;
}

.example-hint pre {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    overflow-x: auto;
    font-size: 0.85rem;
    color: var(--accent);
}

.input-group textarea {
    width: 100%;
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 800;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.input-group textarea:focus,
.input-group input[type="number"]:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-group button {
    width: 100%;
    padding: 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.metadata-section {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
}

.metadata-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--accent);
}

.metadata-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metadata-item:last-child {
    border-bottom: none;
}

.metadata-item strong {
    color: var(--text-muted);
    margin-right: 10px;
}

.metadata-item span,
.metadata-item a {
    color: var(--text-main);
}

.metadata-item a {
    text-decoration: none;
    color: var(--accent);
    transition: color 0.2s;
}

.metadata-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.status-message {
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 20px;
}

.hidden {
    display: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.progress-container {
    text-align: center;
    padding: 40px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress-fill {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    animation: grow 2s infinite alternate ease-in-out;
}

@keyframes grow {
    from {
        width: 10%;
    }

    to {
        width: 90%;
    }
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1px;
}

.tab-btn {
    background: transparent;
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 0;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.tab-btn.active {
    color: white;
    border-bottom-color: var(--primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.segments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.segment-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
}

.segment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.speaker-tag {
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.full-text {
    line-height: 1.8;
    color: #e2e8f0;
    white-space: pre-wrap;
}

/* Highlights Styling */
.highlights-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.highlight-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.highlight-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
}

.highlight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.highlight-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.3;
}

.relevance-score {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.highlight-time {
    display: inline-block;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.highlight-summary {
    color: var(--text-main);
    line-height: 1.6;
    font-size: 0.95rem;
}

.significance-score {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(168, 85, 247, 0.3);
    white-space: nowrap;
}

.justification {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.justification strong {
    color: var(--accent);
    margin-right: 5px;
}

.chapter-item {
    border-left: 4px solid #a855f7;
}

.takeaway-item {
    border-left: 4px solid var(--success);
}