/* ===================== VARIABLES ===================== */
:root {
    --bg:        #07090f;
    --surface:   #0d1120;
    --surface2:  #141926;
    --border:    #202a3e;
    --text:      #e2ddd6;
    --muted:     #7f8ea6;
    --subtle:    #3d4d65;
    --accent:    #c9a84c;
    --accent-h:  #e0c06a;
    --accent-bg: rgba(201,168,76,0.09);
    --white:     #f5f0e8;
    --success:   #3aaa6e;
    --warning:   #d4941e;
    --error:     #c0392b;
    --radius:    6px;
    --radius-lg: 12px;
    --shadow:    0 4px 32px rgba(0,0,0,.55);
    --font-body: 'Lato', sans-serif;
    --font-disp: 'Cormorant Garant', serif;
}

/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; }
input, select, textarea { background: var(--surface2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }

/* ===================== COOKIE BAR ===================== */
#cookie-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: var(--surface2); border-top: 1px solid var(--border);
    padding: 12px 24px; display: flex; align-items: center; gap: 16px;
    font-size: 14px;
}
#cookie-bar a { text-decoration: underline; }
#cookie-bar button { background: var(--accent); color: #fff; border: none; border-radius: var(--radius); padding: 6px 16px; cursor: pointer; }

/* ===================== LAYOUT ===================== */
.content-wrap { min-height: calc(100vh - 64px); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.section { padding: 32px 0 64px; }
.section-sm { padding: 24px 0 40px; }

/* ===================== NAV ===================== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(7,9,15,0.94); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
    display: flex; align-items: center; gap: 8px;
    color: var(--text); font-weight: 600;
}
.nav-brand:hover { color: var(--white); }
.brand-text { font-size: 18px; font-family: var(--font-disp); font-weight: 700; letter-spacing: -.5px; }
.brand-accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { color: var(--muted); font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: var(--radius); transition: .2s; }
.nav-link:hover, .nav-link.active { color: var(--white); background: var(--surface2); }
.nav-write { color: var(--accent) !important; }
.nav-logout { color: var(--subtle) !important; font-size: 13px; }
.nav-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; letter-spacing: 0;
}
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--muted); border-radius: 2px; transition: .2s; }

/* Desktop dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 180px;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 6px;
    box-shadow: var(--shadow); z-index: 200;
}
.nav-dropdown-menu a {
    display: block; padding: 8px 12px; border-radius: var(--radius);
    color: var(--muted); font-size: 14px; font-weight: 500; transition: .15s;
}
.nav-dropdown-menu a:first-child {
    color: var(--text); border-bottom: 1px solid var(--border); margin-bottom: 4px; padding-bottom: 10px;
}
.nav-dropdown-menu a:hover { color: var(--white); background: var(--surface); }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }

/* Mobile nav */
.nav-mobile { display: none; }
.nav-mobile-section { display: flex; flex-direction: column; gap: 2px; }
.nav-mobile-label {
    font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--subtle); padding: 4px 12px 8px;
}
.nav-mobile-divider { height: 1px; background: var(--border); margin: 8px 0; }

