/*
Theme Name: AstroHub
Theme URI: https://astrohub.cz
Author: David Pěkník
Author URI: https://astrohub.cz
Description: AstroHub.cz Official theme 2026 - Premium Deep Space Classic Theme
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 2.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astrohub
Tags: astronomy, dark, premium
*/

/* RESET & VARIABLES */
:root {
    --bg-color: #050a15;
    --text-color: #f8fafc;
    --muted-color: #94a3b8;
    --accent-color: #3b82f6;
    --accent-glow: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
    --glass-bg: rgba(13, 21, 38, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    --radius-pill: 999px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.container { max-width: 1800px; margin: 0 auto; padding: 0 48px; }

/* UTILITIES */
.is-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    text-align: center;
}
.btn-primary { background: var(--accent-glow); color: #fff; }
.btn-outline { background: transparent; border-color: var(--glass-border); color: var(--text-color); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4); }
.btn-outline:hover { border-color: var(--accent-color); color: var(--accent-color); background: transparent; }
.btn-large { padding: 16px 40px; font-size: 1.1rem; }
.btn-full { width: 100%; padding: 16px; margin-top: 16px; }

/* HEADER */
.header-floating {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 64px);
    max-width: 1760px;
    z-index: 10000;
    border-radius: var(--radius-pill);
    padding: 12px 32px 12px 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    box-shadow: var(--shadow);
}
body.admin-bar .header-floating {
    top: calc(24px + 32px); /* Base top + Desktop Admin Bar height */
}

.header-left { justify-self: start; display: flex; align-items: center; }
.header-center { justify-self: center; }
.header-right { justify-self: end; display: flex; align-items: center; gap: 16px; }

.logo-link img { display: block; max-height: 48px; width: auto; }

.mobile-menu-toggle { display: none; background: none; border: none; color: var(--text-color); cursor: pointer; padding: 8px; margin-left: 8px; }

/* NAVIGATION */
.main-nav ul { list-style: none; display: flex; gap: 32px; align-items: center; }
.main-nav > ul > li > a { font-size: 0.95rem; font-weight: 500; opacity: 0.8; padding: 12px 0; display: block; }
.main-nav > ul > li > a:hover { opacity: 1; color: var(--text-color); }

/* DROPDOWNS */
.has-dropdown { position: relative; }
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(13, 21, 38, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow);
}
.has-dropdown:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown li a {
    padding: 10px 24px;
    display: block;
    white-space: nowrap;
    opacity: 0.75;
    font-size: 0.95rem;
}
.dropdown li a:hover { opacity: 1; background: rgba(255,255,255,0.05); color: var(--accent-color); }

/* SUB-DROPDOWN */
.dropdown .has-dropdown { position: relative; }
.sub-dropdown {
    top: 0;
    left: 100%;
    transform: translateX(15px);
}
.dropdown .has-dropdown:hover > .sub-dropdown {
    transform: translateX(0);
}

/* SEARCH */
.search-wrapper { display: flex; align-items: center; position: relative; }
.search-icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s;
    padding: 8px;
    z-index: 2;
}
.search-icon-btn:hover { opacity: 1; color: var(--accent-color); }
.search-input {
    position: absolute;
    right: 0;
    width: 0;
    padding: 0;
    border: none;
    background: rgba(0,0,0,0.4);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    color: #fff;
    opacity: 0;
    transition: all 0.3s ease;
    font-family: inherit;
    z-index: 1;
    height: 40px;
}
.search-wrapper.is-active .search-input {
    width: 220px;
    padding: 0 44px 0 16px;
    border-color: var(--glass-border);
    opacity: 1;
}
.search-input:focus { outline: none; border-color: var(--accent-color); }

/* AUTH BUTTONS & LOGGED IN STATE */
.auth-wrapper { display: flex; align-items: center; }
.auth-buttons { display: flex; gap: 12px; }
.logged-in-user { position: relative; display: flex; align-items: center; }
.user-avatar-btn { display: block; border-radius: 50%; overflow: hidden; border: 2px solid transparent; transition: border-color 0.3s ease; }
.user-avatar-btn:hover { border-color: var(--accent-color); }
.header-avatar { width: 40px; height: 40px; display: block; object-fit: cover; border-radius: 50%; }
.user-dropdown { right: 0; left: auto; transform: translateX(0) translateY(15px); min-width: 200px; }
.logged-in-user:hover > .user-dropdown { transform: translateX(0) translateY(0); }

