@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    /* Premium Design Tokens - 2024 Modern Aesthetic */
    --accent: #50e3c2;
    --accent-primary: #50e3c2;
    --accent-secondary: #2d8cff;
    --accent-strong: #1a73e8;
    --accent-glow: rgba(80, 227, 194, 0.4);

    /* Cyber/Premium Palette */
    --cyber-purple: #bb9af7;
    --cyber-pink: #ff007c;
    --cyber-blue: #7aa2f7;
    --cyber-green: #9ece6a;
    --cyber-orange: #ff9e64;

    /* Semantic Backgrounds (Glass-Ready) */
    --bg-deep: #05070a;
    --bg-darker: #080b0f;
    --bg-primary: radial-gradient(circle at 50% 0%, #1a1b26 0%, #05070a 100%);
    --bg-card: rgba(26, 27, 38, 0.45);
    --bg-panel: rgba(18, 24, 34, 0.75);
    --bg-input: rgba(0, 0, 0, 0.3);
    --bg-navbar: rgba(5, 7, 10, 0.7);
    --bg-active: rgba(80, 227, 194, 0.15);

    /* Typography System */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Glassmorphism & Borders */
    --border-soft: rgba(255, 255, 255, 0.05);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(80, 227, 194, 0.3);
    --glass-blur: blur(16px);
    --glass-surface: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);

    /* Elevation & Feedback */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --radius-full: 100px;

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(80, 227, 194, 0.1);

    /* Refined Text Colors */
    --text-primary: #f8fbff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-on-accent: #05070a;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    background-attachment: fixed;
    color: #f8fbff;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================================
   导航栏
   ============================================================================ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 6%;
    background: rgba(12, 18, 27, 0.92);
    border-bottom: 1px solid rgba(80, 227, 194, 0.14);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

.nav-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.nav-links {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    flex: 1;
    justify-content: center;
    transform: translateX(40px);
    /* 往中间 偏右 */
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 0 0 auto;
    min-width: 280px;
    justify-content: flex-end;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.nav-brand:hover {
    transform: scale(1.02);
}

.brand-text {
    display: flex;
    align-items: baseline;
    gap: 0;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent), #ffffff, var(--accent-strong));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-domain {
    font-size: 1.25rem;
    color: var(--accent);
    opacity: 1;
    font-weight: 600;
    margin-left: 0.1rem;
}

/* .nav-links moved up to handle positioning */

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
}

.nav-links a:hover {
    color: var(--accent);
    background: rgba(80, 227, 194, 0.08);
}

