/* ========================================
   泽宇工作室 — Professional Dark Theme
   ======================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-elevated: #22223a;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #555570;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #2a2a40;
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ---- Navbar ---- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 24px; height: 64px;
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text-primary);
}
.brand-icon {
    font-size: 24px; color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}
.brand-text {
    font-size: 20px; font-weight: 700; letter-spacing: -0.5px;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-user {
    font-size: 14px; color: var(--text-secondary);
    margin-right: 16px;
}
.nav-link {
    color: var(--text-secondary); text-decoration: none;
    font-size: 14px; font-weight: 500; padding: 8px 16px;
    border-radius: var(--radius-sm); transition: all 0.2s;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }
.btn-ghost {
    background: none; border: none; cursor: pointer;
    font-family: var(--font);
}
.nav-logout { display: inline; }

/* ---- Hero ---- */
.main-content { padding-top: 64px; }
.hero {
    position: relative; min-height: calc(100vh - 64px);
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 80px 24px;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-tagline {
    font-size: 14px; font-weight: 500;
    color: var(--accent); letter-spacing: 3px;
    text-transform: uppercase; margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(36px, 6vw, 64px); font-weight: 700;
    line-height: 1.15; letter-spacing: -1.5px;
    margin-bottom: 24px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--accent), #a78bfa, #38bdf8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 18px; color: var(--text-secondary);
    max-width: 540px; margin: 0 auto 40px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600; font-family: var(--font);
    text-decoration: none; cursor: pointer; border: none;
    transition: all 0.25s;
}
.btn-primary {
    background: var(--accent); color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent; color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent); color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}
.btn-danger {
    background: var(--danger); color: #fff;
}
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; }

/* ---- Features ---- */
.features { padding: 100px 24px; max-width: 1200px; margin: 0 auto; }
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 36px;
    transition: all 0.3s;
}
.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.feature-icon { font-size: 32px; margin-bottom: 16px; }
.feature-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.feature-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }

/* ---- Tech Stack ---- */
.tech-stack { padding: 60px 24px 100px; max-width: 1200px; margin: 0 auto; text-align: center; }
.section-title {
    font-size: 32px; font-weight: 700; margin-bottom: 40px;
    letter-spacing: -0.5px;
}
.tech-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tech-tag {
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 8px 18px; border-radius: 100px;
    font-size: 14px; color: var(--text-secondary);
    font-family: var(--mono); transition: all 0.2s;
}
.tech-tag:hover {
    border-color: var(--accent); color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

/* ---- Footer ---- */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px; text-align: center;
    color: var(--text-muted); font-size: 14px;
}
.footer-container { max-width: 1200px; margin: 0 auto; }

/* ---- Nav separator ---- */
.nav-sep {
    color: var(--border); margin: 0 4px; font-size: 14px;
}

/* ---- Account Dropdown ---- */
.nav-account { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-account-name {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 6px 10px 6px 14px;
    color: var(--text-primary); text-decoration: none;
    font-family: var(--font); font-size: 14px; transition: all 0.2s;
}
.nav-account-name:hover { border-color: var(--accent); }
.nav-account-arrow {
    background: var(--bg-card); border: 1px solid var(--border);
    border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 6px 10px; cursor: pointer; color: var(--text-muted);
    font-size: 12px; transition: all 0.2s;
}
.nav-account-arrow:hover { color: var(--accent); }
.nav-user-icon { font-size: 10px; color: var(--success); }
.nav-user { font-weight: 500; }
.nav-arrow { font-size: 10px; color: var(--text-muted); }
.account-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-sm); min-width: 180px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all 0.2s; z-index: 200;
}
.account-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
    display: block; padding: 10px 18px;
    color: var(--text-secondary); text-decoration: none;
    font-size: 14px; transition: all 0.15s; cursor: pointer;
    border: none; background: none; width: 100%;
    font-family: var(--font); text-align: left;
}
.dropdown-item:hover { color: var(--text-primary); background: rgba(99, 102, 241, 0.08); }
.dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.dropdown-form { margin: 0; }
.dropdown-logout { color: var(--danger); }
.dropdown-logout:hover { background: rgba(239, 68, 68, 0.08); }

