﻿@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@600;800&display=swap');

:root {
    --bg-dark: #060912;
    --bg-panel: rgba(8, 12, 22, 0.92);
    --bg-card: rgba(12, 18, 32, 0.88);
    --bg-card-solid: rgba(14, 20, 34, 0.94);
    --bg-row: rgba(255, 255, 255, 0.04);
    --bg-card-border: rgba(255, 255, 255, 0.1);
    --accent-gold: #e8a317;
    --accent-gold-soft: #f0c56a;
    --accent-gold-glow: rgba(232, 163, 23, 0.35);
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --accent-green: #22c55e;
    --text-primary: #f4f7fb;
    --text-secondary: #b6c2d4;
    --text-muted: #8b98ad;
    --radius: 16px;
    --radius-sm: 12px;
    --sidebar-w: 286px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        linear-gradient(160deg, rgba(6, 9, 18, 0.88) 0%, rgba(6, 9, 18, 0.78) 45%, rgba(6, 9, 18, 0.9) 100%),
        url('zdjecia/bd496b50-2c81-4390-ac2b-9b909482ff88.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-panel);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.55);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 8px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-header img { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sidebar-header:hover img { transform: scale(1.1) rotate(4deg); }
.sidebar-title-group h1 { font-size: 17px; font-weight: 800; letter-spacing: 0.6px; color: #fff; }
.sidebar-title-group span {
    font-size: 10px; color: var(--accent-gold); text-transform: uppercase;
    letter-spacing: 1.8px; font-weight: 700;
}
.nav-section { display: flex; flex-direction: column; gap: 4px; }
.nav-section-title {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px;
    color: var(--text-muted); font-weight: 700; margin: 14px 0 6px 12px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px;
    color: var(--text-secondary); text-decoration: none; font-size: 13.5px; font-weight: 600;
    border-radius: 12px; border-left: 3px solid transparent;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; opacity: 0.9; transition: color 0.25s ease, transform 0.25s ease; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.06); transform: translateX(3px); }
.nav-item:hover i { color: var(--accent-gold); transform: scale(1.08); }
.nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(232, 163, 23, 0.22) 0%, rgba(232, 163, 23, 0.04) 100%);
    border-left-color: var(--accent-gold);
    box-shadow: inset 0 0 0 1px rgba(232, 163, 23, 0.12);
}
.nav-item.active i { color: var(--accent-gold); }

