/* ========================================= */
/* 1. GLOBAL SETTINGS & VARIABLES            */
/* ========================================= */
html {
    scroll-padding-top: 90px;
    scroll-behavior: smooth;
}

:root {
    --primary-green: #4a8f29;
    --dark-green: #2e4a18;
    --wood-light: #8d6e4b;
    --wood-dark: #3e2714;
    --gold: #ffcc00;
    --text-light: #f0f0f0;
    --bg-dark: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Signika', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* ========================================= */
/* 2. NAVIGATION BAR                         */
/* ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: url('zdjecia/bar.jpg') repeat-x center;
    background-size: auto 100%;
    height: 70px;
    border-bottom: 4px solid #221508;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-logo {
    height: 70px; 
    margin-top: 5px; 
    transition: transform 0.3s ease;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.5));
}

.nav-logo:hover {
    transform: scale(1.1) rotate(-5deg);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #ffeebb;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s;
    font-size: 1.1rem;
    text-shadow: 0 2px 2px rgba(0,0,0,0.8);
    font-family: 'Fredoka', sans-serif;
}

.nav-links a:hover {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

.store-link {
    color: var(--gold) !important;
}

.active-page {
    border-bottom: 2px solid var(--gold);
}

.cta-btn {
    background: linear-gradient(to bottom, #5d3a1a, #3e2714);
    border: 2px solid #291a0d;
    color: var(--gold);
    padding: 8px 25px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.1s;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    text-shadow: 0 1px 1px black;
}

.cta-btn:active {
    transform: translateY(2px);
}

/* ========================================= */
/* 3. HERO SECTION                           */
/* ========================================= */
#hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.3)), url('zdjecia/tlo.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 70px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 1.5s ease;
    position: relative; 
}

.hero-main-logo {
    width: 650px;
    max-width: 90%;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.8));
    position: relative;
    z-index: 10; 
}

.server-tagline {
    font-size: 1.4rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px black, 0 0 10px rgba(0,0,0,0.5);
    font-weight: bold;
    background: rgba(0,0,0,0.4);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 1; 
}

.server-ip-container {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid var(--wood-light);
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}

.server-ip-container:hover {
    background: rgba(20, 20, 20, 0.9);
    transform: scale(1.05);
}

.ip-label { color: #aaa; font-weight: 300; }
.ip-address { color: var(--gold); font-weight: bold; font-size: 1.2rem; letter-spacing: 1px; }

#copy-confirmation {
    margin-top: 15px;
    color: #4fffaa;
    font-weight: bold;
    text-shadow: 0 2px 4px black;
    opacity: 0;
    transition: opacity 0.3s;
}

/* ========================================= */
/* 4. GAMEMODES SECTION                      */
/* ========================================= */
#gamemodes {
    padding: 80px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url("zdjecia/tlo2.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-top: 6px solid var(--wood-dark);
    box-shadow: inset 0 20px 50px rgba(0,0,0,0.8);
}

.section-title {
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-size: 3.5rem;
    color: var(--wood-light);
    margin-bottom: 50px;
    text-shadow: 3px 3px 0px #221508, 0 0 20px rgba(0,0,0,0.8);
    -webkit-text-stroke: 1px #221508;
}

.cards-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Standard Card Style (Home) */
.card {
    background: rgba(30, 30, 30, 0.9);
    border: 4px solid var(--wood-light);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    width: 380px;
    max-width: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.7);
    border-color: var(--gold);
}

.card-image {
    height: 180px;
    background-color: #111;
    background-size: cover;
    background-position: center;
    border-bottom: 4px solid var(--wood-dark);
}

.survival-bg { background-image: url('zdjecia/arena.png'); }
.creative-bg { background-image: url('zdjecia/soon.png'); }
.minigames-bg { background-image: url('zdjecia/soon.png'); }

.card-content {
    padding: 25px;
    text-align: center;
}

.card-content h3 {
    color: var(--gold);
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-family: 'Fredoka', sans-serif;
    text-shadow: 2px 2px 0px black;
}

.card-content p {
    color: #ddd;
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.card-btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--wood-dark);
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: 0.3s;
    border: 1px solid var(--wood-light);
    text-transform: uppercase;
}

.card-btn:hover {
    background-color: var(--wood-light);
    color: #221508;
    box-shadow: 0 0 10px var(--gold);
}

/* ========================================= */
/* 5. STORE PAGE STYLES                      */
/* ========================================= */

#store-header {
    height: 40vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('zdjecia/tlo.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 70px;
    border-bottom: 5px solid var(--wood-dark);
}

.store-header-content h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 4rem;
    color: var(--gold);
    text-shadow: 3px 3px 0 #3e2714;
    margin-bottom: 10px;
}

.store-header-content p {
    font-size: 1.2rem;
    color: #eee;
}

#store-items {
    padding: 80px 20px;
    background: linear-gradient(to bottom, #1a1a1a, #111);
    background-image: url('zdjecia/tlo2.jpg');
    background-blend-mode: overlay;
    background-size: cover;
    background-attachment: fixed;
}

