/* ==========================================================================
   ZMIENNE I KONFIGURACJA GLOBALNA
========================================================================== */
:root {
    --bg-dark: #0b0503;
    --bg-darker: #000000;
    --text-primary: #f8fafc;
    --text-secondary: #b8a494;
    --accent: #ff8000;
    --accent2: #f8fafc;
    --copper: #b87333;
    --orange-glow: rgba(255, 120, 0, 0.1);
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Exo 2', sans-serif;
}

html {
    scroll-behavior: smooth;
}

#circuit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-dark);
}

body {
    background-color: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-accent {
    color: var(--accent) !important;
}

.italic {
    font-style: italic;
}

/* ==========================================================================
   NAWIGACJA
========================================================================== */
.navbar-elegant {
    background: rgba(20, 14, 6, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 120, 0, 0.2);
    padding: 15px 0;
    z-index: 1000;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-style: italic;
    font-size: 1.8rem;
    color: var(--copper) !important;
    text-decoration: none;
}

.nav-link {
    color: var(--text-primary) !important;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-style: italic;
    margin-left: 20px;
}

.nav-link:hover {
    color: var(--accent) !important;
}

/* ==========================================================================
   KOMPONENTY WSPÓLNE
========================================================================== */
.section-elegant {
    padding: 100px 0;
}

.btn-elegant {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
    border-radius: 0;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 15px 35px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-elegant:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 4px 4px 0px #ffffff;
    transform: translate(-4px, -4px);
}

.glass-card {
    position: relative;
    background: rgba(11, 5, 3, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 128, 0, 0.2);
    padding: 25px 30px;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.bg-accent {
    background-color: var(--accent) !important;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   STRONA GŁÓWNA (index.html)
========================================================================== */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, var(--orange-glow) 0%, rgba(0, 0, 0, 0) 50%);
}

.typewriter-cursor::after {
    content: '_';
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

#about {
    position: relative;
    background: radial-gradient(ellipse at center, rgba(255, 120, 0, 0.12) 0%, rgba(11, 5, 3, 0) 75%);
}

.about-grid {
    position: relative;
    height: 400px;
}

.grid-img {
    position: absolute;
    border: 3px solid var(--copper);
    box-shadow: 10px 10px 0px rgba(0,0,0,0.5);
    transition: all 0.4s ease;
    object-fit: cover;
}

.grid-img:hover {
    transform: scale(1.05) translate(-5px, -5px);
    z-index: 10;
    box-shadow: 15px 15px 0px rgba(255, 255, 255, 0.2);
}

.img-1 { width: 60%; height: 250px; top: 0; left: 0; z-index: 3; }
.img-2 { width: 50%; height: 200px; bottom: 0; left: 20%; z-index: 4; }
.img-3 { width: 45%; height: 220px; top: 10%; right: 0; z-index: 2; }

/* --- KARUZELA STACKED --- */
.carousel-stacked-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-stacked-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 2.5rem;
    cursor: pointer;
    transition: 0.3s;
    z-index: 100;
}

.carousel-stacked {
    position: relative;
    width: 50%;
    max-width: 500px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stacked-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    border: 1px solid rgba(255, 128, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.stacked-card.active {
    transform: translateX(0) scale(1);
    z-index: 50;
    opacity: 1;
    border-color: var(--accent);
}

.stacked-card.next {
    transform: translateX(65%) scale(0.85);
    z-index: 30;
    filter: brightness(0.5);
    cursor: pointer;
}

.stacked-card.prev {
    transform: translateX(-65%) scale(0.85);
    z-index: 30;
    filter: brightness(0.5);
    cursor: pointer;
}

.stacked-card.prev {
    transform: translateX(-65%) scale(0.85);
    z-index: 30;
    opacity: 0.4;
    cursor: pointer;
}

/* ==========================================================================
   INICJATYWY (initiative.html)
========================================================================== */
.cyber-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0;
}

.cyber-timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 128, 0, 0.3);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    box-shadow: 0 0 15px rgba(255, 128, 0, 0.5);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    z-index: 2;
}

.timeline-item:not(:first-child) {
    margin-top: -100px;
}

