/* ==========================================
   Douyin Parser — Premium Dark Theme
   Tech-product landing page style
   ========================================== */

/* ---------- Foundation ---------- */
:root {
    --bg: #06080f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(129, 140, 248, 0.5);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --accent-1: #818cf8;
    --accent-2: #c084fc;
    --accent-3: #f472b6;
    --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --gradient-btn: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow-glow: 0 0 80px rgba(99, 102, 241, 0.15);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Animated Background Glows ---------- */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25), transparent 70%);
    top: 30%;
    right: -150px;
    animation-delay: -7s;
    animation-duration: 25s;
}

.bg-glow-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.2), transparent 70%);
    bottom: -100px;
    left: 30%;
    animation-delay: -14s;
    animation-duration: 30s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.grain-overlay {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: rgba(6, 8, 15, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    display: flex;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.nav-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.nav-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--gradient);
    color: white;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cookie-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
}

.cookie-indicator:hover {
    background: var(--bg-card-hover);
}

.cookie-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: var(--transition);
}

.cookie-dot.active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.cookie-dot.warning {
    background: #eab308;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.5);
}

.cookie-dot.error {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

/* ---------- Main ---------- */
.main {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 72px 0 40px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-gradient {
    background: var(--gradient-btn);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    font-weight: 400;
}

/* ---------- Input Section ---------- */
.input-section {
    margin-bottom: 32px;
}

.input-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.input-card:focus-within {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-glow);
}

.input-wrapper {
    display: flex;
    gap: 12px;
}

.url-input {
    flex: 1;
    height: 52px;
    padding: 0 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    font-family: var(--font);
    outline: none;
    transition: var(--transition);
}

.url-input::placeholder {
    color: var(--text-muted);
}

.url-input:focus {
    border-color: var(--accent-1);
    background: rgba(255, 255, 255, 0.07);
}

.parse-btn {
    height: 52px;
    padding: 0 32px;
    background: var(--gradient-btn);
    background-size: 200% 200%;
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.4s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.parse-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.parse-btn:hover {
    background-position: 100% 0;
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.parse-btn:hover::before {
    opacity: 1;
}

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

.parse-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Options ---------- */
.options-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.toggle-group {
    display: flex;
    gap: 4px;
}

.toggle-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    font-family: var(--font);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.toggle-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-1);
    color: var(--accent-1);
}

.model-select {
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
    cursor: pointer;
}

/* ---------- Status Bar ---------- */
.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
}

.status-text {
    font-size: 14px;
    color: var(--accent-1);
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Result Card ---------- */
.result-section {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(12px);
}

.result-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.cover-wrapper {
    position: relative;
    width: 200px;
    min-width: 200px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cover-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 9/16;
    object-fit: cover;
    background: var(--bg-input);
}

.cover-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 3px 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    font-size: 15px;
}

.author-id {
    color: var(--text-muted);
    font-size: 13px;
}

.result-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    font-size: 13px;
}

.meta-item svg {
    opacity: 0.6;
}

/* ---------- Stats ---------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 8px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-item:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-emoji {
    font-size: 20px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Tags ---------- */
.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 13px;
    color: var(--accent-1);
    font-weight: 500;
}

/* ---------- Content Blocks ---------- */
.content-block {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    transition: var(--transition);
}

.block-header:hover {
    background: var(--bg-card-hover);
}

.block-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.block-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent-1);
    border-color: var(--accent-1);
}

.chevron {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.block-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.block-body.expanded {
    max-height: 600px;
    padding: 0 18px 16px;
    overflow-y: auto;
}

.block-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- Actions ---------- */
.action-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ---------- Error ---------- */
.error-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    animation: fadeIn 0.3s ease;
}

.error-icon {
    font-size: 20px;
}

.error-text {
    font-size: 14px;
    color: #fca5a5;
}

/* ---------- History ---------- */
.history-section {
    margin-top: 48px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    background: var(--bg-card-hover);
}

/* ---------- Analysis Premium Elements ---------- */

