/* === 工具站导航 — WebStack 暗色主题 === */

:root {
    --bg: #0d0d0f;
    --sidebar-bg: #121214;
    --sidebar-hover: #1a1a1e;
    --surface: #161618;
    --surface2: #1e1e22;
    --border: #2a2a2e;
    --border-light: #333338;
    --text: #e8e8ed;
    --text2: #888891;
    --text3: #5c5c66;
    --accent: #6c5ce7;
    --accent-hover: #7c6cf7;
    --accent-glow: rgba(108,92,231,0.2);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
}

/* === SIDEBAR === */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform .25s ease;
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo svg {
    width: 28px;
    height: 28px;
}

.sidebar-title {
    font-size: 17px;
    font-weight: 700;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text2);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.sidebar-toggle:hover { background: var(--sidebar-hover); }

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 16px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 0 12px;
    margin-bottom: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    transition: all .15s;
    cursor: pointer;
    position: relative;
}
.nav-item:hover {
    color: var(--text);
    background: var(--sidebar-hover);
}
.nav-item.active {
    color: #fff;
    background: rgba(108,92,231,0.12);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.nav-icon { font-size: 16px; flex-shrink: 0; }
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--surface2);
    color: var(--text3);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text3);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00b894;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* === MAIN === */
.main {
    margin-left: 240px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page {
    display: none;
    flex: 1;
    padding: 32px;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}
.page.active { display: block; }

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

.page-title {
    font-size: 22px;
    font-weight: 700;
}

/* === HERO === */
.hero {
    position: relative;
    padding: 48px 0;
    margin-bottom: 32px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(108,92,231,0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(108,92,231,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #e8e8ed, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text2);
    font-weight: 400;
}

/* === TOOLS GRID === */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tool-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all .25s;
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(108,92,231,0.12);
}

.tool-card-bg {
    height: 100px;
    width: 100%;
    flex-shrink: 0;
}

.tool-icon {
    position: absolute;
    top: 72px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.tool-info {
    padding: 28px 20px 16px;
    flex: 1;
}

.tool-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tool-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
    margin-bottom: 12px;
}

.tool-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tool-tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--surface2);
    color: var(--text3);
    border: 1px solid var(--border);
}

.tool-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 18px;
    color: var(--text3);
    transition: all .2s;
}

.tool-card:hover .tool-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* === STATS BAR === */
.stats-bar {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--accent);
}

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

/* === ABOUT === */
.about-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.about-content p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.8;
    margin-bottom: 12px;
}

.about-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-link-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.about-link-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.about-link-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.about-link-item p {
    font-size: 12px;
    margin-bottom: 0;
}

/* === SIDEBAR OVERLAY === */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-toggle {
        display: block;
    }
    .main {
        margin-left: 0;
    }
    .page {
        padding: 20px 16px;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 26px;
    }
    .stats-bar {
        flex-direction: column;
        gap: 12px;
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