/* --- THE STORE CARDS (STRUCTURE) --- */
.store-card {
    /* No border or background here! The child (.card-bg) handles it. */
    background: transparent;
    border: none;
    border-radius: 15px;
    /* Visible so Crown can stick out */
    overflow: visible; 
    transition: transform 0.4s ease;
    margin-top: 50px; 
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.store-card:hover {
    transform: translateY(-10px);
}

/* INNER CARD BACKGROUND (The actual card look) */
.card-bg {
    background-color: #222;
    border-radius: 15px;
    /* Hidden so Ribbon cuts off */
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Rank Header */
.rank-header {
    height: 120px; 
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.rank-header h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.5rem;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.6); 
    letter-spacing: 2px;
}

/* SHINING CROWN (Outside .card-bg) */
.shining-crown {
    position: absolute;
    top: -35px; /* Above the card */
    left: 50%;
    transform: translateX(-50%);
    font-size: 3.5rem;
    filter: drop-shadow(0 0 5px gold);
    animation: crownShine 2s ease-in-out infinite alternate;
    z-index: 10;
}

@keyframes crownShine {
    from { 
        filter: drop-shadow(0 0 5px gold); 
        transform: translateX(-50%) scale(1);
    }
    to { 
        filter: drop-shadow(0 0 20px #ffea00) brightness(1.3);
        transform: translateX(-50%) scale(1.1);
    }
}

/* Card Content Area */
.store-card .card-content {
    padding: 30px 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    background: linear-gradient(to bottom, rgba(0,0,0,0) 25%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.85) 100%);
}

/* --- SPECIFIC RANK STYLES (Applied to .card-bg) --- */

/* 1. VIP */
.rank-vip .card-bg {
    background-image: url('zdjecia/VIP.png');
    border: 3px solid #2ecc71;
}
.rank-vip .rank-header h3 { color: #2ecc71; }
.rank-vip .buy-btn { background: linear-gradient(to right, #2ecc71, #27ae60); color: white; }
.rank-vip:hover .card-bg { box-shadow: 0 0 40px rgba(46, 204, 113, 0.5); }

/* 2. HERO */
.rank-hero .card-bg {
    background-image: url('zdjecia/HERO.png');
    border: 3px solid #3498db;
}
.rank-hero .rank-header h3 { color: #3498db; }
.rank-hero .buy-btn { background: linear-gradient(to right, #3498db, #2980b9); color: white; }
.rank-hero:hover .card-bg { box-shadow: 0 0 40px rgba(52, 152, 219, 0.5); }

/* 3. LEGEND */
.rank-legend .card-bg {
    background-image: url('zdjecia/LEGEND.png');
    border: 3px solid #f1c40f;
    animation: glowPulse 3s infinite; /* Pulse animation on border */
}
.rank-legend .rank-header h3 { color: #f1c40f; }
.rank-legend .buy-btn { background: linear-gradient(to right, #f1c40f, #d35400); color: #3e2714; }
.rank-legend:hover .card-bg { box-shadow: 0 0 50px rgba(241, 196, 15, 0.6); }

@keyframes glowPulse {
    0% { box-shadow: 0 0 20px rgba(241, 196, 15, 0.2); }
    50% { box-shadow: 0 0 40px rgba(241, 196, 15, 0.5); }
    100% { box-shadow: 0 0 20px rgba(241, 196, 15, 0.2); }
}

/* Typography & Lists */
.price-tag {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    font-family: 'Fredoka', sans-serif;
    margin-bottom: 5px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.rank-desc {
    color: #ddd;
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-style: italic;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* FIXED HEIGHT FOR FEATURES LIST */
.rank-features {
    text-align: left;
    background: rgba(0,0,0,0.6); 
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(2px);
    height: 260px; /* Force consistent height */
    overflow-y: auto; 
}

.rank-features li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #eee;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.rank-features li::before {
    content: "✦"; 
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.1rem;
}

.rank-vip .rank-features li::before { color: #2ecc71; }
.rank-hero .rank-features li::before { color: #3498db; }
.rank-legend .rank-features li::before { color: #f1c40f; }

.buy-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.1rem;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.buy-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* BEST VALUE RIBBON (FIXED INSIDE CARD-BG) */
.ribbon {
    position: absolute;
    top: 20px;
    right: -35px; /* Pushes it right so corners are hidden */
    transform: rotate(45deg);
    background: linear-gradient(90deg, #f12711, #f5af19);
    color: white;
    font-weight: bold;
    width: 150px; /* Width needed to span the corner */
    text-align: center;
    padding: 8px 0;
    font-size: 0.8rem;
    box-shadow: 0 5px 10px rgba(0,0,0,0.5);
    z-index: 10;
    letter-spacing: 1px;
}

/* ========================================= */
/* 6. SUB-PAGES (ARENA & SOON)               */
/* ========================================= */

#arena-header {
    height: 50vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('zdjecia/tlo2.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 70px;
    border-bottom: 5px solid var(--wood-dark);
}

#soon-header {
    height: 50vh;
    background: linear-gradient(rgba(20, 20, 20, 0.7), rgba(40, 30, 10, 0.6)), url('zdjecia/tlo2.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 70px;
    border-bottom: 5px solid var(--wood-dark);
}

.header-content h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 4rem;
    color: var(--gold);
    text-shadow: 4px 4px 0 #3e2714;
    margin-bottom: 10px;
}

.header-content p {
    font-size: 1.5rem;
    color: #eee;
    text-shadow: 2px 2px 4px black;
}

.page-content {
    padding: 60px 20px;
    background-color: #222;
    background-image: url('zdjecia/tlo.jpg');
    background-blend-mode: multiply;
    background-size: cover;
    min-height: 60vh;
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* LORE CARD / INFO BLOCK STYLES */
.info-block-container {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Space between sections */
}

/* The New "Lore Card" Look */
.lore-card {
    background: rgba(30, 30, 30, 0.85); /* Darker, cleaner background */
    padding: 25px;
    border-radius: 0 10px 10px 0; /* Rounded on right only */
    border-left: 5px solid var(--wood-light); /* Accent line on left */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Hover Effect: The card glows and moves slightly right */
.lore-card:hover {
    transform: translateX(5px);
    border-left-color: var(--gold);
    background: rgba(40, 40, 40, 0.9);
    box-shadow: 0 5px 25px rgba(255, 204, 0, 0.1);
}

/* Header Styling within cards */
.lore-card h2, .lore-card h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 15px; /* Space between Emoji and Text */
}

.lore-card h3 {
    color: #e0e0e0; /* Slightly lighter white for subheaders */
    font-size: 1.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Emoji Styling - Make them pop */
.lore-emoji {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

/* Highlight strong text */
.lore-card strong {
    color: var(--gold);
    font-weight: 600;
}

/* Special "Call to Action" Box at the bottom */
.lore-cta {
    text-align: center;
    border-left: 5px solid var(--primary-green);
    background: linear-gradient(to right, rgba(46, 74, 24, 0.8), rgba(30, 30, 30, 0.8));
}

.lore-cta ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 1.2rem;
    font-family: 'Fredoka', sans-serif;
}

/* Sidebar Styling */
.info-sidebar h3 {
    color: var(--wood-light);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.status-box {
    background: rgba(30, 30, 30, 0.9);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--wood-dark);
    margin-bottom: 20px;
}

.status-box p {
    margin: 10px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.status-box span {
    font-weight: bold;
    font-family: 'Fredoka', sans-serif;
    letter-spacing: 1px;
}

.big-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    text-align: center;
}

/* ========================================= */
/* 7. POPUP MODAL (DARK THEME)               */
/* ========================================= */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #1a1a1a;
    background-image: url('zdjecia/tlo2.jpg'); 
    background-size: cover;
    background-position: center;
    margin: 10% auto; 
    padding: 40px;
    border: 4px solid var(--wood-light);
    box-shadow: 
        0 0 0 4px #3e2714, /* Double border effect */
        0 0 50px rgba(0,0,0,0.8);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    color: white;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #888;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
}

.close-modal:hover { color: #ff5555; transform: scale(1.1); }

#modal-title {
    font-family: 'Fredoka', sans-serif;
    color: white;
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 #111;
}

#modal-item-name {
    color: var(--gold);
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

/* Input Styling */
.input-group {
    margin: 30px 0;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--wood-light);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Forces the input to be dark with light text */
.input-group input {
    width: 100%;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.6) !important;
    border: 2px solid #5c3a21;
    color: var(--gold) !important;
    border-radius: 6px;
    font-size: 1.1rem;
    font-family: 'Signika', sans-serif;
    outline: none;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(74, 143, 41, 0.5);
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Checkout Button */
.checkout-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(to bottom, var(--primary-green), var(--dark-green));
    border: 2px solid #2e4a18;
    color: white;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    box-shadow: 0 5px 0 #1f3310;
}

.checkout-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #1f3310;
}

.checkout-btn span {
    color: var(--gold);
    font-weight: bold;
}

/* ========================================= */
/* 8. FOOTER & ANIMATIONS                    */
/* ========================================= */
footer {
    background: #111;
    padding: 50px 20px;
    text-align: center;
    border-top: 6px solid var(--wood-light);
    background-image: url("zdjecia/stopka.jpg");
    background-blend-mode: multiply;
}

.footer-logo {
    height: 70px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.socials {
    margin-top: 25px;
}

.socials a {
    color: #aaa;
    margin: 0 15px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    transition: color 0.3s;
    text-transform: uppercase;
}

.socials a:hover {
    color: var(--gold);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-main-logo { width: 100%; }
    .server-tagline { font-size: 1.1rem; }
    .content-container { grid-template-columns: 1fr; }
}