@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .nav-desktop { display: none !important; }
    .nav-mobile {
        position: absolute; top: 64px; left: 0; right: 0;
        background: #fdf6e8;
        border-bottom: 3px solid var(--accent);
        box-shadow: 0 8px 32px rgba(0,0,0,.6);
        padding: 20px 16px; flex-direction: column; gap: 2px;
        z-index: 150;
    }
    .nav-mobile.open { display: flex; }
    .nav-mobile .nav-mobile-label { color: var(--accent); padding: 0 12px 10px; }
    .nav-mobile .nav-link {
        text-align: left; padding: 10px 12px; border-radius: var(--radius);
        color: #1a1208 !important; font-size: 15px;
    }
    .nav-mobile .nav-link:hover { background: #f5ede0; color: #000 !important; }
    .nav-mobile .nav-write { color: var(--accent) !important; }
    .nav-mobile .nav-logout { color: #888 !important; }
    .nav-mobile .nav-mobile-divider { background: #e0e0e0; }
    .nav-mobile .btn { margin-top: 4px; text-align: center; }
}
@media (min-width: 901px) {
    .nav-mobile { display: none !important; }
    .nav-toggle { display: none !important; }
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--radius); font-weight: 600;
    font-size: 15px; cursor: pointer; border: none; transition: .2s; line-height: 1;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--muted); background: var(--surface2); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { opacity: .85; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===================== HERO ===================== */
.hero {
    padding: 100px 0 80px;
    background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(201,168,76,.10) 0%, transparent 70%);
    text-align: center;
}
.hero-eyebrow {
    display: inline-block; background: var(--accent-bg); color: var(--accent);
    border: 1px solid rgba(201,168,76,.28); border-radius: 100px;
    font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    padding: 6px 18px; margin-bottom: 24px;
}
.hero h1 { font-family: var(--font-disp); font-size: clamp(40px, 5.5vw, 72px); font-weight: 700; line-height: 1.05; margin-bottom: 20px; letter-spacing: -.5px; }
.hero h1 em { color: var(--accent); font-style: italic; }
.hero p { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===================== CARDS ===================== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    transition: .2s; display: flex; flex-direction: column;
}
.post-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.post-card-meta a { color: var(--accent); font-weight: 600; }
.post-card h2 { font-family: var(--font-disp); font-size: 20px; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--white); }
.post-card p { font-size: 14px; color: var(--muted); line-height: 1.6; flex: 1; }
.post-card-footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--subtle); }
.country-tag { background: var(--surface2); color: var(--muted); padding: 2px 10px; border-radius: 100px; font-size: 12px; }

/* ===================== FORMS ===================== */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 14px; border-radius: var(--radius);
    font-size: 15px; transition: .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg);
}
.form-group select option { background: var(--surface2); }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-divider { text-align: center; color: var(--subtle); font-size: 14px; margin: 20px 0; position: relative; }
.form-divider::before { content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: var(--border); }
.form-divider span { background: var(--surface); position: relative; padding: 0 12px; }