/* MODAL */
.astro-modal {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.astro-modal.is-active { opacity: 1; pointer-events: auto; }
.astro-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); }
.astro-modal-content {
    position: relative; z-index: 1; width: 100%; max-width: 440px; padding: 48px;
    transform: translateY(20px); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center; border-radius: 24px;
}
.astro-modal.is-active .astro-modal-content { transform: translateY(0); }
.astro-modal-close {
    position: absolute; top: 16px; right: 24px; background: none; border: none;
    color: #fff; font-size: 32px; cursor: pointer; opacity: 0.6; transition: opacity 0.2s;
}
.astro-modal-close:hover { opacity: 1; }
.astro-form-input {
    width: 100%; box-sizing: border-box; padding: 14px 16px; margin-bottom: 16px;
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.4); color: #fff; font-family: inherit; font-size: 1rem; transition: border-color 0.3s;
}
.astro-form-input:focus { outline: none; border-color: var(--accent-color); }
.astro-modal h3 { font-size: 2.2rem; font-weight: 900; margin-bottom: 12px; }

/* HERO */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 100px; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: -2; }
.hero-overlay { position: absolute; inset: 0; background: rgba(5, 10, 21, 0.65); z-index: -1; }
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; text-align: center; }
.eyebrow { display: block; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.25em; text-transform: uppercase; color: #a855f7; margin-bottom: 24px; }
.hero h1 { font-size: clamp(3rem, 6vw, 5rem); font-weight: 900; line-height: 1.1; margin-bottom: 32px; }
.hero p { font-size: 1.25rem; color: var(--muted-color); margin-bottom: 48px; }
.hero-actions { display: flex; gap: 20px; justify-content: center; }

/* FOOTER */
.site-footer { padding: 64px 0; border-top: 1px solid var(--glass-border); margin-top: 64px; text-align: center; color: var(--muted-color); font-size: 0.9rem; }

/* LAYOUTS & SECTIONS */
.section-padding { padding: 120px 0; }
.bg-surface { background-color: rgba(13, 21, 38, 0.4); border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header h2 { font-size: 2.8rem; font-weight: 900; margin-bottom: 16px; }
.section-header p { color: var(--muted-color); font-size: 1.15rem; max-width: 800px; margin: 0 auto; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }

/* FEATURES GRID (5 items asymmetric) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 32px;
}
.feature-large { grid-column: span 3; }
.feature-small { grid-column: span 2; }

/* BENTO GRID */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 24px;
}
.bento-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #000;
}
.bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8);
    z-index: 10;
}
.bento-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.8s ease;
}
.bento-card:hover img {
    transform: scale(1.08);
}
.bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,10,21,0.95) 0%, rgba(5,10,21,0.4) 50%, transparent 100%);
    z-index: 2;
}
.bento-card-content {
    position: relative;
    z-index: 3;
}
.bento-card h3 { font-size: 1.8rem; margin-bottom: 8px; color: #fff; line-height: 1.1; }
.bento-card .card-action { color: var(--accent-color); font-weight: 700; font-size: 0.95rem; transition: transform 0.3s; }
.bento-card:hover .card-action { transform: translateX(5px); }

/* BENTO CARD SIZES */
.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-wide { grid-column: span 2; grid-row: span 1; }
.bento-tall { grid-column: span 1; grid-row: span 2; }
.bento-small { grid-column: span 1; grid-row: span 1; }

/* CARDS */
.card {
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(13, 21, 38, 0.4) 0%, rgba(13, 21, 38, 0.8) 100%);
}
.card::before {
    content: ''; position: absolute; inset: 0; z-index: 0; border-radius: 24px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); transition: box-shadow 0.4s ease; pointer-events: none;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(180deg, rgba(13, 21, 38, 0.6) 0%, rgba(5, 10, 21, 0.9) 100%);
}
.card:hover::before {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.4), inset 0 0 20px rgba(59, 130, 246, 0.2);
}
.card > * { position: relative; z-index: 1; }
.card-link { position: absolute; inset: 0; z-index: 10; font-size: 0; }
.card-icon { font-size: 3rem; margin-bottom: 24px; text-shadow: 0 4px 12px rgba(0,0,0,0.5); display: inline-block; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.card:hover .card-icon { transform: scale(1.1) rotate(5deg); }
.card h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.card p { color: var(--muted-color); font-size: 0.95rem; margin-bottom: 24px; flex-grow: 1; }
.card-action { color: var(--accent-color); font-weight: 700; font-size: 0.9rem; transition: transform 0.3s; }
.card:hover .card-action { transform: translateX(5px); }

/* SHOP CARDS */
.shop-card { padding: 0; }
.shop-card-img { height: 240px; width: 100%; object-fit: cover; border-bottom: 1px solid var(--glass-border); transition: transform 0.5s ease; }
.shop-card:hover .shop-card-img { transform: scale(1.05); }
.shop-card-img-wrapper { overflow: hidden; border-radius: 24px 24px 0 0; }
.shop-card-content { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.shop-card-content h3 { font-size: 1.3rem; margin-bottom: 8px; }
.shop-card-content .price { color: #a855f7; font-weight: 800; margin-top: auto; padding-top: 16px; }

/* GALLERY SHOWCASE */
.gallery-showcase { display: flex; align-items: center; gap: 64px; }
.gallery-content { flex: 1; }
.gallery-image { flex: 1.2; position: relative; }
.gallery-image img { width: 100%; border-radius: 32px; box-shadow: var(--shadow); }
.gallery-image::after {
    content: ''; position: absolute; inset: -20px; z-index: -1;
    background: var(--accent-glow); filter: blur(60px); opacity: 0.3; border-radius: 32px;
}

/* RESPONSIVE DESIGN (Media Queries) */
@media (max-width: 1300px) {
    .main-nav ul { gap: 16px; }
    .main-nav > ul > li > a { font-size: 0.85rem; }
    .auth-buttons .btn { padding: 8px 16px; font-size: 0.8rem; }
}

/* WIKI HUB ENHANCEMENTS */
.wiki-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 80px; }
.wiki-cat-card { padding: 24px; text-align: center; border-radius: 20px; transition: all 0.4s ease; border: 1px solid rgba(255,255,255,0.05); }
.wiki-cat-card:hover { transform: translateY(-5px); border-color: var(--accent-color); background: rgba(59, 130, 246, 0.05); }
.wiki-cat-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.wiki-cat-card h4 { font-size: 1.1rem; font-weight: 700; margin: 0; }

.wiki-featured-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin-bottom: 80px; }
.wiki-featured-main { height: 500px; }
.wiki-featured-side { display: flex; flex-direction: column; gap: 32px; }
.wiki-featured-item { height: 234px; }

.wiki-card-pro { 
    position: relative; border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px; 
    border: 1px solid rgba(255,255,255,0.05); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.wiki-card-pro:hover { transform: scale(1.01) translateY(-5px); border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 32px 64px rgba(0,0,0,0.6); }
.wiki-card-pro img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0.6; transition: opacity 0.4s, transform 0.8s ease; }
.wiki-card-pro:hover img { opacity: 0.8; transform: scale(1.05); }
.wiki-card-pro::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,10,21,1) 0%, rgba(5,10,21,0.2) 60%, transparent 100%); z-index: 2; }
.wiki-card-content { position: relative; z-index: 3; }
.wiki-card-pro h3 { font-size: 2rem; margin-bottom: 12px; font-weight: 900; line-height: 1.1; }
.wiki-card-pro .badge { margin-bottom: 16px; background: var(--accent-glow); color: #fff; border: none; }

.wiki-search-hero { padding: 180px 0 100px; text-align: center; position: relative; }
.wiki-wrapper-large { width: 100%; max-width: 800px; margin: 0 auto; position: relative; display: flex; align-items: center; }
.wiki-input-large { 
    width: 100%; height: 72px; font-size: 1.3rem; padding: 0 180px 0 40px; 
    background: rgba(13, 21, 38, 0.8); border: 2px solid rgba(255,255,255,0.1);
    border-radius: 999px; color: #fff; outline: none; transition: border-color 0.3s;
}
.wiki-input-large:focus { border-color: var(--accent-color); }
.wiki-wrapper-large .btn-primary { 
    position: absolute; right: 8px; height: 56px; padding: 0 32px; 
    font-size: 1.1rem; border-radius: 999px;
}

@media (max-width: 992px) {
    .wiki-featured-grid { grid-template-columns: 1fr; }
    .wiki-featured-main { height: 400px; }
}

@media (max-width: 1200px) {
    .wiki-single-layout { grid-template-columns: 1fr !important; gap: 48px; }
    .wiki-infobar { order: -1; position: static !important; }
}

@media (max-width: 992px) {
    .section-padding { padding: 80px 0; }
    .hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
    .gallery-showcase { flex-direction: column; text-align: center; }
    .grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .bento-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 240px; }
    .bento-large, .bento-wide, .bento-tall, .bento-small { grid-column: span 2; grid-row: span 1; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .feature-large, .feature-small { grid-column: span 1; }
    
    /* Mobile Header Layout */
    .header-floating { grid-template-columns: auto auto; justify-content: space-between; top: 16px; width: calc(100% - 32px); padding: 12px 24px !important; }
    body.admin-bar .header-floating { top: calc(16px + 32px); }
    .header-center { display: none; }
    .header-right { gap: 8px; }
    .mobile-menu-toggle { display: block; }
    
    /* Mobile Menu Dropdown */
    .header-center.is-active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 16px;
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--glass-border);
        border-radius: 24px;
        padding: 24px;
        box-shadow: var(--shadow);
    }
    .header-center.is-active .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .header-center.is-active .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0,0,0,0.2);
        box-shadow: none;
        border: none;
        margin-top: 8px;
        padding: 8px 0;
        min-width: 100%;
    }
    .header-center.is-active .sub-dropdown { margin-left: 16px; }
}