.nav-links a.active {
    color: var(--accent);
    background: rgba(80, 227, 194, 0.12);
    border: 1px solid var(--border-soft);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* ============================================================================
   按钮
   ============================================================================ */

.btn {
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: var(--bg-deep);
    box-shadow: 0 4px 15px rgba(80, 227, 194, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(80, 227, 194, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: var(--border-soft);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================================
   Hero 区域
   ============================================================================ */

.hero {
    position: relative;
    margin: 4rem auto 3rem;
    max-width: 1200px;
    padding: 5rem 2rem;
    text-align: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-md);
}

.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 30% 30%, rgba(80, 227, 194, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(45, 140, 255, 0.15) 0%, transparent 40%);
    z-index: -1;
    animation: aurora 20s linear infinite;
}

@keyframes aurora {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 30%, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
}

/* ============================================================================
   Statistics Dashboard
   ============================================================================ */

.task-stats-section {
    padding: 4rem 0 2rem;
}

.task-stats-section h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #fff 40%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 1024px) {
    .tasks-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.stat-icon {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    width: 44px;
    height: 44px;
    background: rgba(80, 227, 194, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0.1rem 0;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================================
   Utility & Shadows
   ============================================================================ */

.shadow-glow {
    box-shadow: 0 0 20px rgba(80, 227, 194, 0.2);
}

.task-prompt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Cleaned up duplicate stats section */

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* 筛选栏 */
.filters-section {
    background: var(--bg-primary);
    padding: 1.5rem 0;
}

.filters-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(80, 227, 194, 0.1);
    background: rgba(15, 20, 25, 0.8);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.filter-select {
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--border-hover);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(80, 227, 194, 0.1);
}

/* 任务列表 */
.tasks-section {
    padding: 2rem 0 5rem;
}

.tasks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.task-card-enhanced {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: var(--glass-blur);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
}

.task-card-enhanced:hover {
    transform: translateY(-8px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.task-title-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    min-width: 0;
    /* Allow text truncation */
}

.task-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* 状态徽章 */
.task-status {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.task-status.running {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.2), rgba(16, 185, 129, 0.2));
    color: var(--accent);
    border: 1px solid rgba(80, 227, 194, 0.3);
    animation: pulse-glow 2s infinite;
}

.task-status.completed {
    background: linear-gradient(135deg, rgba(45, 140, 255, 0.2), rgba(37, 99, 235, 0.2));
    color: var(--accent-strong);
    border: 1px solid rgba(45, 140, 255, 0.3);
}

.task-status.paused {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.task-status.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #ff7b72;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.task-status.creating {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(156, 163, 175, 0.3);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(80, 227, 194, 0.3);
    }

    50% {
        box-shadow: 0 0 16px rgba(80, 227, 194, 0.5);
    }
}

.task-prompt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

/* 进度条 */
.task-progress {
    margin: 1.2rem 0;
}

.progress-bar {
    height: 6px;
    background: rgba(156, 163, 175, 0.2);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 元数据行 */
.task-meta-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-item svg {
    opacity: 0.6;
}

/* Loading Skeleton */
.loading-state {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-card {
    height: 180px;
    background: linear-gradient(90deg, var(--bg-card) 0%, rgba(80, 227, 194, 0.05) 50%, var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

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

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    opacity: 0.5;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.empty-state .btn {
    margin-top: 1rem;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 100%;
    }

    .task-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .task-meta-row {
        flex-direction: column;
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }
}


.hero::after {
    content: "";
    position: absolute;
    inset: -45% 55% auto -20%;
    height: 140%;
    background: radial-gradient(circle, rgba(80, 227, 194, 0.28), transparent 70%);
    opacity: 0.35;
    pointer-events: none;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 65% -15% -35% 45%;
    background: radial-gradient(circle, rgba(45, 140, 255, 0.25), transparent 75%);
    opacity: 0.3;
    pointer-events: none;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #50e3c2, #2d8cff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 0.95rem;
    color: #b0b0b0;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ============================================================================
   提示输入框
   ============================================================================ */

.prompt-input-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.prompt-input-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(80, 227, 194, 0.2);
    transform: translateY(-2px);
}

.prompt-input-container.hitl-active {
    border-color: var(--cyber-purple);
    box-shadow: 0 0 30px rgba(187, 154, 247, 0.4);
    background: rgba(187, 154, 247, 0.05);
    animation: pulse-hitl 2s infinite;
}

@keyframes pulse-hitl {
    0% {
        box-shadow: 0 0 20px rgba(187, 154, 247, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(187, 154, 247, 0.6);
    }

    100% {
        box-shadow: 0 0 20px rgba(187, 154, 247, 0.3);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-soft);
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.view-all:hover {
    color: var(--accent);
    gap: 0.6rem;
    border-bottom-color: var(--accent);
}

.prompt-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.5rem;
    gap: 1rem;
}

.model-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.model-label {
    font-weight: 500;
    white-space: nowrap;
}

.model-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 6px 28px 6px 10px;
    font-size: 0.8rem;
    min-width: 140px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.model-select:hover {
    border-color: var(--accent);
    background-color: rgba(255, 255, 255, 0.08);
}

.model-select option {
    background: #1a1f24;
    color: var(--text-main);
}

.prompt-input {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.95rem;
    font-family: var(--font-body);
    resize: none;
    outline: none;
    line-height: 1.5;
}

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

.start-btn {
    padding: 8px 20px;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================================
   任务列表
   ============================================================================ */

.recent-tasks {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.recent-tasks h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: #fff;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.task-card:hover {
    border-color: var(--border-hover);
    transform: translateX(8px);
    box-shadow: var(--shadow-card);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.task-status {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-status.running {
    background: rgba(80, 227, 194, 0.15);
    color: var(--accent);
}

.task-status.completed {
    background: rgba(45, 140, 255, 0.15);
    color: var(--accent-strong);
}

.task-status.paused {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.task-prompt {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.task-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================================
   双生视窗布局 - Command Center
   ============================================================================ */

.twin-windows {
    display: flex;
    height: calc(100vh - 64px);
    position: relative;
    background: var(--bg-darker);
    overflow: hidden;
}

/* 动态背景星云效果 */
.twin-windows::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(80, 227, 194, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(45, 140, 255, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.twin-windows::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

.left-pane {
    width: 380px;
    min-width: 320px;
    max-width: 500px;
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    background: var(--glass-background);
    backdrop-filter: var(--glass-blur);
    position: relative;
    z-index: 5;
    transition: width 0.1s linear;
}

.right-pane {
    flex: 1;
    min-width: 480px;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.resize-handle {
    width: 6px;
    cursor: col-resize;
    background: transparent;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 380px;
    /* Synchronized with left-pane default width */
    z-index: 100;
    transition: background 0.2s;
}

.resize-handle:hover,
.resize-handle:active {
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ============================================================================
   左窗: 对话区域 (Premium Bubbles)
   ============================================================================ */

.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-soft) transparent;
}

.chat-area::-webkit-scrollbar {
    width: 4px;
}

.chat-area::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 10px;
}

.message {
    display: flex;
    gap: 0.85rem;
    max-width: 90%;
    animation: messageReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes messageReveal {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

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

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.message.user .message-avatar {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: var(--bg-deep);
}

.message.agent .message-avatar {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
}

.message-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 0.85rem 1.1rem;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.55;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    backdrop-filter: blur(8px);
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.15), rgba(45, 140, 255, 0.1));
    border-color: rgba(80, 227, 194, 0.2);
    border-bottom-right-radius: 4px;
    color: #fff;
}

.message.agent .message-content {
    border-bottom-left-radius: 4px;
    background: rgba(30, 41, 59, 0.5);
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: right;
}

/* ============================================================================
   左窗: 配置面板
   ============================================================================ */

.config-panel {
    border-top: 1px solid var(--border-color);
    padding: 1.2rem;
    background: var(--bg-card);
}

.config-panel h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--accent);
}

.config-field {
    margin-bottom: 0.8rem;
}

/* ============================================================================
   Agent Thinking & HUD Polish
   ============================================================================ */

.workspace-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    height: 100%;
    color: var(--text-secondary);
    animation: fadeIn 0.6s ease;
}

.workspace-empty-state .state-icon {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.workspace-empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.workspace-empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 280px;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.thinking-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 2px 8px;
    background: rgba(80, 227, 194, 0.1);
    border-radius: 10px;
    margin-left: 10px;
}

.thinking-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: thinkingBounce 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes thinkingBounce {

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

    40% {
        transform: scale(1.0);
    }
}

.hud-panel {
    border: 1px solid var(--border-soft);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* ============================================================================
   左窗: 输入区域
   ============================================================================ */

.input-area {
    padding: 0.8rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-navbar);
    display: flex;
    gap: 0.6rem;
}

.user-input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    resize: none;
    min-height: 36px;
    max-height: 100px;
}

.user-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(80, 227, 194, 0.1);
}

.send-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

/* ============================================================================
   右窗: 画面预览 (Bezel & Immersive)
   ============================================================================ */

.screen-container {
    flex: 1;
    position: relative;
    background: #000;
    margin: 1rem;
    border-radius: var(--radius-md);
    border: 8px solid #1a1b26;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-frame,
.screen-video {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
    background: #000;
}

.screen-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-darker);
    color: var(--text-secondary);
    z-index: 20;
}

.screen-toolbar {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 30;
    padding: 0.5rem;
    background: rgba(15, 17, 26, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0.4;
    transition: opacity 0.3s, transform 0.3s;
}

.screen-container:hover .screen-toolbar {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.screen-toolbar .icon-btn {
    padding: 0.6rem;
    border-radius: var(--radius-full);
}

/* ============================================================================
   右窗: HUD 状态控制台
   ============================================================================ */

.status-bar {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to top, var(--bg-darker), transparent);
    border-top: 1px solid var(--border-soft);
    min-height: 180px;
    max-height: 250px;
    overflow-y: auto;
}

.status-title {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}

.status-steps {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.status-step {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.3s;
}

.status-step-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.status-step.completed {
    border-color: rgba(80, 227, 194, 0.1);
    background: rgba(80, 227, 194, 0.03);
}

.status-step.in-progress {
    border-color: var(--border-glow);
    background: rgba(80, 227, 194, 0.05);
    box-shadow: 0 0 15px rgba(80, 227, 194, 0.1);
}

.status-step-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    flex-shrink: 0;
}

.status-step.completed .status-step-icon {
    background: var(--accent);
    color: var(--bg-deep);
    box-shadow: 0 0 10px var(--accent-glow);
}

.status-step.in-progress .status-step-icon {
    background: var(--accent-strong);
    color: #fff;
    box-shadow: 0 0 20px rgba(45, 140, 255, 0.4);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {

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

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.status-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-step.in-progress .status-text {
    color: #fff;
}

/* Step summary in right panel */
.step-summary {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
    padding-left: 1.7rem;
    font-style: italic;
    line-height: 1.3;
    word-break: break-word;
    opacity: 0.8;
}

.status-step.completed .step-summary {
    color: rgba(80, 227, 194, 0.6);
}

/* Result message card in chat */
.message.result-message .message-content {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.08), rgba(45, 140, 255, 0.05));
    border: 1px solid rgba(80, 227, 194, 0.2);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    max-width: 100%;
}

.task-description-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(80, 227, 194, 0.02);
}

.task-indicator {
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

.task-objective {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.result-header {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.result-body {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-top: 0.5rem;
    border-left: 3px solid var(--accent);
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* ============================================================================
   工具栏 (HUD Style)
   ============================================================================ */

.toolbar {
    padding: 0.75rem 1.5rem;
    background: rgba(10, 15, 20, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.toolbar-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.toolbar-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: flex;
    gap: 1.25rem;
    letter-spacing: 0.5px;
}

.toolbar-actions {
    display: flex;
    gap: 0.6rem;
}

.toolbar-actions .btn {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* ============================================================================
   响应式
   ============================================================================ */

@media (max-width: 1024px) {
    .twin-windows {
        flex-direction: column;
    }

    .left-pane {
        width: 100%;
        max-width: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        height: 50%;
    }

    .right-pane {
        width: 100%;
        min-width: 0;
        height: 50%;
    }

    .resize-handle {
        display: none;
    }
}

/* ============================================================================
   图标样式
   ============================================================================ */

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.icon-btn:hover {
    background: rgba(80, 227, 194, 0.1);
    color: var(--accent);
}

.icon-btn svg {
    width: 1.1em;
    height: 1.1em;
}

/* ============================================================================
   自定义模态框
   ============================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

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

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.modal-icon {
    font-size: 1.8rem;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.modal-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #50e3c2, #2d8cff);
    color: #0f1419;
}

.modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(80, 227, 194, 0.3);
}

.modal-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.modal-btn-secondary:hover {
    background: rgba(80, 227, 194, 0.1);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
}

/* User Info in Navbar */
.nav-user {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-email {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.user-balance {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-balance span {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ============================================================================
   Toast 通知系统
   ============================================================================ */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1.2rem;
    color: #fff;
    font-size: 0.85rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 240px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.toast-price {
    font-family: 'JetBrains Mono', monospace;
    color: #fb923c;
    font-weight: 700;
}

/* Auth Modal Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.auth-form input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.auth-form input:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

.auth-switch {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem;
    cursor: pointer;
}

.auth-switch span {
    color: var(--accent-primary);
    font-weight: 500;
}

/* ============================================================================
   History Section (New)
   ============================================================================ */

.history-section {
    padding-bottom: 4rem;
    margin-top: 2rem;
}

.history-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.history-controls .search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    width: 240px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.history-controls .search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.history-controls .filter-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-medium);
    transform: translateX(4px);
}

.history-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.history-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.history-status.completed {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(80, 227, 194, 0.4);
}

.history-status.failed {
    background: #ff7b72;
}

.history-status.running {
    background: #fb923c;
}

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

.history-prompt {
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.history-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
}

.history-status-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    white-space: nowrap;
    margin-left: 1rem;
}

.history-status-badge.completed {
    color: var(--accent);
    background: rgba(80, 227, 194, 0.1);
}

.history-status-badge.failed {
    color: #ff7b72;
    background: rgba(255, 123, 114, 0.1);
}

.empty-history {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 1px dashed var(--border-soft);
    border-radius: var(--radius-md);
}

/* ============================================================================
   Footer Styles
   ============================================================================ */

.app-footer {
    background: transparent;
    border-top: 1px solid var(--border-soft);
    margin-top: auto;
    padding: 2rem 0;
    width: 100%;
    text-align: center;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 语言选择器 */
.lang-selector {
    position: relative;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-soft);
    transition: all 0.2s;
    height: 34px;
    /* Fixed height for better alignment */
}

.lang-selector:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    color: var(--text-primary);
}

.lang-selector .arrow {
    font-size: 0.7rem;
    opacity: 0.5;
    transition: transform 0.2s;
}

.lang-selector:hover .arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    transition: all 0.2s;
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.lang-current .chevron {
    font-size: 0.6rem;
    opacity: 0.5;
    transition: transform 0.2s;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #0f1419;
    border: 1px solid rgba(80, 227, 194, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    z-index: 1000;
    min-width: 120px;
    display: none;
    animation: fadeIn 0.2s ease;
}

.lang-menu.show {
    display: block;
}

.lang-option {
    padding: 0.7rem 1rem;
    transition: all 0.2s;
    color: #a0a0a0;
}

.lang-option:hover {
    background: rgba(80, 227, 194, 0.1);
    color: #fff;
}

.lang-option.active {
    color: var(--accent);
    font-weight: 600;
    background: rgba(80, 227, 194, 0.05);
}

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

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