/* ============================================================ */
/* index.ui.css - 首页基础 + UI组件
/* 合并自：index.base.css + index.ui.css（移除公共样式） */
/* ============================================================ */

/* ===== CSS Variables ===== */
:root {
    --primary: #3366ff;
    --primary-dark: #1a4bcc;
    --primary-hover: #5588ff;
    --hint: #888888;
    --placeholder: #2a2a2a;
    --blur: blur(6px);
    --radius: 20px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --gray: #8e8e93;
    --separator-light: #e5e5ea;

    /* ===== 浅色模式变量 ===== */
    --bg-body: #f2f2f7;
    --bg-card: rgba(255, 255, 255, 0.6);
    --bg-navbar: rgba(242, 242, 247, 0.8);
    --bg-sidebar: rgba(242, 242, 247, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.5);
    --bg-footer: rgba(242, 242, 247, 0.8);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #1c1c1e;
    --text-secondary: #3a3a3c;
    --text-muted: #8e8e93;
    --border-light: rgba(0, 0, 0, 0.06);
    --border-primary: rgba(51, 102, 255, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.06);
    --btn-bg: rgba(255, 255, 255, 0.9);
    --btn-text: #1c1c1e;
    --feature-bg: rgba(255, 255, 255, 0.6);
    --feature-text: #1c1c1e;
    --rule-bg: rgba(255, 255, 255, 0.6);
    --rule-text: #1c1c1e;
    --server-address-bg: rgba(255, 255, 255, 0.8);
    --server-address-text: #1c1c1e;
    --server-status-bg: rgba(255, 255, 255, 0.8);
    --qrcode-bg: rgba(255, 255, 255, 0.8);
    --footer-bg: rgba(242, 242, 247, 0.8);
    --footer-text: #3a3a3c;
    --copyright-border: rgba(0, 0, 0, 0.08);
    --copyright-text: #8e8e93;
    --link-hover: #3366ff;
}

/* ===== 深色模式变量 ===== */
[data-theme="dark"] {
    --bg-body: #0a0c0f;
    --bg-card: rgba(28, 28, 30, 0.6);
    --bg-navbar: rgba(10, 12, 15, 0.8);
    --bg-sidebar: rgba(28, 28, 30, 0.8);
    --bg-glass: rgba(0, 0, 0, 0.3);
    --bg-footer: rgba(10, 12, 15, 0.8);
    --bg-input: rgba(255, 255, 255, 0.08);
    --text-primary: #f2f2f7;
    --text-secondary: #aeaeb2;
    --text-muted: #636366;
    --border-light: rgba(255, 255, 255, 0.06);
    --border-primary: rgba(51, 102, 255, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --btn-bg: rgba(255, 255, 255, 0.08);
    --btn-text: #f2f2f7;
    --feature-bg: rgba(15, 15, 25, 0.5);
    --feature-text: #e0e0e0;
    --rule-bg: rgba(15, 15, 25, 0.5);
    --rule-text: #e0e0e0;
    --server-address-bg: rgba(0, 0, 0, 0.6);
    --server-address-text: #e0e0e0;
    --server-status-bg: rgba(0, 0, 0, 0.5);
    --qrcode-bg: rgba(0, 0, 0, 0.6);
    --footer-bg: rgba(0, 0, 0, 0.6);
    --footer-text: #aeaeb2;
    --copyright-border: rgba(255, 255, 255, 0.06);
    --copyright-text: #636366;
    --link-hover: #6699ff;
}

/* ===== Base ===== */
html, body {
    position: relative;
    min-height: 100vh;
}

body {
    background-image: url('../png/背景.webp');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Segoe UI', 'Poppins', system-ui, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header & Nav ===== */
header {
    background-color: var(--bg-navbar);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 20px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}
header.scrolled {
    background-color: rgba(5, 7, 10, 0.92);
    padding: 10px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #3366ff, #66ccff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo img {
    height: 50px;
    margin-right: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid rgba(51,102,255,0.3);
}
.logo img:hover { transform: rotate(10deg); }

.nav-links {
    display: flex;
    list-style: none;
}
.nav-links li { margin-left: 25px; }
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    padding: 8px 15px;
    border-radius: 30px;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3366ff;
    transition: 0.2s;
}
.nav-links a:hover {
    color: var(--primary);
    background-color: rgba(51,102,255,0.1);
}
.nav-links a:hover::after { width: 100%; }

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background-color: rgba(51,102,255,0.1);
    padding: 8px 15px;
    border-radius: 30px;
    transition: 0.2s;
    color: var(--text-primary);
}
.mobile-menu:hover { background-color: rgba(51,102,255,0.2); }

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100%;
    background: var(--bg-sidebar);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-right: 1px solid var(--border-light);
    z-index: 1001;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 30px 25px;
    overflow-y: auto;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
}
.sidebar.active {
    left: 0;
    animation: slideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes slideIn {
    from { left: -100%; opacity: 0; }
    to { left: 0; opacity: 1; }
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}
.sidebar-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
.close-sidebar {
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.close-sidebar:hover {
    color: var(--primary);
    background: rgba(0, 122, 255, 0.1);
    transform: rotate(90deg);
}
.sidebar-menu { list-style: none; }
.sidebar-item { margin-bottom: 12px; }
.sidebar-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.sidebar-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}
.sidebar-link:hover::before { left: 100%; }
.sidebar-link:hover {
    background: rgba(0, 122, 255, 0.15);
    color: var(--primary);
    transform: translateX(8px);
}
.sidebar-icon {
    margin-right: 15px;
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}
.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--separator-light), transparent);
    margin: 25px 0;
}