@media (max-width: 782px) {
    body.admin-bar .header-floating { top: calc(16px + 46px); }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .section-header h2 { font-size: 2.2rem; }
    .grid-2, .grid-3, .features-grid { grid-template-columns: 1fr; }
    .bento-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
    .bento-large, .bento-wide, .bento-tall, .bento-small { grid-column: span 1; grid-row: span 1; }
    .hero-actions { flex-direction: column; }
    .btn-large { width: 100%; }
    .card { padding: 24px; }
    .shop-card-content { padding: 24px; }
    .astro-modal-content { padding: 32px 24px; margin: 16px; }
    .auth-buttons { display: none; }
}

/* WIKI SINGLE ENHANCEMENTS */
.wiki-layout { 
    display: grid !important; 
    grid-template-columns: 280px 1fr 340px !important; 
    gap: 48px; 
    align-items: start; 
}
.wiki-sidebar-nav { position: sticky; top: 120px; }
.wiki-infobar { position: sticky; top: 120px; }

.wiki-toc { padding: 32px; border-radius: 24px; margin-bottom: 32px; }
.wiki-toc h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; color: var(--accent-color); font-weight: 800; border-bottom: 1px solid var(--glass-border); padding-bottom: 12px; }
.wiki-toc ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.wiki-toc li a { font-size: 0.95rem; color: var(--muted-color); transition: all 0.3s; display: block; border-left: 2px solid transparent; padding-left: 16px; }
.wiki-toc li a:hover { color: #fff; border-left-color: var(--accent-color); transform: translateX(4px); }

.wiki-article-header { margin-bottom: 56px; border-left: 4px solid var(--accent-glow); padding-left: 32px; }
.wiki-article-header h1 { font-size: clamp(3rem, 7vw, 4.5rem); font-weight: 900; margin-bottom: 16px; line-height: 1; letter-spacing: -0.03em; }

.wiki-content { font-size: 1.15rem; line-height: 1.9; color: rgba(255,255,255,0.9); }
.wiki-content h2 { 
    font-size: 2.2rem; 
    font-weight: 800; 
    margin-top: 64px; 
    margin-bottom: 24px; 
    display: flex; 
    align-items: center; 
    gap: 16px;
    scroll-margin-top: 160px; /* Offset for floating header */
}
.wiki-content h2::after { content: ''; flex-grow: 1; height: 1px; background: var(--glass-border); }
.wiki-content p { margin-bottom: 28px; }

.wiki-infobox { position: sticky; top: 120px; width: 100%; border-radius: 24px; padding: 0; overflow: hidden; border: 2px solid rgba(59, 130, 246, 0.4); box-shadow: 0 0 40px rgba(59, 130, 246, 0.2), var(--shadow); }
.wiki-infobox-img { width: 100%; height: 260px; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,0.1); }
.wiki-infobox-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.wiki-infobox-img:hover img { transform: scale(1.05); }
.wiki-infobox-header { padding: 24px; background: rgba(255,255,255,0.03); text-align: center; }
.wiki-infobox-header h3 { font-size: 1.4rem; font-weight: 900; margin: 0; }
.wiki-data-table { width: 100%; border-collapse: collapse; }
.wiki-data-table tr { border-bottom: 1px solid rgba(255,255,255,0.05); }
.wiki-data-table tr:last-child { border-bottom: none; }
.wiki-data-table td { padding: 16px 20px; font-size: 0.95rem; }
.wiki-data-table td:first-child { color: var(--muted-color); width: 45%; font-weight: 500; }
.wiki-data-table td:last-child { font-weight: 700; text-align: right; color: var(--text-color); }
.wiki-data-table .data-highlight { color: var(--accent-color) !important; }

