/* =============================================
   Znation Roleplay - CSS
   Dark Gaming Theme
   ============================================= */

:root {
    --bg-dark:      #080a0f;
    --bg-card:      #0e1118;
    --bg-card-2:    #131720;
    --accent:       #e63946;
    --accent-blue:  #5865F2;
    --accent-glow:  rgba(230, 57, 70, 0.35);
    --text-main:    #e8eaf0;
    --text-muted:   #7a8099;
    --border-color: rgba(255, 255, 255, 0.07);
    --glass-bg:     rgba(14, 17, 24, 0.85);
    --navbar-height:70px;
    --font-main:    'Outfit', sans-serif;
    --font-head:    'Rajdhani', sans-serif;
    --radius:       10px;
    --radius-lg:    16px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: 0.03em;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #ff6b75; }

main { flex: 1; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ---- Navbar ---- */
.zn-navbar {
    background: rgba(8, 10, 15, 0.96) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: var(--navbar-height);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    font-family: var(--font-head);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    padding: 0;
}
.brand-z       { color: var(--accent); font-size: 1.8rem; font-weight: 900; }
.brand-nation  { color: var(--text-main); font-weight: 700; }
.brand-rp      { color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.15em; margin-left: 4px; }

.zn-navbar .nav-link {
    color: var(--text-muted) !important;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: .4rem .75rem !important;
    border-radius: 6px;
    transition: all .2s;
}
.zn-navbar .nav-link:hover,
.zn-navbar .nav-link.active {
    color: var(--text-main) !important;
    background: rgba(255,255,255,0.06);
}
.zn-navbar .nav-link.active { color: var(--accent) !important; }

.zn-dropdown {
    background: var(--bg-card-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
.zn-dropdown .dropdown-item {
    color: var(--text-muted);
    font-size: .9rem;
    transition: all .15s;
}
.zn-dropdown .dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

/* ---- Buttons ---- */
.btn-accent {
    background: var(--accent);
    border: none;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: 0.07em;
    border-radius: 8px;
    transition: all .2s;
}
.btn-accent:hover {
    background: #c1121f;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-discord {
    background: var(--accent-blue);
    border: none;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    border-radius: 8px;
    transition: all .2s;
}
.btn-discord:hover {
    background: #4752c4;
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-accent {
    border: 1.5px solid var(--accent);
    color: var(--accent);
    background: transparent;
    font-family: var(--font-head);
    font-weight: 600;
    border-radius: 8px;
    transition: all .2s;
}
.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
}

/* ---- Cards ---- */
.zn-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color .2s, transform .2s;
}
.zn-card:hover {
    border-color: rgba(230, 57, 70, 0.3);
    transform: translateY(-3px);
}

.zn-card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

/* ---- Section titles ---- */
.section-title {
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 6px;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

/* ---- Hero ---- */
.hero {
    min-height: calc(100vh - var(--navbar-height));
    background:
        linear-gradient(to bottom, rgba(8,10,15,0.5) 0%, rgba(8,10,15,0.85) 60%, var(--bg-dark) 100%),
        url('../img/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    padding: 4rem 0;
}
.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.1;
}
.hero-accent { color: var(--accent); }
.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.7;
}
.hero-ip-box {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: .5rem 1rem;
    font-family: monospace;
    font-size: .95rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color .2s;
}
.hero-ip-box:hover { border-color: var(--accent); color: var(--text-main); }

/* ---- Stats bar ---- */
.stat-item {
    text-align: center;
    padding: 1.5rem;
    border-right: 1px solid var(--border-color);
}
.stat-item:last-child { border-right: none; }
.stat-number {
    font-family: var(--font-head);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
    line-height: 1;
}
.stat-label { color: var(--text-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }

/* ---- Jobs ---- */
.job-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}
.job-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity .25s;
}
.job-card:hover { border-color: rgba(230,57,70,.4); transform: translateY(-4px); }
.job-card:hover::before { opacity: 1; }
.job-card .job-title {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: .5rem;
}
.job-card .job-desc { color: var(--text-muted); font-size: .92rem; }
.badge-open { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.25); font-size: .75rem; }
.badge-closed { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.25); font-size: .75rem; }

/* ---- Team ---- */
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all .25s;
}
.team-card:hover { border-color: rgba(230,57,70,.3); transform: translateY(-3px); }
.team-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    background: var(--bg-card-2);
}
.team-avatar-placeholder {
    width: 90px; height: 90px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    background: var(--bg-card-2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: var(--text-muted);
}
.team-name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; }
.team-title { color: var(--accent); font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.team-discord { color: var(--text-muted); font-size: .85rem; }

/* ---- Gallery ---- */
.gallery-grid { columns: 3; gap: 12px; }
@media (max-width: 768px) { .gallery-grid { columns: 2; } }
@media (max-width: 480px) { .gallery-grid { columns: 1; } }
.gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}
.gallery-item img {
    width: 100%;
    display: block;
    transition: transform .3s;
}
.gallery-item:hover img { transform: scale(1.03); }
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8,10,15,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
    font-size: 2rem;
    color: #fff;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ---- Rules / Regler ---- */
