/* 艾哥云盘 - 现代风格 Neon Glass UI */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #121829;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 255, 255, 0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --neon-cyan: #00ffcc;
    --neon-purple: #a855f7;
    --neon-pink: #ec4899;
    --neon-blue: #3b82f6;
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #00ffcc 100%);
    --gradient-btn: linear-gradient(135deg, #00ffcc 0%, #3b82f6 100%);
    --gradient-btn-hover: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
    --shadow-glow: 0 0 30px rgba(0, 255, 204, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

html, body {
    height: 100%;
    font-family: 'Inter', 'Noto Sans SC', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 14px;
}

/* 动态背景光晕 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 204, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
    z-index: -1;
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-5%, -3%) rotate(2deg); }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #334155, #475569);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple)); }

/* 头部导航 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glow);
    padding: 16px 24px;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.logo::before {
    content: '⚡ ';
    -webkit-text-fill-color: var(--neon-cyan);
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    padding: 8px 4px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--neon-cyan);
    border-bottom-color: var(--neon-cyan);
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-btn);
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 255, 204, 0.25);
}

.btn-primary:hover {
    background: var(--gradient-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.35);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-glow);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--neon-cyan);
}

.btn-large {
    padding: 16px 36px;
    font-size: 16px;
}

/* Hero 区域 */
.hero {
    padding: 80px 24px 60px;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 50px;
    color: var(--neon-cyan);
    font-size: 13px;
    margin-bottom: 24px;
    font-weight: 500;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero h1 span {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-top: 8px;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 特性卡片 */
.features {
    padding: 60px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.features-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 32px 24px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-btn);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(0, 255, 204, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* 登录页 */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
}

.login-logo {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.1);
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    margin-top: 8px;
}

.login-hint {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* 仪表盘布局 */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-glow);
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 0 24px 24px;
    font-size: 18px;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 1px solid var(--border-glow);
}

.sidebar-user {
    padding: 16px 24px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glow);
}

.sidebar-user strong {
    color: var(--text-primary);
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.sidebar-nav {
    padding: 16px 0;
    list-style: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav li a:hover {
    background: var(--bg-card-hover);
    color: var(--neon-cyan);
}

.sidebar-nav li a.active {
    background: var(--bg-card-hover);
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
    box-shadow: inset 0 0 20px rgba(0, 255, 204, 0.05);
}

.sidebar-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 32px;
    max-width: 100%;
    overflow-x: hidden;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 14px;
    padding: 24px;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: rgba(0, 255, 204, 0.3);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-btn);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

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

/* 聊天区域 */
.chat-container {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 14px;
    line-height: 1.7;
    word-wrap: break-word;
    animation: slideIn 0.3s ease-out;
}

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

.chat-message.user {
    align-self: flex-end;
    background: var(--gradient-btn);
    color: #000;
    border-bottom-right-radius: 4px;
}

.chat-message.ai {
    align-self: flex-start;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-glow);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border-glow);
    background: rgba(0, 0, 0, 0.2);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-textarea {
    flex: 1;
    min-height: 48px;
    max-height: 200px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.2s;
    line-height: 1.5;
}

.chat-textarea:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.1);
}

.send-btn {
    padding: 12px 24px;
    height: 48px;
    min-width: 100px;
}

/* 表格 */
.data-table {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-glow);
    font-size: 13px;
}

.data-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.2s; }
.data-table tbody tr:hover { background: var(--bg-card-hover); }

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
}

.badge-active { background: rgba(0, 255, 204, 0.15); color: var(--neon-cyan); }
.badge-pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-expired { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-admin { background: rgba(168, 85, 247, 0.15); color: var(--neon-purple); }

/* 响应式 - 手机端 */
@media (max-width: 768px) {
    html, body { font-size: 15px; }

    .site-header { padding: 12px 16px; }
    .nav-links { display: none; }
    .hero { padding: 40px 16px; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 16px; }

    .sidebar {
        display: none;
    }

    .main-content { padding: 20px 16px; }
    .page-title { font-size: 22px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 24px; }

    .features-grid { grid-template-columns: 1fr; gap: 16px; }

    .chat-container { height: calc(100vh - 140px); }
    .chat-message { max-width: 95%; font-size: 15px; padding: 12px 14px; }
    .chat-textarea { font-size: 15px; }
    .send-btn { min-width: 80px; padding: 12px 16px; }

    .login-box { padding: 32px 24px; }

    .data-table { overflow-x: auto; display: block; }
    .data-table th, .data-table td { padding: 10px 8px; font-size: 12px; }

    /* 手机端底部导航 */
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(10, 14, 26, 0.95);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-glow);
        padding: 8px 0;
        display: flex;
        justify-content: space-around;
        z-index: 100;
    }

    .mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 12px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 11px;
        transition: all 0.2s;
    }

    .mobile-nav a.active {
        color: var(--neon-cyan);
    }

    .mobile-nav-icon {
        font-size: 20px;
    }

    /* 手机端主内容底部留出空间 */
    .main-content { padding-bottom: 100px; }
}

@media (min-width: 769px) {
    .mobile-nav { display: none; }
}

/* 平板 */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar { width: 200px; min-width: 200px; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 255, 204, 0.3);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Toast 通知 */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    animation: toastIn 0.3s ease-out;
    box-shadow: var(--shadow-card);
    max-width: 400px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-success { background: rgba(16, 185, 129, 0.2); border: 1px solid #10b981; color: #34d399; }
.toast-error { background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #f87171; }
.toast-info { background: rgba(59, 130, 246, 0.2); border: 1px solid #3b82f6; color: #60a5fa; }

/* 文本区域通用 */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section {
    margin-bottom: 40px;
}

/* 代码块/链接高亮 */
.code-inline {
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.2);
    color: var(--neon-cyan);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    display: inline-block;
    margin: 4px 0;
}

/* 会话列表 */
.conversation-list {
    list-style: none;
    padding: 0;
}

.conversation-list li {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
}

.conversation-list li:hover {
    background: var(--bg-card-hover);
    border-color: var(--neon-cyan);
}

/* 公告滚动条 */
.announcement-bar {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(0, 255, 204, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.announcement-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 0 8px;
}

.announcement-close:hover {
    color: var(--neon-cyan);
}
