:root {
    --bg-primary: #08080c;
    --bg-secondary: #0e0e14;
    --bg-tertiary: #16161e;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a24;
    --text-primary: #eaeaf0;
    --text-secondary: #9898b0;
    --text-muted: #4e4e68;
    --accent: #e8622b;
    --accent-hover: #ff8040;
    --accent-glow: rgba(232, 98, 43, 0.35);
    --accent-dim: rgba(232, 98, 43, 0.07);
    --accent-subtle: rgba(232, 98, 43, 0.45);
    --ember-1: #ff4500;
    --ember-2: #e8622b;
    --ember-3: #ff9a5c;
    --border: #1e1e2a;
    --border-hover: #2e2e40;
    --success: #34d058;
    --warning: #f0a020;
    --danger: #ea4a5a;
    --info: #58a6ff;
    --radius: 12px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
    --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--accent-hover); }

::selection {
    background: var(--accent);
    color: #fff;
}

code, pre {
    font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
    font-size: 0.88em;
}

code {
    background: var(--accent-dim);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    color: var(--accent);
    border: 1px solid rgba(232, 98, 43, 0.12);
}

pre {
    background: var(--bg-tertiary);
    padding: 1.2rem;
    border-radius: var(--radius);
    overflow-x: auto;
    border: 1px solid var(--border);
    line-height: 1.5;
}

pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--text-primary);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ====== Scrollbar ====== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ====== Navbar ====== */
.navbar {
    background: rgba(14, 14, 20, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s var(--ease);
}

.navbar.scrolled {
    background: rgba(14, 14, 20, 0.92);
    box-shadow: 0 1px 20px rgba(0,0,0,0.4);
}

.navbar-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 1.5rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.01em;
    position: relative;
}

.brand-icon {
    font-size: 1.5rem;
    display: inline-block;
    animation: emberPulse 2s ease-in-out infinite;
}

@keyframes emberPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.15); filter: brightness(1.3); }
}

.navbar-search {
    flex: 1;
    max-width: 380px;
}

.navbar-search form {
    display: flex;
    gap: 0;
}

.navbar-search input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 0.45rem 0.9rem;
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.25s var(--ease);
}

.navbar-search input::placeholder { color: var(--text-muted); }
.navbar-search input:focus {
    border-color: var(--accent-subtle);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.navbar-search button {
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.45rem 1rem;
    color: #fff;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s var(--ease);
}

.navbar-search button:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 16px var(--accent-glow);
}

.navbar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
}

.navbar-menu {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    white-space: nowrap;
    transition: all 0.25s var(--ease);
    position: relative;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: all 0.25s var(--ease);
    transform: translateX(-50%);
}

.navbar-menu a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

.navbar-menu a:hover::after {
    width: 60%;
}

@media (max-width: 768px) {
    .navbar-toggle { display: block; }
    .navbar-search { display: none; }
    .navbar-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 0.8rem;
        animation: slideDown 0.3s var(--ease-out);
    }
    .navbar-menu.active { display: flex; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== Hero ====== */
.hero {
    text-align: center;
    padding: 6rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, rgba(232, 98, 43, 0.08) 40%, transparent 70%);
    pointer-events: none;
    animation: heroGlow 6s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.3; transform: translateX(-50%) scale(1); }
    100% { opacity: 0.5; transform: translateX(-50%) scale(1.1); }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='30' cy='30' r='0.5' fill='%23ffffff' opacity='0.03'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23g)' width='60' height='60'/%3E%3C/svg%3E");
    pointer-events: none;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.03em;
    position: relative;
    animation: heroTitle 0.8s var(--ease-out) both;
}

@keyframes heroTitle {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 span {
    background: linear-gradient(135deg, #fff 0%, var(--accent) 50%, var(--ember-3) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero .hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    position: relative;
    animation: heroTitle 0.8s var(--ease-out) 0.15s both;
}

.hero-search {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    animation: heroTitle 0.8s var(--ease-out) 0.3s both;
}

.hero-search::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), transparent 40%, transparent 60%, var(--ember-3));
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    z-index: -1;
}

.hero-search:focus-within::before {
    opacity: 0.6;
}

.hero-search input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 0.85rem 1.3rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s var(--ease);
}

.hero-search input::placeholder { color: var(--text-muted); }
.hero-search input:focus {
    border-color: var(--accent-subtle);
    background: var(--bg-card);
}

.hero-search button {
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.85rem 2rem;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s var(--ease);
}

.hero-search button:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 24px var(--accent-glow);
}

/* ====== Sections ====== */
.section {
    padding: 2rem 0;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 1px;
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ====== Quick Nav ====== */
.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.quick-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    transition: all 0.3s var(--ease);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.quick-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.quick-nav-item:hover::before {
    opacity: 1;
}

.quick-nav-item:hover {
    border-color: var(--accent-subtle);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 98, 43, 0.08), 0 0 0 1px var(--accent-dim);
    color: var(--text-primary);
}

.quick-nav-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border: 1px solid rgba(232, 98, 43, 0.1);
    border-radius: 10px;
    transition: all 0.3s var(--ease);
    position: relative;
    z-index: 1;
}

.quick-nav-item:hover .quick-nav-icon {
    background: rgba(232, 98, 43, 0.12);
    border-color: var(--accent-subtle);
    transform: scale(1.05);
}

.quick-nav-info {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.quick-nav-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-pill {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
}

.filter-pill.active,
.filter-pill:hover {
    color: var(--text-primary);
    border-color: var(--accent-subtle);
    background: var(--accent-dim);
}

.item-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.9rem;
}

.item-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    color: var(--text-primary);
    transition: all 0.25s var(--ease);
}

.item-card:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
    border-color: var(--accent-subtle);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.item-card-type,