.wiki-source-box { margin-top: 80px; padding: 32px; border-radius: 20px; background: rgba(255,255,255,0.02); border: 1px dashed var(--glass-border); }
.wiki-source-box h5 { font-size: 0.9rem; text-transform: uppercase; color: var(--muted-color); margin-bottom: 16px; letter-spacing: 0.1em; }
.wiki-source-box ul { list-style: none; font-size: 0.9rem; color: var(--muted-color); }

@media (max-width: 1400px) {
    .wiki-layout { grid-template-columns: 240px 1fr 300px !important; gap: 32px; }
}

@media (max-width: 1200px) {
    .wiki-layout { grid-template-columns: 1fr 340px !important; gap: 48px; }
    .wiki-sidebar-nav { display: none; /* Hide TOC on smaller tablets to save space */ }
}

@media (max-width: 992px) {
    .wiki-layout { grid-template-columns: 1fr !important; }
    .wiki-infobar { position: static !important; order: -1; margin-bottom: 32px; }
}

/* DASHBOARD V2 (3-column Feed) */
.dashboard-grid { 
    display: grid !important; 
    grid-template-columns: 300px minmax(0, 1fr) 300px !important; 
    gap: 40px; 
    align-items: start; 
}

/* Left Sidebar */
.dash-sidebar-left { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 120px; }
.dash-profile { padding: 32px 24px; border-radius: 24px; text-align: center; position: relative; overflow: hidden; }
.dash-profile::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); border-radius: 24px; pointer-events: none; }
.dash-avatar { width: 100px; height: 100px; border-radius: 50%; border: 3px solid rgba(59, 130, 246, 0.5); margin-bottom: 20px; object-fit: cover; box-shadow: 0 8px 24px rgba(0,0,0,0.5); padding: 4px; background: rgba(255,255,255,0.05); }
.dash-profile h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.badge { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2)); color: #fff; padding: 6px 16px; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; border: 1px solid rgba(255,255,255,0.1); }

