/* ============================================
   🐱 fmy - Minimalist Theme
   ============================================ */

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16162a;
    --bg-glass: rgba(255, 255, 255, 0.04);
    --text-primary: #e8e8f0;
    --text-secondary: #9898b8;
    --text-muted: #666680;
    --accent: #6c9fff;
    --accent-dim: rgba(108, 159, 255, 0.15);
    --border: rgba(255, 255, 255, 0.07);
    --radius: 10px;
    --radius-lg: 14px;
    --transition: all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ==================== Navbar ==================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-container { flex-wrap: nowrap;  
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links { display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; } .nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }

.reading-progress {
    position: fixed;
    top: 64px; left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent);
    z-index: 1001;
    transition: width 0.1s;
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent-dim); }

/* ==================== Hero ==================== */
.hero {
    padding: 130px 24px 60px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.hero-subtitle { color: var(--text-secondary); font-size: 1.1rem; }

.hero-section {
    text-align: center;
    padding: 120px 24px 60px;
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* ==================== Category Filter Bar ==================== */
.category-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.category-filter-bar span {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: 0.85; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }

/* ==================== Posts Grid ==================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.post-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-cover {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.post-cover-placeholder {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    opacity: 0.2;
}

.post-category {
    position: absolute;
    top: 10px; left: 10px;
    padding: 3px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.post-content { padding: 18px; }
.post-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.post-tags { display: flex; gap: 5px; margin-left: auto; flex-wrap: wrap; }

.tag {
    padding: 2px 8px;
    background: var(--accent-dim);
    border-radius: 12px;
    font-size: 0.72rem;
    color: var(--accent);
}

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    padding: 20px 0;
}

.page-info { color: var(--text-muted); font-size: 0.88rem; }

/* ==================== Article ==================== */
.article-container { padding-top: 170px; padding-bottom: 60px; max-width: 760px; }

.article { margin-top: 80px; 
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-cover { height: 280px; background-size: cover; background-position: center; }
.article-header { padding: 28px 32px 0; }

.article-meta-top {
    display: flex;
    gap: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.article-category { color: var(--accent) !important; font-weight: 600; }

.article-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.article-content {
    padding: 28px 32px;
    font-size: 1rem;
    line-height: 1.85;
}

.article-content h1, .article-content h2, .article-content h3 {
    color: var(--text-primary);
    margin: 1.4em 0 0.7em;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.article-content h1 { font-size: 1.7rem; }
.article-content h2 { font-size: 1.4rem; }
.article-content h3 { font-size: 1.2rem; }
.article-content p { margin-bottom: 1em; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 1em; }
.article-content li { margin-bottom: 0.4em; }
.article-content code {
    background: var(--bg-secondary);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.88em;
    color: var(--accent);
}
.article-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    overflow-x: auto;
    margin-bottom: 1em;
}
.article-content pre code { background: none; padding: 0; color: var(--text-primary); }
.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 10px 18px;
    margin: 1em 0;
    background: var(--accent-dim);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
}
.article-content img { max-width: 100%; border-radius: var(--radius); margin: 1em 0; }
.article-content a { color: var(--accent); text-decoration: none; }
.article-content a:hover { text-decoration: underline; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.article-content th, .article-content td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}
.article-content th { background: var(--bg-secondary); font-weight: 600; }

/* ==================== Comments ==================== */
.comments-section { margin-top: 40px; }
.comments-section h2 { font-size: 1.3rem; margin-bottom: 20px; font-weight: 700; }
.comment-list { margin-bottom: 30px; }

.comment-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.comment-header strong { color: var(--accent); }
.comment-date { color: var(--text-muted); font-size: 0.78rem; }
.comment-content { color: var(--text-secondary); line-height: 1.7; font-size: 0.92rem; }

.comment-form-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.comment-form-container h3 { margin-bottom: 16px; font-size: 1.05rem; }

/* ==================== Cards ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 { font-size: 1.1rem; font-weight: 700; }
.card-body { padding: 24px; color: var(--text-secondary); line-height: 1.7; }

/* ==================== Links Page ==================== */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.link-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-align: center;
    transition: var(--transition);
}

.link-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.link-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
}

.link-icon img { width: 100%; height: 100%; object-fit: cover; }
.link-card h3 { font-size: 1rem; margin-bottom: 8px; }
.link-card h3 a { color: var(--text-primary); text-decoration: none; transition: var(--transition); }
.link-card h3 a:hover { color: var(--accent); }
.link-card p { color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 14px; line-height: 1.5; }

.link-btn {
    display: inline-block;
    padding: 7px 18px;
    background: var(--accent);
    color: #fff;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.link-btn:hover { opacity: 0.85; }

.apply-list { list-style: none; padding: 0; margin: 12px 0; }
.apply-list li { padding: 5px 0; color: var(--text-secondary); font-size: 0.9rem; }

/* ==================== Guestbook ==================== */
.page-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.page-content { min-width: 0; }
.page-sidebar { min-width: 0; }

.guestbook-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.guestbook-item:last-child { border-bottom: none; }

.gb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.gb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gb-content { flex: 1; min-width: 0; }

.gb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.gb-name { font-weight: 600; font-size: 0.92rem; color: var(--accent); }
.gb-time { color: var(--text-muted); font-size: 0.75rem; }
.gb-text { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; }

.gb-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--accent);
    font-size: 0.78rem;
    text-decoration: none;
}
.gb-link:hover { text-decoration: underline; }