.item-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(232, 98, 43, 0.15);
    font-size: 0.76rem;
    margin-bottom: 0.75rem;
}

.item-card h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.item-card-code {
    font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 0.45rem;
}

.item-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.item-card-meta {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.item-detail-layout {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.item-overview-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.item-image-placeholder {
    min-height: 240px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(232, 98, 43, 0.08), rgba(255, 255, 255, 0.01));
    border: 1px dashed var(--border-hover);
    overflow: hidden;
}

.item-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-image-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    gap: 0.35rem;
}

.item-image-empty span {
    font-size: 2rem;
}

.item-summary {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.item-meta-grid,
.item-attribute-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.item-meta-card,
.item-attribute-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 0.95rem;
}

.item-meta-card span,
.item-attribute-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.item-meta-card strong,
.item-attribute-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

.item-attribute-parts {
    margin: 0;
    padding-left: 1rem;
    color: var(--text-primary);
}

.item-attribute-parts li {
    line-height: 1.55;
    margin: 0.2rem 0;
}

@media (max-width: 900px) {
    .item-overview-card {
        grid-template-columns: 1fr;
    }
}

.quick-nav-info p {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ====== Card grid ====== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem;
    transition: all 0.3s var(--ease);
    display: block;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.card:hover::after {
    opacity: 1;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
    display: block;
    transition: transform 0.3s var(--ease-bounce);
}

.card:hover .card-icon {
    transform: scale(1.15) rotate(-3deg);
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.card-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.6rem;
}

/* ====== Page list ====== */
.page-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.65rem;
}

.page-list-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    color: var(--text-primary);
    transition: all 0.3s var(--ease);
    gap: 0.2rem;
    position: relative;
}

.page-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transform: scaleY(0);
    transition: all 0.3s var(--ease);
}

.page-list-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateX(2px);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.page-list-item:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

.page-list-title {
    font-weight: 600;
    font-size: 0.98rem;
}

.page-list-summary {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
}

.page-list-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: auto;
    padding-top: 0.4rem;
}

/* ====== Breadcrumb ====== */
.breadcrumb {
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.2s var(--ease);
}

.breadcrumb a:hover { color: var(--accent); }

/* ====== Article ====== */
.wiki-article {
    padding: 0.5rem 0 3rem;
    max-width: 860px;
    animation: fadeInUp 0.5s var(--ease-out) 0.1s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-header h1 {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.8rem;
}

.article-content {
    line-height: 1.85;
    font-size: 0.98rem;
}

.article-content h1, .article-content h2, .article-content h3,
.article-content h4, .article-content h5, .article-content h6 {
    margin: 2em 0 0.6em;
    font-weight: 600;
    color: var(--text-primary);
    scroll-margin-top: 80px;
}

.article-content h1 { font-size: 1.7rem; }
.article-content h2 {
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.35em;
    position: relative;
}
.article-content h3 { font-size: 1.2rem; }

.article-content h1:first-child, .article-content h2:first-child {
    margin-top: 0;
}

.article-content p {
    margin: 0.8em 0;
}

.article-content ul, .article-content ol {
    margin: 0.8em 0;
    padding-left: 1.8em;
}

.article-content li {
    margin: 0.35em 0;
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.7em 1.2em;
    margin: 1.2em 0;
    background: var(--accent-dim);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
}

.article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.2em 0;
    font-size: 0.92rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-content th, .article-content td {
    border: none;
    padding: 0.65em 1em;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-content th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content tr:nth-child(even) {
    background: rgba(255,255,255,0.01);
}

.article-content tr:hover {
    background: var(--accent-dim);
}

.article-content img {
    max-width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: block;
    margin: 1.2em auto;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s var(--ease);
}

.article-content img:hover {
    box-shadow: var(--shadow-lg);
    transform: scale(1.01);
}

.article-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 2.5em 0;
}

.article-content a {
    border-bottom: 1px solid var(--accent-dim);
    transition: border-color 0.2s var(--ease);
}

.article-content a:hover {
    border-bottom-color: var(--accent);
}

/* ====== Search ====== */
.search-info {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ====== Empty state ====== */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    animation: fadeInUp 0.6s var(--ease-out);
}

.empty-state h1 {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* ====== Flash ====== */
.flash-messages {
    margin: 1rem 0;
    position: relative;
    z-index: 10;
}

.flash {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    border: 1px solid;
    animation: flashIn 0.4s var(--ease-bounce);
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.flash-success { background: rgba(52,208,88,0.06); border-color: rgba(52,208,88,0.3); color: var(--success); }
.flash-danger { background: rgba(234,74,90,0.06); border-color: rgba(234,74,90,0.3); color: var(--danger); }
.flash-warning { background: rgba(240,160,32,0.06); border-color: rgba(240,160,32,0.3); color: var(--warning); }
.flash-info { background: rgba(88,166,255,0.06); border-color: rgba(88,166,255,0.3); color: var(--info); }

/* ====== Buttons ====== */
.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
    transition: all 0.25s var(--ease);
    font-family: var(--font);
    text-decoration: none;
    line-height: 1.5;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

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

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover { opacity: 0.85; color: #fff; }

.btn-sm { padding: 0.25rem 0.65rem; font-size: 0.8rem; }
.btn-block { display: block; width: 100%; }

.btn-group {
    display: flex;
    gap: 0.3rem;
}

/* ====== Footer ====== */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    background: var(--bg-secondary);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

/* ====== Forms ====== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-subtle);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ====== Floating particles ====== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.1; }
    100% { opacity: 0; transform: translateY(-20px) scale(1); }
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero { padding: 3rem 0 2rem; }
    .quick-nav-grid { grid-template-columns: 1fr; }
    .page-list { grid-template-columns: 1fr; }
}
