:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #fff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #333;
    --text-secondary: #666;
    --text-tertiary: #999;
    --border-color: #e9ecef;
    --border-light: #f0f0f0;
    --shadow-color: rgba(0,0,0,0.06);
    --shadow-hover: rgba(0,0,0,0.1);
    --primary-color: #667eea;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --info-color: #1890ff;
    --card-bg: #fff;
    --input-bg: #fff;
    --input-border: #e9ecef;
}

body.dark-mode {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666;
    --border-color: #333;
    --border-light: #2a2a2a;
    --shadow-color: rgba(0,0,0,0.3);
    --shadow-hover: rgba(0,0,0,0.5);
    --card-bg: #1a1a1a;
    --input-bg: #252525;
    --input-border: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; transition: background 0.3s, color 0.3s; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; color: var(--text-primary); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

.header { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100; }
.header-top { background: #f8f9fa; border-bottom: 1px solid #e9ecef; padding: 8px 0; font-size: 12px; color: #666; }
.header-top .container { display: flex; justify-content: space-between; align-items: center; }
.header-top a:hover { color: #667eea; }
.header-main { padding: 15px 0; }
.header-main .container { display: flex; align-items: center; gap: 30px; }
.logo { font-size: 28px; font-weight: bold; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.search-box { flex: 1; max-width: 600px; position: relative; }
.search-box input { width: 100%; padding: 10px 50px 10px 16px; border: 2px solid #e9ecef; border-radius: 25px; font-size: 14px; transition: border-color 0.3s; }
.search-box input:focus { outline: none; border-color: #667eea; }
.search-box button { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; background: #667eea; color: #fff; border-radius: 50%; }
.search-hot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #999; margin-top: 6px; }
.search-hot .hot-item { color: #666; }
.search-hot .hot-item:hover { color: #667eea; }
.search-hot .hot-item.hot-1 { color: #f56c6c; }
.user-actions { display: flex; align-items: center; gap: 15px; }
.user-actions a { color: #666; font-size: 14px; }
.user-actions a:hover { color: #667eea; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e9ecef; display: flex; align-items: center; justify-content: center; }
.nav { background: #fff; border-bottom: 1px solid #e9ecef; }
.nav .container { display: flex; gap: 30px; }
.nav a { padding: 12px 0; color: #333; font-size: 15px; position: relative; }
.nav a:hover, .nav a.active { color: #667eea; }
.nav a.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: #667eea; }

.banner { margin: 20px 0; border-radius: 12px; overflow: hidden; position: relative; }
.banner-slider { position: relative; height: 280px; }
.banner-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease; }
.banner-slide.active { opacity: 1; }
.banner-bg { width: 100%; height: 100%; background-size: cover; background-position: center; display: flex; align-items: center; }
.banner-bg.default-banner { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.banner-content { padding: 0 60px; color: #fff; max-width: 600px; }
.banner-content h2 { font-size: 36px; margin-bottom: 15px; font-weight: 600; }
.banner-content p { font-size: 18px; opacity: 0.9; }
.banner-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.banner-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.banner-dots .dot.active { background: #fff; width: 24px; border-radius: 5px; }
.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.3); color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; transition: background 0.3s; }
.banner-arrow:hover { background: rgba(0,0,0,0.5); }
.banner-arrow.prev { left: 20px; }
.banner-arrow.next { right: 20px; }

.section { margin: 30px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-title { font-size: 20px; font-weight: 600; color: #333; }
.section-more { color: #999; font-size: 14px; }
.section-more:hover { color: #667eea; }

.category-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 15px; }
.category-item { background: #fff; border-radius: 12px; padding: 20px; text-align: center; transition: all 0.3s; cursor: pointer; }
.category-item:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.category-icon { width: 50px; height: 50px; margin: 0 auto 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; }
.category-name { font-size: 14px; color: #333; }

.app-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.app-card { background: #fff; border-radius: 12px; overflow: hidden; transition: all 0.3s; cursor: pointer; }
.app-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.app-icon { width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 40px; }
.app-info { padding: 15px; }
.app-title { font-size: 15px; font-weight: 500; color: #333; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-desc { font-size: 12px; color: #999; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #666; }
.app-rating { color: #f5a623; }
.app-price { color: #667eea; font-weight: 600; }
.app-price.free { color: #67c23a; }
.app-badge { display: inline-block; padding: 2px 6px; font-size: 10px; border-radius: 3px; margin-right: 4px; }
.badge-hot { background: #fef0f0; color: #f56c6c; }
.badge-new { background: #f0f9eb; color: #67c23a; }
.badge-recommend { background: #ecf5ff; color: #409eff; }

.tabs { display: flex; gap: 20px; border-bottom: 2px solid #e9ecef; margin-bottom: 20px; }
.tab { padding: 10px 0; cursor: pointer; color: #666; font-size: 15px; position: relative; }
.tab.active { color: #667eea; font-weight: 500; }
.tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #667eea; }

.list-item { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 15px; display: flex; gap: 15px; align-items: center; }
.list-item .app-icon { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; }
.list-item .app-info { flex: 1; }
.download-btn { padding: 8px 20px; background: #667eea; color: #fff; border-radius: 20px; font-size: 14px; transition: all 0.3s; }
.download-btn:hover { background: #5a67d8; }
.download-btn.free { background: #67c23a; }
.download-btn.free:hover { background: #5daf34; }

.sidebar { width: 280px; }
.main-content { flex: 1; }
.two-col { display: flex; gap: 20px; }

.card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }

.rank-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.rank-item:last-child { border-bottom: none; }
.rank-num { width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; background: #f0f0f0; color: #999; }
.rank-num.top-1 { background: #f56c6c; color: #fff; }
.rank-num.top-2 { background: #e6a23c; color: #fff; }
.rank-num.top-3 { background: #67c23a; color: #fff; }
.rank-app { flex: 1; font-size: 14px; }
.rank-app:hover { color: #667eea; }

.footer { background: #fff; padding: 30px 0; margin-top: 40px; border-top: 1px solid #e9ecef; }
.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 20px; }
.footer-links h4 { font-size: 15px; margin-bottom: 15px; color: #333; }
.footer-links a { display: block; color: #666; font-size: 13px; padding: 5px 0; }
.footer-links a:hover { color: #667eea; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #f0f0f0; color: #999; font-size: 12px; }

.btn { display: inline-block; padding: 10px 24px; background: #667eea; color: #fff; border-radius: 6px; font-size: 14px; transition: all 0.3s; }
.btn:hover { background: #5a67d8; }
.btn-outline { background: #fff; border: 1px solid #ddd; color: #666; }
.btn-outline:hover { border-color: #667eea; color: #667eea; }
.btn-success { background: #67c23a; }
.btn-success:hover { background: #5daf34; }
.btn-danger { background: #f56c6c; }
.btn-danger:hover { background: #f04e4e; }
.btn-sm { padding: 6px 16px; font-size: 12px; }

.pagination { display: flex; justify-content: center; gap: 8px; margin: 30px 0; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid #ddd; border-radius: 4px; color: #666; font-size: 14px; }
.pagination a:hover { border-color: #667eea; color: #667eea; }
.pagination .current { background: #667eea; color: #fff; border-color: #667eea; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #333; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color 0.3s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.form-group textarea { resize: vertical; min-height: 100px; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-info { background: #d1ecf1; color: #0c5460; }

.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.topic-card { background: #fff; border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.3s; }
.topic-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.topic-cover { height: 120px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 600; }
.topic-info { padding: 15px; }
.topic-title { font-size: 15px; font-weight: 500; margin-bottom: 5px; }
.topic-desc { font-size: 12px; color: #999; }

.breadcrumb { padding: 15px 0; font-size: 14px; color: #666; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #667eea; }
.breadcrumb .sep { margin: 0 8px; color: #ccc; }

.app-detail-header { background: #fff; border-radius: 12px; padding: 30px; margin-bottom: 20px; }
.app-detail-top { display: flex; gap: 30px; align-items: flex-start; }
.app-detail-icon { width: 120px; height: 120px; border-radius: 24px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 60px; flex-shrink: 0; }
.app-detail-info { flex: 1; }
.app-detail-title { font-size: 28px; font-weight: 600; margin-bottom: 10px; }
.app-detail-desc { color: #666; margin-bottom: 15px; }
.app-detail-meta { display: flex; gap: 20px; font-size: 14px; color: #666; margin-bottom: 20px; }
.app-detail-actions { display: flex; gap: 15px; }

.app-detail-section { background: #fff; border-radius: 12px; padding: 25px; margin-bottom: 20px; }
.app-detail-section h3 { font-size: 18px; margin-bottom: 15px; }

.screenshot-list { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; }
.screenshot-item { flex-shrink: 0; width: 200px; height: 300px; background: #f5f5f5; border-radius: 8px; }

.review-item { padding: 20px 0; border-bottom: 1px solid #f0f0f0; }
.review-item:last-child { border-bottom: none; }
.review-header { display: flex; gap: 12px; margin-bottom: 12px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; background: #e9ecef; }
.review-user { flex: 1; }
.review-username { font-weight: 500; margin-bottom: 4px; }
.review-time { font-size: 12px; color: #999; }
.review-rating { color: #f5a623; }
.review-content { color: #333; line-height: 1.6; }
.review-actions { display: flex; gap: 20px; margin-top: 10px; font-size: 13px; color: #999; }
.review-actions span { cursor: pointer; }
.review-actions span:hover { color: #667eea; }
.developer-reply { background: #f8f9fa; padding: 12px; border-radius: 8px; margin-top: 10px; font-size: 13px; }
.developer-reply .reply-label { color: #667eea; font-weight: 500; margin-bottom: 5px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 12px; background: #f0f0f0; border-radius: 16px; font-size: 12px; color: #666; }
.tag:hover { background: #667eea; color: #fff; }

.rating-stars { color: #f5a623; }
.rating-bar { display: flex; align-items: center; gap: 10px; }
.rating-bar-bg { flex: 1; height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.rating-bar-fill { height: 100%; background: #f5a623; border-radius: 4px; }

.dev-info { display: flex; align-items: center; gap: 15px; padding: 15px; background: #f8f9fa; border-radius: 8px; }
.dev-avatar { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.dev-name { font-weight: 500; }
.dev-certified { color: #67c23a; font-size: 12px; }

.user-sidebar { width: 200px; background: #fff; border-radius: 12px; padding: 20px; flex-shrink: 0; }
.user-sidebar .user-info { text-align: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.user-sidebar .user-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; }
.user-sidebar .user-name { font-weight: 600; margin-bottom: 5px; }
.user-sidebar .user-level { font-size: 12px; color: #f5a623; }
.user-menu a { display: block; padding: 10px 15px; color: #666; border-radius: 6px; margin-bottom: 5px; }
.user-menu a:hover, .user-menu a.active { background: #f0f0ff; color: #667eea; }

.admin-layout { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar { width: 220px; background: #001529; color: #fff; flex-shrink: 0; }
.admin-sidebar .logo { padding: 20px; text-align: center; font-size: 18px; border-bottom: 1px solid #1f2d3d; }
.admin-menu { padding: 10px 0; }
.admin-menu .menu-group { padding: 10px 20px; font-size: 12px; color: #8c8c8c; }
.admin-menu a { display: block; padding: 10px 20px; color: #fff; opacity: 0.85; }
.admin-menu a:hover, .admin-menu a.active { background: #1890ff; opacity: 1; }
.admin-main { flex: 1; background: #f0f2f5; }
.admin-header { background: #fff; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.admin-content { padding: 20px; }
.admin-card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.admin-card h3 { font-size: 16px; margin-bottom: 15px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; }
.stat-card .stat-value { font-size: 28px; font-weight: 600; margin-bottom: 5px; }
.stat-card .stat-label { color: #999; font-size: 14px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; font-weight: 500; color: #666; font-size: 13px; }
td { font-size: 14px; }
tr:hover { background: #fafafa; }

.modal { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.45); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 1000; 
    animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-content { 
    background: #fff; 
    border-radius: 12px; 
    width: 500px; 
    max-width: 90%; 
    max-height: 90vh; 
    overflow-y: auto; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: modalSlideUp 0.25s ease;
    overflow: hidden;
}
.modal-header { 
    padding: 20px 24px; 
    border-bottom: 1px solid #f0f0f0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 17px; 
    font-weight: 600;
    background: linear-gradient(135deg, #f6f8ff 0%, #fff 100%);
}
.modal-header .close-btn {
    cursor: pointer;
    color: #bfbfbf;
    font-size: 22px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: none;
    border: none;
}
.modal-header .close-btn:hover {
    background: #f5f5f5;
    color: #595959;
}
.modal-body { 
    padding: 24px; 
}
.modal-footer { 
    padding: 16px 24px; 
    border-top: 1px solid #f0f0f0; 
    text-align: right; 
    background: #fafafa;
}
.modal-footer .btn { 
    margin-left: 10px; 
    min-width: 80px;
}
.modal-tip {
    padding: 10px 14px;
    background: #e6f4ff;
    border-radius: 6px;
    font-size: 13px;
    color: #1677ff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.modal-form-group {
    margin-bottom: 20px;
}
.modal-form-group:last-child {
    margin-bottom: 0;
}
.modal-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}
.modal-form-group input[type="text"],
.modal-form-group input[type="number"],
.modal-form-group select,
.modal-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d9d9d9;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s;
    box-sizing: border-box;
}
.modal-form-group input[type="text"]:hover,
.modal-form-group input[type="number"]:hover,
.modal-form-group select:hover,
.modal-form-group textarea:hover {
    border-color: #4096ff;
}
.modal-form-group input[type="text"]:focus,
.modal-form-group input[type="number"]:focus,
.modal-form-group select:focus,
.modal-form-group textarea:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22,119,255,0.1);
}

.auth-box { background: #fff; border-radius: 12px; padding: 40px; width: 400px; max-width: 90%; }
.auth-box h2 { text-align: center; margin-bottom: 30px; }
.auth-tabs { display: flex; margin-bottom: 30px; border-bottom: 1px solid #f0f0f0; }
.auth-tab { flex: 1; text-align: center; padding: 12px; cursor: pointer; color: #666; position: relative; }
.auth-tab.active { color: #667eea; font-weight: 500; }
.auth-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: #667eea; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: #666; }
.auth-footer a { color: #667eea; }

.page-header { background: #fff; padding: 20px 0; margin-bottom: 20px; }
.page-title { font-size: 24px; font-weight: 600; }

.filter-bar { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-item label { color: #666; font-size: 14px; }
.filter-item select { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }

body.dark-mode .card,
body.dark-mode .app-card,
body.dark-mode .auth-box,
body.dark-mode .stat-card,
body.dark-mode .admin-card,
body.dark-mode .modal-content,
body.dark-mode .page-header { background: var(--bg-secondary); }

body.dark-mode .app-title,
body.dark-mode .section-title,
body.dark-mode .category-name { color: var(--text-primary); }

body.dark-mode .app-desc,
body.dark-mode .stat-label,
body.dark-mode .section-more,
body.dark-mode .app-meta { color: var(--text-secondary); }

body.dark-mode th { background: var(--bg-tertiary); color: var(--text-secondary); }
body.dark-mode td { border-bottom-color: var(--border-light); }
body.dark-mode tr:hover { background: var(--bg-tertiary); }

body.dark-mode .header { background: var(--bg-secondary); }
body.dark-mode .header-top { background: var(--bg-tertiary); border-bottom-color: var(--border-color); }
body.dark-mode .nav { background: var(--bg-secondary); border-bottom-color: var(--border-color); }
body.dark-mode .search-box input { background: var(--input-bg); border-color: var(--input-border); color: var(--text-primary); }

body.dark-mode .app-detail-section h3 { color: var(--text-primary); }
body.dark-mode .list-item { border-bottom-color: var(--border-light); }
body.dark-mode .user-sidebar .user-info { background: var(--bg-secondary); }
body.dark-mode .user-menu a { color: var(--text-primary); }
body.dark-mode .user-menu a:hover { background: var(--bg-tertiary); }
body.dark-mode .user-menu a.active { background: var(--primary-color); color: #fff; }

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

body.dark-mode .btn-outline {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .app-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: repeat(4, 1fr); }
    .two-col { flex-direction: column; }
    .sidebar { width: 100%; }
    .nav .container { gap: 15px; overflow-x: auto; }
    .topic-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