/* ==================== About Page ==================== */
.about-content { text-align: center; }
.about-avatar { margin: 0 auto 20px; width: 88px; height: 88px; }

.avatar-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto;
}

.about-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 520px;
    margin: 0 auto 24px;
    line-height: 1.8;
}

.about-stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 32px; }
.stat-item { text-align: center; }

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}

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

.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }

.tech-tag {
    padding: 5px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.features-list { text-align: left; max-width: 480px; margin: 0 auto; }

.feature-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.feature-item:last-child { border-bottom: none; }
.feature-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.feature-item strong { display: block; font-size: 0.95rem; margin-bottom: 3px; }
.feature-item p { color: var(--text-muted); font-size: 0.82rem; }

/* ==================== Contact Page ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover { border-color: var(--accent); }
.contact-icon { font-size: 1.8rem; margin-bottom: 10px; }
.contact-card h3 { font-size: 0.9rem; margin-bottom: 8px; color: var(--text-primary); }
.contact-value { font-size: 0.82rem; color: var(--text-secondary); }
.contact-value a { color: var(--accent); text-decoration: none; }
.contact-value a:hover { text-decoration: underline; }

/* ==================== Forms ==================== */
.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ==================== Alerts ==================== */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.88rem;
}

.alert-success {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.15);
    color: #4ade80;
}

.alert-error {
    background: rgba(255, 68, 68, 0.08);
    border: 1px solid rgba(255, 68, 68, 0.15);
    color: #f87171;
}

/* ==================== Sidebar (Right) ==================== */
.sidebar-toggle {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 998;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover { border-color: var(--accent); color: var(--accent); }

.sidebar-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 80px 18px 20px;
    overflow-y: auto;
}

.sidebar.active { right: 0; }

.sidebar-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}
.sidebar-close:hover { color: var(--accent); background: var(--bg-glass); }

.sidebar-card { margin-bottom: 24px; }

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.sidebar-list { list-style: none; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.88rem;
}

.sidebar-link:hover { background: var(--bg-glass); color: var(--text-primary); }
.sidebar-link.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }

.sidebar-count {
    margin-left: auto;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.sidebar-tag {
    padding: 3px 10px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}
.sidebar-tag:hover { border-color: var(--accent); color: var(--accent); }

.stats-grid { display: flex; gap: 16px; }

.sidebar .stat-item .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

/* ==================== Footer ==================== */
.footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    padding: 0 0 28px;
}

.footer-section h3 { color: var(--text-primary); margin-bottom: 10px; font-size: 0.95rem; }
.footer-section p { color: var(--text-secondary); font-size: 0.85rem; }

.social-links { display: flex; gap: 10px; margin-top: 12px; }
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}
.social-links a:hover { border-color: var(--accent); color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 18px 0 0;
}

.visitor-count { margin-top: 6px; color: var(--text-muted); }

/* ==================== 404 ==================== */
.not-found { text-align: center; padding: 100px 24px; }
.not-found h1 { font-size: 5rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
.not-found p { color: var(--text-secondary); margin-bottom: 24px; }
.not-found a { color: var(--accent); text-decoration: none; }

/* ==================== Settings Panel ==================== */
.settings-btn {
    position: fixed;
    bottom: 130px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 997;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-btn:hover { background: var(--accent-dim); border-color: var(--accent); }

.settings-panel {
    position: fixed;
    right: -300px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    z-index: 998;
    transition: right 0.3s ease;
}
.settings-panel.open { right: 20px; }

.settings-close {
    position: absolute;
    top: 10px; right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}
.settings-close:hover { color: var(--text-primary); }
.settings-panel h3 { margin-bottom: 18px; font-size: 1rem; }

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.setting-item:last-child { border-bottom: none; }

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    transition: var(--transition);
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: var(--transition);
    border-radius: 50%;
}
input:checked + .slider {
    background: var(--accent);
    border-color: var(--accent);
}
input:checked + .slider:before {
    transform: translateX(18px);
    background-color: #fff;
}

/* ==================== Music Player ==================== */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 14px 24px;
    z-index: 996;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateY(110px);
    transition: transform 0.3s ease;
}
.music-player.visible { transform: translateY(0); }