/* ===================== ALERTS ===================== */
.alert { border-radius: var(--radius); padding: 12px 16px; font-size: 14px; margin-bottom: 20px; border-left: 3px solid; }
.alert-error { background: rgba(231,76,60,.1); border-color: var(--error); color: #f0a9a3; }
.alert-success { background: rgba(39,174,96,.1); border-color: var(--success); color: #82e0aa; }
.alert-warning { background: rgba(243,156,18,.1); border-color: var(--warning); color: #f9ca74; }
.alert-info { background: rgba(52,152,219,.1); border-color: #3498db; color: #7fb3d6; }

/* ===================== PAGE HEADER ===================== */
.page-header { padding: 16px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.page-header h1 { font-family: var(--font-disp); font-size: clamp(28px, 4vw, 48px); font-weight: 900; margin-bottom: 8px; }
.page-header p { color: var(--muted); font-size: 17px; }
.breadcrumb { font-size: 13px; color: var(--subtle); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

/* ===================== POST CONTENT ===================== */
.post-body { font-size: 17px; line-height: 1.85; }
.post-body h2 { font-family: var(--font-disp); font-size: 26px; font-weight: 700; margin: 36px 0 16px; }
.post-body h3 { font-family: var(--font-disp); font-size: 21px; font-weight: 700; margin: 28px 0 12px; }
.post-body p { margin-bottom: 20px; }
.post-body a { text-decoration: underline; }
.post-body blockquote { border-left: 3px solid var(--accent); padding: 12px 20px; margin: 24px 0; background: var(--surface2); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--muted); }
.post-body ul, .post-body ol { margin: 16px 0 20px 24px; list-style: initial; }
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: 6px; }
.post-body code { background: var(--surface2); border: 1px solid var(--border); border-radius: 3px; padding: 2px 6px; font-size: 14px; }
.post-body pre { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; overflow-x: auto; margin: 20px 0; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ===================== PROFILE ===================== */
.profile-header {
    display: flex; align-items: center; gap: 24px; padding: 48px 0 32px;
    border-bottom: 1px solid var(--border); margin-bottom: 40px;
}
.profile-avatar-lg {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; font-family: var(--font-disp); flex-shrink: 0;
}
.profile-meta { font-size: 14px; color: var(--muted); margin-top: 4px; }
.profile-meta span { color: var(--text); font-weight: 500; }
.profile-stats { display: flex; gap: 24px; margin-top: 8px; }
.profile-stat span { display: block; font-size: 22px; font-weight: 700; color: var(--white); font-family: var(--font-disp); }

/* ===================== DASHBOARD ===================== */
.dash-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.dash-sidebar { }
.dash-nav a { display: block; padding: 10px 14px; border-radius: var(--radius); color: var(--muted); font-size: 14px; font-weight: 500; transition: .15s; }
.dash-nav a:hover, .dash-nav a.active { background: var(--surface2); color: var(--white); }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; }
.stat-card-val { font-size: 32px; font-weight: 900; font-family: var(--font-disp); color: var(--white); }
.stat-card-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
@media (max-width: 720px) { .dash-grid { grid-template-columns: 1fr; } }

/* ===================== TABLE ===================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--surface2); color: var(--muted); font-weight: 600; text-align: left; padding: 10px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* ===================== STATUS BADGES ===================== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-green { background: rgba(39,174,96,.15); color: #82e0aa; }
.badge-yellow { background: rgba(243,156,18,.15); color: #f9ca74; }
.badge-red { background: rgba(231,76,60,.15); color: #f0a9a3; }
.badge-gray { background: var(--surface2); color: var(--muted); }

/* ===================== WYSIWYG ===================== */
.ql-toolbar { background: var(--surface2) !important; border-color: var(--border) !important; border-radius: var(--radius) var(--radius) 0 0 !important; }
.ql-container { background: var(--surface2) !important; border-color: var(--border) !important; border-radius: 0 0 var(--radius) var(--radius) !important; font-size: 16px !important; min-height: 320px; }
.ql-editor { color: var(--text) !important; font-family: var(--font-body) !important; line-height: 1.8 !important; }
.ql-editor.ql-blank::before { color: var(--subtle) !important; }
.ql-snow .ql-stroke { stroke: var(--muted) !important; }
.ql-snow .ql-fill { fill: var(--muted) !important; }
.ql-snow .ql-picker { color: var(--muted) !important; }
.ql-snow .ql-picker-options { background: var(--surface2) !important; border-color: var(--border) !important; }
.ql-snow .ql-picker-item { color: var(--text) !important; }
.word-counter { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: right; }
.word-counter.over { color: var(--error); }
.word-counter.near { color: var(--warning); }

/* ===================== PAGINATION ===================== */
.pagination { margin: 48px 0; }
.pagination ul { display: flex; gap: 6px; justify-content: center; }
.pagination li a { display: block; padding: 8px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 14px; transition: .15s; }
.pagination li a:hover { border-color: var(--accent); color: var(--text); }
.pagination li.active a { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===================== BROWSE / COUNTRY PILLS ===================== */
.country-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.country-pill { padding: 8px 18px; border-radius: 100px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: .15s; }
.country-pill:hover, .country-pill.active { background: var(--accent-bg); border-color: var(--accent); color: var(--text); }

/* ===================== 18+ NOTICE ===================== */
.adult-notice { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 24px; }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 80px; padding: 40px 0; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.footer-brand p { color: var(--muted); font-size: 13px; margin-top: 8px; max-width: 360px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; font-size: 12px; color: var(--subtle); }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } .footer-links { flex-wrap: wrap; } }

/* ===================== UTILS ===================== */
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.section-title { font-family: var(--font-disp); font-size: 28px; font-weight: 700; margin-bottom: 24px; }
.empty-state { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty-state h3 { font-family: var(--font-disp); font-size: 22px; color: var(--text); margin-bottom: 8px; }
.tag { display: inline-block; background: var(--surface2); color: var(--muted); padding: 4px 12px; border-radius: var(--radius); font-size: 13px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ===================== ADMIN ===================== */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 24px; }
.admin-main { padding: 32px; }
.admin-sidebar .brand-text { font-size: 16px; }
.admin-nav { margin-top: 32px; }
.admin-nav a { display: block; padding: 10px 14px; border-radius: var(--radius); color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 2px; transition: .15s; }
.admin-nav a:hover, .admin-nav a.active { background: var(--surface2); color: var(--white); }
@media (max-width: 768px) { .admin-layout { grid-template-columns: 1fr; } .admin-sidebar { display: none; } }
