/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #fafbfc; 
    color: #1a1a2e; 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased; 
    text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* Header */
.site-header { 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 2rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.header-container { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }

/* Logo */
.logo { 
    color: #1a1a2e; 
    font-size: 1.5rem; 
    font-weight: 700; 
    text-decoration: none; 
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, serif;
}
.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.logo span { 
    background: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.main-nav { display: flex; gap: 0.5rem; align-items: center; }
.main-nav a { 
    color: #4b5563; 
    text-decoration: none; 
    font-size: 0.95rem; 
    font-weight: 500;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    transition: all 0.25s ease;
}
.main-nav a:hover { 
    color: #1a1a2e; 
    background: rgba(0, 102, 255, 0.06);
}
.main-nav a.active { 
    color: #0066ff; 
    background: rgba(0, 102, 255, 0.08);
    font-weight: 600;
}

/* Search Box */
.search-box { 
    display: flex; 
    align-items: center;
    gap: 0.5rem; 
    background: #f3f4f6;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    transition: all 0.25s ease;
}
.search-box:focus-within {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}
.search-box input { 
    padding: 0.5rem 0.5rem; 
    border: none; 
    background: transparent;
    font-size: 0.9rem; 
    width: 200px;
    outline: none;
    color: #1a1a2e;
}
.search-box input::placeholder {
    color: #9ca3af;
}
.search-box button { 
    padding: 0.5rem 1rem; 
    background: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    border: none; 
    border-radius: 8px; 
    color: #fff; 
    cursor: pointer; 
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}
.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #4b5563;
    transition: all 0.2s;
}
.mobile-menu-btn:active {
    background: #e5e7eb;
    transform: scale(0.95);
}

/* Mobile Menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    max-width: 80%;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.mobile-menu-panel.active {
    right: 0;
}
.mobile-menu-header {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.mobile-menu-close:active { color: #374151; }
.mobile-menu-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}
.mobile-menu-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    color: #374151;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.mobile-menu-nav a:active {
    background: #f9fafb;
    border-left-color: #0066ff;
    color: #0066ff;
}
.mobile-menu-nav a.active {
    border-left-color: #0066ff;
    color: #0066ff;
    background: rgba(0, 102, 255, 0.05);
}
.mobile-menu-nav .menu-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}
.mobile-menu-search {
    padding: 1rem;
    border-top: 1px solid #f3f4f6;
}
.mobile-menu-search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
}
.mobile-menu-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
}
.mobile-menu-search-box button {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #0066ff, #00d4ff);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Main content */
main { min-height: calc(100vh - 200px); }

/* Back to top button */
.back-to-top {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,102,255,0.3);
    z-index: 999;
    font-size: 1.2rem;
    transition: all 0.3s;
}
.back-to-top:hover {
    transform: translateY(-2px);
}

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

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header .subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0066ff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}
.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a2e;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, serif;
}

/* Card Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}
.btn-primary {
    background: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 102, 255, 0.4);
}
.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .site-header { padding: 0.6rem 1rem; }
    .header-container { flex-wrap: nowrap; gap: 0.5rem; }
    .main-nav { display: none; }
    .search-box { display: none; }
    .user-info-desktop { display: none !important; }
    .logo { font-size: 1.1rem; }
    .logo-icon { width: 32px; height: 32px; font-size: 1rem; }
    .mobile-menu-btn { display: flex; }
    .container { padding: 0 1rem; }
    .section-header h2 { font-size: 1.8rem; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-gradient {
    background: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hidden { display: none !important; }
.visible { display: block !important; }