.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-darker);
    border: 3px solid var(--accent);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item.right .timeline-dot { left: -8px; }

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 15px var(--accent);
    background-color: var(--accent);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    font-size: 0.8rem;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    padding: 4px 10px;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.card-date-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-darker);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 4px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 10;
    white-space: nowrap;
}

/* ==========================================================================
   PLANER KGP (KGP.html)
========================================================================== */
.planner-body {
    overflow: hidden;
}

.split-layout {
    display: flex;
    margin-top: 70px;
    height: calc(100vh - 70px);
    width: 100vw;
}

.map-section {
    flex-grow: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.archive-section {
    width: 340px;
    background: rgba(11, 5, 3, 0.95);
    border-left: 1px solid var(--accent);
    display: flex;
    flex-direction: column;
    padding: 25px;
    z-index: 10;
}

.custom-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 128, 0, 0.3);
    color: var(--text-primary);
    padding: 10px 15px;
}

.db-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.db-item {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 128, 0, 0.2);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.db-item.conquered {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.cyber-checkbox {
    width: 22px;
    height: 22px;
    appearance: none;
    border: 2px solid var(--accent);
    cursor: pointer;
}

.cyber-checkbox:checked {
    background: #28a745;
    border-color: #28a745;
}

/* --- ELEMENTY MAPY --- */
.cyber-marker {
    width: 16px !important;
    height: 16px !important;
    background-color: var(--bg-darker);
    border: 3px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
}

.leaflet-tooltip.cyber-tooltip {
    background: rgba(11, 5, 3, 0.95);
    border: 1px solid var(--accent);
    color: white;
    font-family: var(--font-heading);
    padding: 5px 12px;
}

/* --- MODALE --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-modal {
    position: relative;
    width: 90%;
    max-width: 650px;
    background: rgba(11, 5, 3, 0.95);
    border: 1px solid var(--accent);
    padding: 40px;
}

.close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-box {
    border: 1px solid rgba(255, 128, 0, 0.2);
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding: 5px 0;
    font-size: 0.9rem;
}

/* ==========================================================================
   SYSTEM AUTH
========================================================================== */
.logout-fixed {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 5000;
    padding: 8px 20px;
    background: rgba(11, 5, 3, 0.9);
}

.btn-outline-danger {
    border: 1px solid #dc3545;
    color: #dc3545;
    background: transparent;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSYWNOŚĆ)
========================================================================== */
@media (max-width: 991px) {
    .split-layout {
        flex-direction: column;
        height: auto;
        margin-top: 70px;
    }
    .map-section {
        height: 50vh;
    }
    .archive-section {
        width: 100%;
        min-height: 50vh;
    }
    .modal-grid {
        grid-template-columns: 1fr;
    }
    .planner-body {
        overflow: auto;
    }
}

@media (max-width: 768px) {
    .carousel-stacked {
        width: 80%;
        height: 450px;
    }
    .stacked-card.next,
    .stacked-card.prev {
        z-index: 10;
        opacity: 0;
        pointer-events: none;
    }

    .cyber-timeline::after {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 15px;
    }
    .timeline-item.right {
        left: 0;
    }
    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot {
        left: 12px;
    }
}
/* ==========================================================================
   STRONA O MNIE (BENTO GRID & PROFILE)
========================================================================== */

.profile-frame {
    position: relative;
    padding: 15px;
}

.profile-img {
    border-radius: 5px;
    position: relative;
    z-index: 2;
    filter: grayscale(30%);
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 128, 0, 0.3);
}

.frame-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    height: 80%;
    border-top: 4px solid var(--accent);
    border-left: 4px solid var(--accent);
    z-index: 1;
}

.profile-frame:hover .profile-img {
    filter: grayscale(0%);
    transform: translate(10px, 10px);
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 20px;
    margin-top: 50px;
}

.bento-item {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0; /* Override glass-card padding for images */
}

.bento-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: all 0.5s ease;
}

.bento-item:hover img {
    opacity: 0.5;
    transform: scale(1.1);
}

.bento-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.bento-main {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
}

.bento-side {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    justify-content: center;
}

.bento-bottom {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    flex-direction: row-reverse;
}

/* Responsywność Bento */
@media (max-width: 991px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-main, .bento-side, .bento-bottom {
        grid-column: auto;
        grid-row: auto;
        min-height: 300px;
    }
}
.display-4{
    align-items: center;
}