/* Nav auth links */
.nav-auth-link { font-weight: 600 !important; }
.nav-auth-link:first-of-type { color: var(--accent) !important; }

/* ---- Profile ---- */
.profile-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 40px; max-width: 600px;
}
.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.profile-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; flex-shrink: 0;
}
.profile-meta h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.profile-role {
    display: inline-block; padding: 2px 10px; border-radius: 100px;
    font-size: 12px; font-weight: 600;
}
.profile-role.badge-admin { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.profile-role.badge-user { background: rgba(99, 102, 241, 0.15); color: var(--accent); }
.profile-details { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.detail-row {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0; font-size: 15px;
}
.detail-row label { color: var(--text-secondary); min-width: 80px; font-size: 14px; }
.detail-row span { color: var(--text-primary); }
.badge-verified { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-unverified { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-active { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-banned { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.profile-actions { display: flex; gap: 12px; }

/* ---- Sub Pages ---- */
.page-section { padding: 80px 24px; min-height: calc(100vh - 64px); }
.page-container { max-width: 960px; margin: 0 auto; }
.page-title { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.page-desc { color: var(--text-secondary); font-size: 16px; margin-bottom: 48px; }

/* ---- Works ---- */
.works-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; }
.work-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px; transition: all 0.3s;
}
.work-card:hover {
    border-color: var(--accent); transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.work-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.work-badge {
    padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600;
}
.work-badge-site { background: rgba(99, 102, 241, 0.15); color: var(--accent); }
.work-badge-ai { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.work-badge-service { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.work-badge-workflow { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.work-tech { color: var(--text-muted); font-size: 13px; font-family: var(--mono); }
.work-name { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.work-desc { color: var(--text-secondary); font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.work-tag {
    background: var(--bg-secondary); border: 1px solid var(--border);
    padding: 3px 10px; border-radius: 100px; font-size: 12px;
    color: var(--text-muted); font-family: var(--mono);
}
.work-links { display: flex; gap: 8px; align-items: center; }
.work-status-badge { font-size: 12px; }

/* ---- Blog ---- */
.blog-list { display: flex; flex-direction: column; gap: 16px; }
.blog-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); transition: all 0.2s; cursor: default;
}
.blog-card:hover { border-color: var(--accent); }
.blog-card-body { padding: 24px 28px; }
.blog-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.blog-meta .blog-tag {
    background: rgba(99, 102, 241, 0.15); color: var(--accent);
    padding: 2px 8px; border-radius: 100px; font-size: 12px; font-weight: 600;
}
.blog-meta time { color: var(--text-muted); font-size: 13px; }
.blog-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.blog-excerpt { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.blog-status {
    display: inline-block; margin-top: 12px; padding: 3px 10px; border-radius: 100px;
    font-size: 12px; background: rgba(245, 158, 11, 0.15); color: var(--warning);
}
.blog-empty-hint {
    text-align: center; padding: 48px 0; color: var(--text-muted); font-size: 14px;
}

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 48px; }
.contact-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px; text-align: center; transition: all 0.2s;
}
.contact-card:hover { border-color: var(--accent); }
.contact-icon { font-size: 28px; margin-bottom: 12px; }
.contact-card h3 { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.contact-value { font-size: 16px; font-weight: 600; margin-bottom: 4px; font-family: var(--mono); }
.contact-note { font-size: 13px; color: var(--text-muted); }
.contact-divider { border-top: 1px solid var(--border); margin-bottom: 48px; }

.contact-section h2 { font-size: 24px; font-weight: 700; margin-bottom: 28px; }
.service-list { display: flex; flex-direction: column; gap: 24px; }
.service-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 28px;
}
.service-item-header { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.service-num {
    font-size: 14px; font-weight: 700; color: var(--accent);
    font-family: var(--mono); min-width: 24px;
}
.service-item h3 { font-size: 17px; font-weight: 600; }
.service-item p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* ---- Auth Pages ---- */
.auth-body {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 100vh; background: var(--bg-primary);
}
.auth-brand { margin-bottom: 32px; }
.auth-container { width: 100%; max-width: 420px; padding: 0 24px; }
.auth-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 40px;
}
.auth-card-center { text-align: center; }
.auth-header { margin-bottom: 32px; }
.auth-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.auth-header p { color: var(--text-secondary); font-size: 15px; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
}
.form-group input {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 16px;
    color: var(--text-primary); font-size: 15px; font-family: var(--font);
    outline: none; transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-muted); }
.field-error { font-size: 13px; color: var(--danger); }
.auth-error {
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger); padding: 12px; border-radius: var(--radius-sm);
    font-size: 14px;
}
.auth-footer {
    margin-top: 24px; text-align: center;
    font-size: 14px; color: var(--text-secondary);
}
.auth-footer a { color: var(--accent); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ---- Code Row ---- */
.code-row {
    display: flex; gap: 8px; align-items: stretch;
}
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { white-space: nowrap; flex-shrink: 0; }
#sendCodeBtn:disabled {
    opacity: 0.5; cursor: not-allowed;
}

.success-icon {
    font-size: 48px; color: var(--success); margin-bottom: 16px;
}
.error-icon {
    font-size: 48px; color: var(--danger); margin-bottom: 16px;
}
.auth-card-center h1 { font-size: 24px; margin-bottom: 12px; }
.auth-card-center p { color: var(--text-secondary); margin-bottom: 24px; }

/* ---- Admin ---- */
.admin-layout {
    display: flex;
    padding-top: 64px;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 240px;
    min-height: calc(100vh - 64px);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    z-index: 50;
}
.sidebar-header {
    padding: 24px 20px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}
.sidebar-icon { font-size: 18px; color: var(--accent); }
.sidebar-title { font-size: 16px; font-weight: 700; }
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.06);
}
.sidebar-link.active {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--accent);
}
.sidebar-link-icon { font-size: 15px; width: 20px; text-align: center; }
.sidebar-footer {
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

/* Main content */
.admin-main {
    flex: 1;
    margin-left: 240px;
    min-height: calc(100vh - 64px);
}
.admin-page { padding: 32px 32px 64px; max-width: 1200px; margin: 0 auto; }
.admin-header { margin-bottom: 28px; }
.admin-header h1 { font-size: 28px; font-weight: 700; }
.admin-subtitle { color: var(--text-secondary); margin-top: 4px; font-size: 14px; }

/* Stats */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; text-align: center;
    transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-icon { font-size: 20px; margin-bottom: 8px; }
.stat-number { font-size: 32px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* Dashboard sections */
.dashboard-section { margin-bottom: 32px; }
.section-heading {
    font-size: 18px; font-weight: 600; margin-bottom: 16px;
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.action-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 24px;
    text-decoration: none; color: var(--text-primary);
    transition: all 0.2s;
}
.action-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.action-icon { font-size: 28px; color: var(--accent); }
.action-text { flex: 1; }
.action-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.action-desc { font-size: 13px; color: var(--text-secondary); }
.action-arrow { color: var(--text-muted); font-size: 18px; }

/* Info grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.info-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.info-label { font-size: 13px; color: var(--text-secondary); }
.info-value { font-size: 14px; font-weight: 600; color: var(--text-primary); font-family: var(--mono); }

/* User cell */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.user-avatar.avatar-admin { background: #a78bfa; }
.user-name { font-weight: 500; }

/* Table */
.table-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    text-align: left; padding: 14px 20px;
    font-size: 12px; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 14px 20px; font-size: 14px;
    border-bottom: 1px solid var(--border);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(99, 102, 241, 0.04); }
.email-cell { color: var(--text-secondary); font-family: var(--mono); font-size: 13px; }
.empty-cell {
    text-align: center; color: var(--text-muted);
    padding: 40px 20px !important; font-size: 14px;
}

/* Badges */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 100px;
    font-size: 12px; font-weight: 600;
}
.badge-success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-user { background: rgba(99, 102, 241, 0.15); color: var(--accent); }
.badge-admin { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }

/* Role select */
.role-select {
    background: var(--bg-secondary); border: 1px solid var(--border);
    color: var(--text-primary); padding: 4px 8px;
    border-radius: var(--radius-sm); font-family: var(--font);
    font-size: 13px; cursor: pointer; outline: none;
}
.role-select:focus { border-color: var(--accent); }
.inline-form { display: inline; }

/* Action buttons */
.action-btns { display: flex; gap: 6px; }

/* Search */
.search-box { display: flex; gap: 8px; }
.search-input {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 8px 16px;
    color: var(--text-primary); font-size: 14px; font-family: var(--font);
    outline: none; width: 240px; transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
    background: var(--accent); color: #fff; border: none;
    border-radius: var(--radius-sm); padding: 8px 16px;
    font-size: 14px; font-weight: 500; cursor: pointer;
    font-family: var(--font); transition: background 0.2s;
}
.search-btn:hover { background: var(--accent-hover); }

/* Alerts */
.alert {
    padding: 14px 20px; border-radius: var(--radius-sm);
    margin-bottom: 20px; font-size: 14px;
}
.alert-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--success); }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }

/* ---- Invitation Code Page ---- */
.generate-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
}
.generate-form {
    display: flex; align-items: flex-end; gap: 16px;
}
.generate-fields {
    display: flex; gap: 12px; flex: 1;
}
.generate-fields .form-group { flex: 0 0 auto; }
.generate-fields .form-group:first-child { flex: 0 0 120px; }
.generate-fields .form-group:last-child { flex: 1; }
.admin-input {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 10px 14px;
    color: var(--text-primary); font-size: 14px; font-family: var(--font);
    outline: none; transition: border-color 0.2s; width: 100%;
}
.admin-input:focus { border-color: var(--accent); }
.admin-input::placeholder { color: var(--text-muted); }