/* Custom Toggle Switch for Analysis */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    margin-left: 6px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-dim);
    transition: .4s;
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent-1);
    border-color: var(--accent-1);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
}

input:checked+.slider:before {
    transform: translateX(16px);
    background-color: white;
}

/* Glowing Border for Analysis Block */
.glow-border {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(129, 140, 248, 0.3);
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.1);
}

.glow-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.5), rgba(192, 132, 252, 0.5));
    z-index: -1;
    opacity: 0.5;
    filter: blur(8px);
    transition: opacity 0.3s ease;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Analysis Items */
.analysis-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.analysis-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analysis-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.tag-sm {
    font-size: 11px;
    padding: 2px 8px;
}

.analysis-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dim);
}

.highlight-box {
    padding: 12px 16px;
    background: rgba(129, 140, 248, 0.08);
    border-left: 3px solid var(--accent-1);
    border-radius: 4px;
    color: #f1f5f9;
    font-style: italic;
}

.highlight-box.muted {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: var(--text-muted);
    font-style: normal;
}

.analysis-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 0;
}

.analysis-list li {
    position: relative;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-dim);
}

.analysis-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-2);
}

.history-cover {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-input);
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-title {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    width: 90%;
    max-width: 500px;
    background: #111827;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.setting-group {
    margin-bottom: 24px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.cookie-status {
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-xs);
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 12px;
    line-height: 1.6;
}

.cookie-input,
.setting-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    resize: vertical;
    transition: var(--transition);
}

.cookie-input:focus,
.setting-input:focus {
    border-color: var(--accent-1);
}

.setting-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 8px 0;
}

.setting-hint a {
    color: var(--accent-1);
    text-decoration: none;
}

.setting-hint a:hover {
    text-decoration: underline;
}

.setting-btn {
    margin-top: 8px;
    padding: 10px 20px;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius-xs);
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
}

.setting-btn:hover {
    opacity: 0.9;
}

/* ---------- Toast ---------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 14px;
    color: var(--text);
    animation: slideUp 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.4);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.4);
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .hero {
        padding: 48px 0 28px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .parse-btn {
        width: 100%;
        height: 48px;
    }

    .result-header {
        flex-direction: column;
    }

    .cover-wrapper {
        width: 100%;
        min-width: unset;
    }

    .cover-img {
        aspect-ratio: 16/9;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .options-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar {
        padding: 12px 16px;
    }

    .main {
        padding: 0 16px 60px;
    }
}

/* ---------- Footer ---------- */
.site-footer {
    text-align: center;
    padding: 32px 24px 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

.footer-brand {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.footer-sep {
    margin: 0 8px;
    opacity: 0.4;
}

.footer-text {
    font-weight: 400;
}

/* ---------- Terminal Output & Loading Skeletons ---------- */

/* SSE Terminal Container */
.terminal-container {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    transition: all 0.3s ease;
}

.terminal-header {
    background: #161b22;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
    display: flex;
    gap: 6px;
    margin-right: 12px;
}

.terminal-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background-color: #ff5f56;
}

.dot.yellow {
    background-color: #ffbd2e;
}

.dot.green {
    background-color: #27c93f;
}

.terminal-title {
    color: #8b949e;
    font-size: 12px;
    font-weight: 500;
}

.terminal-body {
    padding: 12px 16px;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.terminal-body::-webkit-scrollbar {
    width: 6px;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.log-line {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 4px;
    word-break: break-all;
    display: flex;
    gap: 12px;
}

.log-time {
    color: #8b949e;
    flex-shrink: 0;
}

.log-msg {
    color: #c9d1d9;
}

.log-msg.success {
    color: #56d364;
}

.log-msg.error {
    color: #f85149;
}

.log-msg.warning {
    color: #e3b341;
}

.log-msg.info {
    color: #58a6ff;
}

/* Skeleton Loaders */
.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.w-100 {
    width: 100%;
}

.w-75 {
    width: 75%;
}

.w-50 {
    width: 50%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Small Spinner inside blocks */
.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-1);
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}