.music-disc {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    animation: spin 3s linear infinite paused;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.music-info { flex: 1; min-width: 0; }
.music-title { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { color: var(--text-muted); font-size: 0.75rem; margin-top: 1px; }
.music-controls { display: flex; gap: 10px; flex-shrink: 0; }
.music-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: var(--transition);
}
.music-btn:hover { background: var(--accent-dim); }

/* ==================== Tables ==================== */
.table-container { overflow-x: auto; margin-top: 16px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
    font-size: 0.88rem;
}
.data-table th { background: var(--bg-secondary); font-weight: 600; color: var(--accent); }
.data-table tr:hover { background: var(--bg-glass); }

/* ==================== Empty State ==================== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3.5rem; margin-bottom: 14px; opacity: 0.4; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); }

/* ==================== Login ==================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-container { width: 100%; max-width: 380px; padding: 20px; }
.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
}
.login-logo { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.login-box h2 { color: var(--text-secondary); font-size: 1rem; margin-bottom: 24px; font-weight: 400; }
.login-form .form-group input { text-align: center; }
.login-footer { margin-top: 18px; color: var(--text-muted); font-size: 0.82rem; }

/* ==================== Admin ==================== */
.admin-page { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 250px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}
.admin-logo { font-size: 1.2rem; font-weight: 800; color: var(--accent); padding: 0 22px 20px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.admin-nav { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 0 10px; }
.admin-nav a {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.9rem;
}
.admin-nav a:hover { background: var(--bg-glass); color: var(--text-primary); }
.admin-nav a.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.admin-footer { padding: 14px 10px; border-top: 1px solid var(--border); }
.admin-main { flex: 1; margin-left: 250px; padding: 28px; min-height: 100vh; }
.admin-main h1 { font-size: 1.6rem; margin-bottom: 22px; font-weight: 800; }

/* ==================== Dashboard ==================== */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 16px 0 32px; }
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.stat-icon { font-size: 1.8rem; margin-bottom: 8px; }
.stat-value { font-size: 2.2rem; font-weight: 800; color: var(--accent); }
.stat-label { color: var(--text-muted); font-size: 0.82rem; margin-top: 3px; }

/* ==================== Post Form ==================== */
.post-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.content-editor { font-family: 'Fira Code', 'Consolas', monospace; min-height: 280px; }

/* ==================== API Docs ==================== */
.api-docs { margin-top: 36px; }
.api-docs h2 { margin-bottom: 16px; }
.api-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.api-card pre { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; overflow-x: auto; margin: 10px 0; font-size: 0.82rem; }
.api-table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.api-table th, .api-table td { padding: 9px 13px; border: 1px solid var(--border); text-align: left; font-size: 0.85rem; }
.api-table th { background: var(--bg-secondary); font-weight: 600; color: var(--accent); }
.api-table code { background: var(--accent-dim); padding: 2px 5px; border-radius: 4px; font-size: 0.82em; color: var(--accent); }

/* ==================== Helpers ==================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(108, 159, 255, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(108, 159, 255, 0.4); }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.82rem; }
.badge { padding: 2px 9px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: rgba(0, 255, 136, 0.1); color: #4ade80; }
.badge-warning { background: rgba(255, 136, 0, 0.1); color: #fb923c; }
.inline-form { display: inline; }
.actions { display: flex; gap: 7px; }

/* ==================== Responsive ==================== */
@media (max-width: 900px) {
    .page-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links a { padding: 8px 6px; font-size: 0.82rem; } .nav-logo { font-size: 1.1rem; }
    .posts-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .admin-page { flex-direction: column; }
    .admin-main { margin-left: 0; padding: 20px; }
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
    .article { margin-top: 80px; } .article-container { padding-top: 20px; }
    .about-stats { gap: 20px; }
    .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .dashboard-stats { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.8rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .article-content { padding: 20px; }
    .article-header { padding: 20px 20px 0; }
    .post-form { padding: 18px; }
    .hero { padding: 110px 16px 50px; }
    .container { padding: 0 16px; }
    .about-stats { flex-wrap: wrap; }
}