.main-wrapper { margin-left: var(--sidebar-w); flex-grow: 1; display: flex; flex-direction: column; min-height: 100vh; }
.top-bar {
    height: 68px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between;
    background: rgba(8, 12, 22, 0.72); backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); position: sticky; top: 0; z-index: 50;
}
.breadcrumbs { font-size: 13px; color: var(--text-muted); }
.breadcrumbs span { color: var(--text-primary); font-weight: 700; }
.badge-tag {
    background: rgba(232, 163, 23, 0.12); color: var(--accent-gold-soft);
    border: 1px solid rgba(232, 163, 23, 0.35); padding: 7px 14px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: 1px;
}
.top-bar-right { display: flex; align-items: center; gap: 14px; }
.user-chip {
    display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12.5px; font-weight: 700; color: var(--text-primary);
}
.user-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(232, 163, 23, 0.35); }
.logout-link { color: var(--text-muted); text-decoration: none; padding: 4px; transition: color 0.2s ease; }
.logout-link:hover { color: var(--accent-gold); }
.content-container { padding: 32px 36px 48px; flex-grow: 1; max-width: 1280px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-bottom: 22px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

.hero-carousel-container {
    width: 100%; height: min(380px, 42vw); min-height: 260px; position: relative; background: #05080e;
    overflow: hidden; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 28px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.hero-carousel-slide { display: none; width: 100%; height: 100%; position: absolute; inset: 0; }
.hero-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.fade { animation-name: carouselFade; animation-duration: 1s; }
@keyframes carouselFade { from { opacity: 0.35; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }
.hero-overlay {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(to top, rgba(6, 9, 18, 0.95) 0%, rgba(6, 9, 18, 0.25) 55%, rgba(6, 9, 18, 0.35) 100%);
}
.hero-caption { position: absolute; bottom: 28px; left: 32px; right: 100px; z-index: 3; }
.hero-caption h2 {
    font-family: 'Bebas Neue', sans-serif; font-size: clamp(28px, 4vw, 42px); font-weight: 400;
    letter-spacing: 1.5px; color: #fff; line-height: 1.05; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
}
.hero-caption p {
    margin-top: 8px; font-size: 12.5px; color: var(--accent-gold-soft); font-weight: 700;
    letter-spacing: 1.2px; text-transform: uppercase; max-width: 42rem; line-height: 1.45;
}
.carousel-dots { position: absolute; bottom: 24px; right: 28px; z-index: 4; display: flex; gap: 8px; }
.dot { width: 9px; height: 9px; background: rgba(255, 255, 255, 0.28); border-radius: 50%; transition: all 0.35s ease; }
.dot.active { background: var(--accent-gold); width: 26px; border-radius: 10px; box-shadow: 0 0 12px var(--accent-gold-glow); }

.card {
    background: var(--bg-card) !important; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 22px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35); transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover {
    transform: translateY(-2px); border-color: rgba(232, 163, 23, 0.28);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(232, 163, 23, 0.08);
}
.card-title {
    font-size: 15px; font-weight: 800; letter-spacing: 1px; margin-bottom: 18px; padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); display: flex; align-items: center; gap: 12px;
    color: var(--accent-gold-soft); text-transform: uppercase;
}
.card-title i { font-size: 16px; color: var(--accent-gold); }

table { width: 100%; border-collapse: separate; border-spacing: 0 10px; margin-top: 6px; }
th {
    padding: 13px 18px; text-align: left; background: rgba(232, 163, 23, 0.12); color: var(--accent-gold-soft);
    font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; border: 1px solid rgba(255, 255, 255, 0.06);
}
th:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
th:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }
td {
    padding: 15px 18px; text-align: left; background: var(--bg-row); border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 14.5px; line-height: 1.55; color: var(--text-primary);
    transition: background 0.25s ease, border-color 0.25s ease;
}
td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.06); border-top-left-radius: 12px; border-bottom-left-radius: 12px;
    font-weight: 700; color: var(--accent-gold-soft); white-space: nowrap;
}
td:last-child { border-right: 1px solid rgba(255, 255, 255, 0.06); border-top-right-radius: 12px; border-bottom-right-radius: 12px; }
tr:hover td { background: rgba(232, 163, 23, 0.1); border-color: rgba(232, 163, 23, 0.22); }