.rules-category { margin-bottom: 2.5rem; }
.rules-category-title {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .1em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
}
.accordion-item {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius) !important;
    margin-bottom: .5rem;
    overflow: hidden;
}
.accordion-button {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.05rem;
    border: none !important;
    box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
    color: var(--accent) !important;
    background: rgba(230,57,70,.07) !important;
}
.accordion-button::after { filter: brightness(0) invert(1); }
.accordion-body {
    background: var(--bg-card) !important;
    color: var(--text-muted);
    line-height: 1.7;
    border-top: 1px solid var(--border-color);
}

/* ---- Forms ---- */
.form-control, .form-select {
    background: var(--bg-card-2) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: 8px !important;
    padding: .65rem 1rem !important;
    transition: border-color .2s !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    outline: none !important;
}
.form-control::placeholder { color: var(--text-muted) !important; }
.form-label { color: var(--text-muted); font-size: .9rem; font-weight: 500; margin-bottom: .35rem; }
.form-check-input {
    background-color: var(--bg-card-2) !important;
    border-color: var(--border-color) !important;
}
.form-check-input:checked { background-color: var(--accent) !important; border-color: var(--accent) !important; }

/* ---- Badges ---- */
.badge-pending  { background: rgba(251,191,36,.15); color: #fbbf24; border: 1px solid rgba(251,191,36,.3); }
.badge-approved { background: rgba(34,197,94,.15);  color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.badge-rejected { background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }

/* ---- Panel / Admin ---- */
.panel-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - var(--navbar-height));
    padding: 1.5rem 0;
    width: 240px;
    flex-shrink: 0;
}
.panel-sidebar .nav-link {
    color: var(--text-muted);
    font-family: var(--font-head);
    font-weight: 600;
    padding: .55rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-right: .75rem;
    transition: all .15s;
    font-size: .95rem;
}
.panel-sidebar .nav-link:hover { color: var(--text-main); background: rgba(255,255,255,.04); }
.panel-sidebar .nav-link.active { color: var(--accent); background: rgba(230,57,70,.1); }
.panel-sidebar .nav-section {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
    padding: 1rem 1.25rem .3rem;
    opacity: .6;
}
.panel-content {
    flex: 1;
    padding: 2rem;
    min-width: 0;
}
.panel-layout { display: flex; align-items: flex-start; }

.zn-table {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.zn-table thead th {
    background: var(--bg-card-2);
    color: var(--text-muted);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.zn-table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    vertical-align: middle;
    font-size: .93rem;
}
.zn-table tbody tr:last-child td { border-bottom: none; }
.zn-table tbody tr:hover td { background: rgba(255,255,255,.02); }

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.stat-card .number {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.stat-card .label { color: var(--text-muted); font-size: .85rem; margin-top: .25rem; }

/* ---- Dashboard ---- */
.dash-app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color .2s;
}
.dash-app-card:hover { border-color: rgba(230,57,70,.3); }
.dash-app-icon { font-size: 1.8rem; width: 48px; text-align: center; }

/* ---- Page header ---- */
.page-header {
    padding: 3.5rem 0 2.5rem;
    background: linear-gradient(135deg, rgba(230,57,70,.08) 0%, transparent 60%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .35rem; }
.page-header p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

/* ---- Toast ---- */
.toast { background: var(--bg-card-2); border: 1px solid var(--border-color); color: var(--text-main); }
.toast.bg-success { background: rgba(34,197,94,.15) !important; border-color: rgba(34,197,94,.3) !important; }
.toast.bg-danger  { background: rgba(239,68,68,.15)  !important; border-color: rgba(239,68,68,.3)  !important; }
.toast.bg-warning { background: rgba(251,191,36,.15) !important; border-color: rgba(251,191,36,.3) !important; }

/* ---- Footer ---- */
.zn-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}
.footer-brand { font-family: var(--font-head); font-size: 1.3rem; }
.footer-link { color: var(--text-muted); font-size: .9rem; transition: color .2s; }
.footer-link:hover { color: var(--accent); }

/* ---- Lightbox modal ---- */
#lightboxModal .modal-content {
    background: transparent;
    border: none;
}
#lightboxModal .modal-body { padding: 0; }
#lightboxModal img { width: 100%; border-radius: var(--radius); }

/* ---- Utility ---- */
.text-accent { color: var(--accent) !important; }
.border-accent { border-color: var(--accent) !important; }
.bg-zn-card { background: var(--bg-card) !important; }
.divider { border-top: 1px solid var(--border-color); margin: 2rem 0; }

@media (max-width: 991px) {
    .panel-sidebar { width: 100%; min-height: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
    .panel-layout { flex-direction: column; }
    .panel-content { padding: 1.25rem; }
    .gallery-grid { columns: 2; }
}