.dash-nav { border-radius: 24px; padding: 16px; }
.dash-nav ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.dash-nav a { display: block; padding: 14px 20px; border-radius: 16px; font-weight: 600; color: var(--muted-color); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid transparent; }
.dash-nav a:hover, .dash-nav li.active a { background: rgba(255, 255, 255, 0.05); color: #fff; border-color: rgba(255,255,255,0.05); transform: translateX(4px); }
.text-danger { color: #ef4444 !important; }
.text-danger:hover { background: rgba(239, 68, 68, 0.1) !important; border-color: rgba(239, 68, 68, 0.2) !important; }

/* Center Feed */
.dash-feed { display: flex; flex-direction: column; gap: 32px; }
.dash-title { font-size: 2.2rem; font-weight: 900; margin-bottom: 16px; letter-spacing: -0.02em; }
.dash-subtitle { font-size: 1.25rem; font-weight: 800; color: var(--muted-color); padding-bottom: 12px; border-bottom: 1px solid var(--glass-border); margin-bottom: 8px; }

.dash-card { padding: 32px; border-radius: 24px; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; }
.dash-card::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); border-radius: 24px; pointer-events: none; transition: box-shadow 0.4s ease; }
.dash-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.5); background: rgba(20, 30, 50, 0.8); }
.dash-card:hover::before { box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.3); }