/* ===== Overlay ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== Footer ===== */
footer {
    background-color: var(--footer-bg);
    padding: 40px 0 20px;
    text-align: center;
    border-radius: 20px 20px 0 0;
    margin-top: 30px;
    transition: background-color 0.3s ease;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}
.footer-section h3 {
    margin-bottom: 20px;
    color: var(--primary);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: 0.2s;
}
.footer-links a:hover { color: var(--primary); }
.social-links a {
    display: inline-block;
    margin: 0 10px;
    color: var(--footer-text);
    font-size: 1.5rem;
    transition: 0.2s;
}
.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}
.copyright {
    padding-top: 20px;
    border-top: 1px solid var(--copyright-border);
    font-size: 0.9rem;
    color: var(--copyright-text);
}

/* ============================================================ */
/* index.ui.css - UI组件（按钮、卡片、表单、浮动文字、注册进度条） */
/* ============================================================ */

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 60px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(20,20,30,0.9);
    border: 1px solid #3366ff;
    color: white;
    font-size: 1.1rem;
    backdrop-filter: blur(5px);
    margin: 0;
    cursor: pointer;
}
.btn:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}
.btn-primary {
    background: #3366ff;
    border: none;
    color: black;
    box-shadow: 0 0 12px #3366ff;
}
.btn-primary:hover {
    background: #5588ff;
    box-shadow: 0 0 25px #3366ff, 0 8px 20px rgba(0,0,0,0.25) !important;
}
.btn-outline {
    background-color: transparent;
    color: #3366ff;
}
.btn-outline:hover {
    background: #3366ff;
    color: black;
    border-color: #3366ff;
}
.copy-btn {
    background: #3366ff;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: black;
}
.copy-btn:hover {
    background: #5588ff;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 6px 16px rgba(51, 102, 255, 0.3) !important;
}

/* ===== Feature Cards & Rule Items ===== */
.feature-card, .rule-item {
    background: rgba(15,15,25,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 32px;
    padding: 28px 20px;
    text-align: center;
    transition: 0.25s;
}
.feature-card:hover, .rule-item:hover {
    transform: translateY(-8px);
    border-color: #3366ff;
    box-shadow: 0 15px 30px rgba(51,102,255,0.2);
}
.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #5588ff;
}
.feature-card h3, .rule-item h3 {
    margin-bottom: 15px;
    color: #3366ff;
}
.rule-item {
    text-align: left;
    border-left: 5px solid #3366ff;
}

/* ===== Contact Form ===== */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    background: rgba(20,20,30,0.8);
    border: 1px solid rgba(51,102,255,0.3);
    border-radius: 12px;
    color: #e0e0e0;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #3366ff;
    box-shadow: 0 0 0 3px rgba(51,102,255,0.15);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #666;
}
.contact-form .field-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: -10px;
    margin-bottom: 12px;
}
.contact-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3366ff, #5588ff);
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}
.contact-form button:hover {
    background: linear-gradient(135deg, #5588ff, #66aaff);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51,102,255,0.3);
}
.contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== Float Text ===== */
.float-text-container {
    position: relative;
    overflow: hidden;
    min-height: 60px;
    margin: 20px 0;
}
.float-text {
    display: inline-block;
    font-size: 1.2rem;
    color: #3366ff;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: floatText 1.5s ease forwards;
    opacity: 0;
    margin: 0 5px;
}
@keyframes floatText {
    0% { opacity: 0; transform: translateY(20px); }
    50% { opacity: 1; transform: translateY(-5px); }
    100% { opacity: 1; transform: translateY(0); }
}
.float-text.delay-1 { animation-delay: 0.3s; }
.float-text.delay-2 { animation-delay: 0.6s; }
.float-text.delay-3 { animation-delay: 0.9s; }

/* ===== Register Progress Bar ===== */
#registerProgress {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    z-index: 30;
    background: rgba(10, 12, 15, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 14px 20px 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    transition: opacity 0.8s ease, transform 0.8s ease;
    opacity: 0;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
#registerProgress.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: none;
}
#registerProgress.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}
#registerProgress #rpText {
    text-align: center;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 6px;
    min-height: 22px;
    transition: opacity 0.3s ease;
}
#registerProgress #rpWrapper {
    width: 100%;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    overflow: hidden;
    height: 6px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
#registerProgress #rpFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3366ff, #66ccff);
    border-radius: 8px;
    transition: width 0.3s ease;
}
#registerProgress #rpBanner {
    text-align: center;
    padding: 10px 0 0 0;
    color: #66bb6a;
    font-weight: bold;
    font-size: clamp(15px, 2.2vw, 18px);
    transition: opacity 0.6s ease, max-height 0.6s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}
#registerProgress #rpBanner.show {
    opacity: 1;
    max-height: 60px;
}
#registerProgress #rpBanner i {
    margin-right: 8px;
}

/* ===== 响应式 - 移动端导航折叠 ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #0a0c0f;
        padding: 10px 0;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
    }
    .nav-links.active {
        display: flex;
    }
    .mobile-menu {
        display: block;
    }
}