.equipment-list { display: flex; flex-direction: column; gap: 10px; }
.eq-item {
    display: flex; align-items: center; gap: 16px; background: var(--bg-row); border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 15px 18px; border-radius: var(--radius-sm); transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    opacity: 0; transform: translateX(-16px); animation: slideInEq 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--delay) * 0.08s);
}
.eq-item:hover { background: rgba(232, 163, 23, 0.1); border-color: rgba(232, 163, 23, 0.25); transform: translateX(4px); }
.eq-icon-box {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 15px; background: rgba(255, 255, 255, 0.05); flex-shrink: 0;
}
.eq-item:hover .eq-icon-box { transform: scale(1.08); }
.eq-icon-box.orange { color: #f39c12; background: rgba(243, 156, 18, 0.18); }
.eq-icon-box.red { color: #ef4444; background: rgba(239, 68, 68, 0.18); }
.eq-icon-box.yellow { color: #f1c40f; background: rgba(241, 196, 15, 0.18); }
.eq-icon-box.grey { color: #95a5a6; background: rgba(149, 165, 166, 0.18); }
.eq-icon-box.white { color: #ecf0f1; background: rgba(236, 240, 241, 0.14); }
.eq-icon-box.blue { color: #60a5fa; background: rgba(59, 130, 246, 0.18); }
.eq-text { font-size: 14.5px; color: var(--text-primary); line-height: 1.45; }
.eq-text strong { font-weight: 700; color: #fff; }
.eq-text span { color: var(--text-secondary); font-weight: 600; }

.styled-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.styled-list li {
    background: var(--bg-row); border: 1px solid rgba(255, 255, 255, 0.07); border-left: 3px solid rgba(232, 163, 23, 0.45);
    padding: 15px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14.5px; line-height: 1.65;
    color: var(--text-secondary); transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.styled-list li strong { color: var(--text-primary); font-weight: 700; }
.styled-list li:hover { background: rgba(232, 163, 23, 0.09); border-left-color: var(--accent-gold); transform: translateX(3px); }

footer {
    padding: 18px 36px; border-top: 1px solid rgba(255, 255, 255, 0.08); background: rgba(8, 12, 22, 0.85);
    display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted);
}
@keyframes slideInEq { to { opacity: 1; transform: translateX(0); } }
.author-tag {
    margin-left: auto; text-align: right; font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600;
    letter-spacing: 1px; color: rgba(255, 255, 255, 0.55); text-transform: uppercase;
}
.author-tag span { font-weight: 800; color: var(--accent-gold); text-shadow: 0 0 10px rgba(232, 163, 23, 0.35); letter-spacing: 1.4px; }
.footer-left { display: flex; align-items: center; gap: 8px; }
.footer-gif { height: 24px; width: auto; object-fit: contain; }
.sidebar-logo-img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(232, 163, 23, 0.35)); }
.sidebar-logo { font-size: 28px; color: var(--accent-gold); }
.page-section { display: none; }
.page-section.active { display: block; animation: pageIn 0.35s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.fleet-grid, .tactics-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; margin-top: 8px;
}
.car-card, .tactic-card {
    background: var(--bg-card-solid); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 18px; overflow: hidden;
    display: flex; flex-direction: column; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.car-card:hover, .tactic-card:hover {
    transform: translateY(-5px); border-color: rgba(232, 163, 23, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(232, 163, 23, 0.1);
}
.car-img-container, .tactic-img-container { width: 100%; height: 220px; position: relative; background: #05080e; overflow: hidden; }
.tactic-img-container { height: 210px; }
.car-img-container img, .tactic-img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.car-card:hover .car-img-container img, .tactic-card:hover .tactic-img-container img { transform: scale(1.04); }
.car-img-overlay, .tactic-img-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; height: 55%;
    background: linear-gradient(to top, rgba(14, 20, 34, 1) 0%, transparent 100%);
}
.car-body, .tactic-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex-grow: 1; gap: 4px; }
.car-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.car-title, .tactic-title { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: 0.3px; }
.tactic-title { margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.tactic-title i {
    color: var(--accent-gold) !important; width: 28px; height: 28px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center; background: rgba(232, 163, 23, 0.14); font-size: 13px;
}
.car-tags { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.badge-unit {
    display: inline-block; padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 700;
    background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); border: 1px solid rgba(255, 255, 255, 0.12);
}
.car-desc, .tactic-desc { font-size: 14.5px; color: var(--text-secondary); line-height: 1.65; flex-grow: 1; }
.car-card-vip {
    grid-column: 1 / -1; border: 1px solid rgba(232, 163, 23, 0.28);
    background: linear-gradient(135deg, rgba(24, 32, 48, 0.98) 0%, rgba(14, 20, 34, 0.98) 100%);
}
.car-card-vip .car-img-container { height: 360px; }
.fallback-placeholder {
    width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; color: var(--text-secondary);
    background: repeating-linear-gradient(45deg, rgba(255,255,255,0.02), rgba(255,255,255,0.02) 10px, rgba(0,0,0,0.2) 10px, rgba(0,0,0,0.2) 20px);
}
.miranda-quote {
    font-style: italic; color: var(--text-primary); line-height: 1.85; font-size: 15.5px;
    border-left: 3px solid var(--accent-gold); background: rgba(232, 163, 23, 0.06);
    padding: 18px 20px; margin-top: 8px; border-radius: 0 12px 12px 0;
}
@media (max-width: 900px) {
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-wrapper { margin-left: 0; }
    .content-container, .top-bar, footer { padding-left: 20px; padding-right: 20px; }
    .hero-carousel-container { height: 240px; }
}

/* ===== AUTH GATE ===== */
body.auth-pending .app-shell,
body.locked .app-shell { display: none !important; }
body.unlocked .auth-gate { display: none !important; }
body.locked,
body.auth-pending {
    display: block;
    overflow: hidden;
}

.auth-gate [hidden] {
    display: none !important;
}

.auth-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 48px clamp(24px, 6vw, 80px);
    background: #0a1018;
}

.login-bg {
    position: absolute;
    inset: -12px;
    background: url('zdjecia/porsche.jpg') center / cover no-repeat;
    filter: blur(3px) saturate(1.08) brightness(0.78);
    transform: scale(1.04);
    animation: drift 22s ease-in-out infinite alternate;
}

.login-veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            105deg,
            rgba(7, 10, 18, 0.72) 0%,
            rgba(7, 10, 18, 0.38) 42%,
            rgba(7, 10, 18, 0.22) 70%,
            rgba(7, 10, 18, 0.35) 100%
        ),
        radial-gradient(ellipse at 78% 40%, rgba(243, 156, 18, 0.1), transparent 52%);
}

.login-stage {
    position: relative;
    z-index: 2;
    width: min(460px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    animation: rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.login-crest {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 10px 26px rgba(243, 156, 18, 0.45));
    animation: crestIn 0.95s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.login-brand-text {
    display: grid;
    gap: 4px;
    text-align: left;
}

.login-eyebrow {
    font-size: 11px;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: #f39c12;
    font-weight: 800;
}

.login-brand h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(70px, 12vw, 100px);
    line-height: 0.84;
    letter-spacing: 0.05em;
    color: #fff;
    text-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.login-sub {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.7);
}

.login-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    max-width: 380px;
    padding: 22px 22px 20px;
    border-radius: 18px;
    background: rgba(12, 16, 28, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 24px 50px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: rise 0.85s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-lead {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.9);
    max-width: none;
    text-align: center;
}

.login-lead strong {
    color: #f39c12;
    font-weight: 800;
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    width: 100%;
    padding: 6px 18px 6px 6px;
    border-radius: 14px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14.5px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.discord-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: transparent;
    font-size: 20px;
    color: #fff;
}

.discord-btn-label {
    padding-right: 6px;
}

.discord-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.35);
}

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

.discord-btn.secondary {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.discord-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.discord-btn.secondary .discord-btn-icon {
    background: rgba(255, 255, 255, 0.08);
}

.denied-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-error {
    width: 100%;
    padding: 11px 13px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    font-size: 12.5px;
    font-weight: 600;
}

.login-hint {
    font-size: 12px;
    color: rgba(148, 163, 184, 0.88);
    line-height: 1.45;
    text-align: center;
    width: 100%;
}

@keyframes drift {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to { transform: scale(1.07) translate3d(-1%, -0.6%, 0); }
}

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

@keyframes crestIn {
    from { opacity: 0; transform: scale(0.7) rotate(-8deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@media (max-width: 640px) {
    .auth-gate {
        place-items: center;
        padding: 28px 18px;
    }

    .login-stage {
        align-items: stretch;
    }

    .login-brand {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .login-brand-text {
        text-align: center;
        justify-items: center;
    }

    .discord-btn {
        width: 100%;
    }
}