.section-heading-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.filter-tabs { display: flex; gap: 4px; }
.filter-tab {
    padding: 6px 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; text-decoration: none;
    color: var(--text-secondary); transition: all 0.2s;
    background: var(--bg-card); border: 1px solid var(--border);
}
.filter-tab:hover { color: var(--text-primary); border-color: var(--accent); }
.filter-tab.active {
    background: var(--accent); color: #fff; border-color: var(--accent);
}

.code-cell {
    font-family: var(--mono); font-size: 15px; font-weight: 600;
    letter-spacing: 2px; color: var(--accent);
}
.note-cell {
    color: var(--text-secondary); font-size: 13px;
    max-width: 150px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.text-muted { color: var(--text-muted); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.ban-reason { font-size: 12px; color: var(--text-muted); margin-left: 6px; }

/* Copy button in code cell */
.btn-copy-row {
    background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 2px 6px;
    font-size: 13px; cursor: pointer; margin-left: 8px;
    vertical-align: middle; transition: all 0.2s; line-height: 1.2;
}
.btn-copy-row:hover {
    border-color: var(--accent); background: rgba(99, 102, 241, 0.1);
}

/* Toast notification */
.copy-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--bg-elevated); border: 1px solid var(--accent);
    color: var(--text-primary); padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 14px; z-index: 9999; opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero { padding: 60px 20px; }
    .features-grid { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { position: static; width: 100%; min-height: auto; flex-direction: row; }
    .sidebar-header { display: none; }
    .sidebar-nav { display: flex; padding: 0; }
    .sidebar-link { padding: 12px 16px; border-left: none; border-bottom: 3px solid transparent; }
    .sidebar-link.active { border-left-color: transparent; border-bottom-color: var(--accent); }
    .sidebar-footer { display: none; }
    .admin-main { margin-left: 0; }
    .admin-page { padding: 20px 16px; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-table { font-size: 13px; }
    .admin-table th, .admin-table td { padding: 10px 12px; }
    .search-box { flex-direction: column; }
    .search-input { width: 100%; }
    .admin-header { flex-direction: column; gap: 12px; }
    .generate-form { flex-direction: column; align-items: stretch; }
    .generate-fields { flex-direction: column; }
    .generate-fields .form-group { flex: auto; }
    .section-heading-row { flex-direction: column; gap: 12px; align-items: flex-start; }
    .filter-tabs { flex-wrap: wrap; }
    .works-grid { grid-template-columns: 1fr; }
    .page-section { padding: 48px 16px; }
    .page-title { font-size: 28px; }
    .nav-links { gap: 2px; }
    .nav-sep { display: none; }
}
