:root {
    /* Logo 提取的品牌色：湖水藍/灰綠色系 */
    --brand-primary: #678B91;
    --brand-primary-light: #8cb1b7;
    --brand-primary-dark: #4d6d72;
    --brand-accent: #22d3ee;
    
    /* 深色主題背景與文字 */
    --bg-dark: #0a0f18;
    --bg-card: rgba(20, 28, 42, 0.7);
    --bg-glass: rgba(103, 139, 145, 0.1);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --border-color: rgba(103, 139, 145, 0.2);
    
    /* 動畫與其他 */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 按鈕樣式 */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(103, 139, 145, 0.3);
}

.btn-primary:hover {
    background-color: var(--brand-primary-light);
    box-shadow: 0 6px 20px rgba(103, 139, 145, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--brand-primary);
    color: var(--brand-primary-light);
}

.btn-secondary:hover {
    background-color: rgba(103, 139, 145, 0.1);
    transform: translateY(-2px);
}

.btn-large {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* 漸層文字 */
.text-gradient {
    background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 導覽列 */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
}

#navbar.scrolled {
    padding: 1rem 0;
    background-color: rgba(10, 15, 24, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 400;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--brand-primary-light);
}

.mobile-only-btn {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: white;
    transition: 0.3s;
}

/* 主視覺區 (Hero) */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background-color: rgba(103, 139, 145, 0.2);
    top: 10%;
    left: -100px;
}

.glow-2 {
    width: 300px;
    height: 300px;
    background-color: rgba(34, 211, 238, 0.15);
    bottom: 20%;
    right: 0;
}

.hero-content {
    flex: 1;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-primary-light);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

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

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    z-index: 1;
}

/* Glassmorphism Dashboard Mockup */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.glass-panel:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mock-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.mock-dots {
    display: flex;
    gap: 6px;
    margin-right: 15px;
}

.mock-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ff5f56;
}
.mock-dots span:nth-child(2) { background-color: #ffbd2e; }
.mock-dots span:nth-child(3) { background-color: #27c93f; }

.mock-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.mock-chart {
    height: 200px;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.chart-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-accent), transparent);
    box-shadow: 0 0 10px var(--brand-accent);
}

.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    padding-top: 20px;
}

.bar {
    width: 12%;
    border-radius: 4px 4px 0 0;
    opacity: 0.8;
}

.bar-up { background-color: #10b981; }
.bar-down { background-color: #ef4444; }


/* 功能區 */
.features {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--brand-primary-light);
    box-shadow: 0 10px 30px rgba(103, 139, 145, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: var(--bg-glass);
    border-radius: 12px;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* 數據區 */
.stats {
    background: linear-gradient(to right, rgba(10, 15, 24, 1), rgba(20, 28, 42, 1));
    padding: 6rem 2rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 2rem;
}

.stat-box h3 {
    font-size: 3.5rem;
    font-weight: 800;
    display: inline;
    color: var(--brand-primary-light);
}

.stat-unit {
    font-size: 2rem;
    font-weight: 600;
    color: var(--brand-primary-light);
}

.stat-box p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* 頁尾 */
footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand p {
    margin-top: 1rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 4rem;
}

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

.link-column h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.link-column a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.link-column a:hover {
    color: var(--brand-primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 動畫 Utilities */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* ==============================================================
   註冊頁面 & 後台管理樣式 (Auth & Admin)
   ============================================================== */

/* 註冊頁面 */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    z-index: 10;
}

.auth-logo {
    justify-content: center;
    margin-bottom: 2rem;
}

.auth-panel {
    padding: 2.5rem;
}

.auth-panel h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-panel p {
    text-align: center;
    margin-bottom: 2rem;
}

/* 表單 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    background: rgba(10, 15, 24, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-main);
    transition: var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand-primary-light);
    box-shadow: 0 0 0 3px rgba(103, 139, 145, 0.2);
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.btn-google {
    background-color: #ffffff;
    color: #3c4043;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn-google:hover {
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

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

.divider span {
    padding: 0 10px;
    font-size: 0.85rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.text-accent {
    color: var(--brand-accent);
}

/* 後台管理 (Admin) */
.admin-body {
    background-color: var(--bg-dark);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: rgba(10, 15, 24, 0.95);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: rgba(103, 139, 145, 0.1);
    color: var(--brand-primary-light);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-header {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background-color: rgba(10, 15, 24, 0.8);
    backdrop-filter: blur(10px);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: var(--brand-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.admin-content {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

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

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* 表格 */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* 狀態標籤與審核按鈕 */
.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.badge-approved {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.btn-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid #10b981;
}

.btn-success:hover {
    background-color: #10b981;
    color: white;
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid #ef4444;
}

.btn-danger:hover {
    background-color: #ef4444;
    color: white;
}

/* ===== 分頁面板切換 ===== */
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}

/* ===== Dashboard 版面 ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.bot-status-card {
    text-align: center;
    padding: 2rem;
}

.status-indicator {
    font-size: 1rem;
    margin: 1rem 0;
    font-weight: 600;
}

.status-offline { color: var(--text-muted); }
.status-online { color: #10b981; }

.pnl-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: #10b981;
    margin: 0.5rem 0;
    transition: color 0.3s;
}

.stat-mini-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-big-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-top: 0.5rem;
}

.text-success { color: #10b981; }

/* ===== 績效圖表 ===== */
.perf-chart-container {
    margin-top: 1.5rem;
}

.perf-chart {
    width: 100%;
    height: 150px;
    background: rgba(10, 15, 24, 0.4);
    border-radius: 8px;
    overflow: hidden;
    padding: 1rem;
}

.perf-labels {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== VIP 會員 ===== */
.vip-level-card {
    text-align: center;
    grid-column: 1 / -1;
    padding: 2.5rem;
}

.vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1a1a;
    font-weight: 800;
    padding: 0.4rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.vip-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.tier-card {
    background: rgba(10, 15, 24, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.tier-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-primary);
}

.active-tier {
    border-color: var(--brand-primary);
    background: rgba(103, 139, 145, 0.1);
}

.tier-card.tier-vip {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.05);
}

.tier-name {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--brand-primary-light);
}

.tier-price {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0.5rem 0 1rem;
}

.tier-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== AI 建議 ===== */
.ai-suggestion {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(10, 15, 24, 0.4);
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid var(--brand-primary);
}

.ai-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* 響應式 */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }
    
    .hero-content {
        margin-bottom: 4rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        justify-content: center;
    }
    
    .glass-panel {
        transform: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only-btn {
        display: block;
        margin-top: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
}