.highlight-card { border: none; background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, rgba(13, 21, 38, 0.8) 100%); }
.highlight-card::before { box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2); }
.card-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; color: var(--muted-color); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.progress-pct { color: var(--accent-color); font-weight: 900; font-size: 1.2rem; }
.dash-card h3 { font-size: 1.8rem; margin-bottom: 24px; }
.progress-bar-bg { width: 100%; height: 8px; background: rgba(0, 0, 0, 0.4); border-radius: 4px; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,0.5); }
.progress-bar-fill { height: 100%; background: var(--accent-glow); border-radius: 4px; box-shadow: 0 0 10px rgba(168, 85, 247, 0.5); }

.feed-article { display: flex; gap: 24px; align-items: center; padding: 24px; }
.feed-article-img img { width: 160px; height: 160px; object-fit: cover; border-radius: 16px; transition: transform 0.4s ease; }
.feed-article:hover .feed-article-img img { transform: scale(1.05); }
.feed-article-img { border-radius: 16px; overflow: hidden; flex-shrink: 0; }
.feed-article-content { flex: 1; }
.feed-meta { display: inline-block; font-size: 0.8rem; color: var(--accent-color); margin-bottom: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; background: rgba(59, 130, 246, 0.1); padding: 4px 12px; border-radius: 12px; }
.feed-article-content h4 { font-size: 1.4rem; margin-bottom: 12px; line-height: 1.3; }
.feed-article-content h4 a { transition: color 0.3s; }
.feed-article-content h4 a:hover { color: var(--accent-color); }
.feed-article-content p { font-size: 1rem; color: var(--muted-color); line-height: 1.6; }

/* Right Sidebar */
.dash-sidebar-right { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 120px; }
.dash-widget { padding: 32px 24px; border-radius: 24px; position: relative; }
.dash-widget::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); border-radius: 24px; pointer-events: none; }
.dash-widget h4 { font-size: 1.2rem; font-weight: 800; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--glass-border); display: flex; align-items: center; gap: 8px; }
.notification-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.notification-list li { position: relative; padding-left: 20px; border-left: 3px solid rgba(255,255,255,0.1); transition: border-color 0.3s; }
.notification-list li:hover { border-left-color: rgba(255,255,255,0.3); }
.notification-list li.unread { border-left-color: var(--accent-color); }
.notification-list li strong { display: block; font-size: 1rem; margin-bottom: 4px; color: #fff; }
.notification-list li p { font-size: 0.9rem; color: var(--muted-color); }
.quick-actions { display: flex; flex-direction: column; gap: 16px; }
.quick-actions .btn { text-align: center; padding: 14px; border-radius: 16px; }

@media (max-width: 1400px) {
    .dashboard-grid { grid-template-columns: 260px minmax(0, 1fr) 260px !important; gap: 32px; }
}
@media (max-width: 1200px) {
    .dashboard-grid { grid-template-columns: 280px minmax(0, 1fr) !important; }
    .dash-sidebar-right { display: none; }
}
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr !important; }
    .dash-sidebar-left { position: static; }
    .feed-article { flex-direction: column; align-items: flex-start; }
    .feed-article-img { width: 100%; }
    .feed-article-img img { width: 100%; height: 240px; }
}
