/* ═══════════════════════════════════════════════════════════════
   ZKAUBA'S DUNGEON - Retro Geocities Wizard Aesthetic
   Color Palette: Black (#000), Hot Pink (#FF1493), Electric Blue (#00BFFF)
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════ FONTS ═══════════ */
@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&family=Press+Start+2P&family=Uncial+Antiqua&display=swap');

:root {
    --black: #000000;
    --dark-purple: #1a0a1a;
    --hot-pink: #FF1493;
    --electric-blue: #00BFFF;
    --magic-purple: #9400D3;
    --gold: #FFD700;
    --star-white: #FFFAF0;

    --font-medieval: 'MedievalSharp', cursive;
    --font-pixel: 'Press Start 2P', cursive;
    --font-uncial: 'Uncial Antiqua', serif;
}

/* ═══════════ RESET & BASE ═══════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--black);
    color: var(--star-white);
    font-family: 'Times New Roman', serif;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><text y="18" font-size="18">✨</text></svg>'), auto;
}

/* ═══════════ STARFIELD BACKGROUND ═══════════ */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse at bottom, var(--dark-purple) 0%, var(--black) 100%);
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, var(--star-white), transparent),
        radial-gradient(2px 2px at 40px 70px, var(--hot-pink), transparent),
        radial-gradient(1px 1px at 90px 40px, var(--electric-blue), transparent),
        radial-gradient(2px 2px at 160px 120px, var(--star-white), transparent),
        radial-gradient(1px 1px at 230px 80px, var(--hot-pink), transparent),
        radial-gradient(2px 2px at 300px 150px, var(--electric-blue), transparent),
        radial-gradient(1px 1px at 370px 50px, var(--star-white), transparent),
        radial-gradient(2px 2px at 450px 180px, var(--hot-pink), transparent),
        radial-gradient(1px 1px at 520px 90px, var(--star-white), transparent),
        radial-gradient(2px 2px at 600px 200px, var(--electric-blue), transparent);
    background-size: 650px 250px;
    animation: twinkle 8s ease-in-out infinite alternate;
}

.stars:nth-child(2) {
    background-position: 50px 50px;
    animation-delay: -2s;
    opacity: 0.7;
}

.stars:nth-child(3) {
    background-position: 100px 100px;
    animation-delay: -4s;
    opacity: 0.5;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ═══════════ MAGICAL BORDERS ═══════════ */
.magic-border {
    border: 3px solid var(--hot-pink);
    box-shadow:
        0 0 10px var(--hot-pink),
        0 0 20px var(--magic-purple),
        inset 0 0 10px rgba(255, 20, 147, 0.3);
    background: rgba(0, 0, 0, 0.8);
}

.double-border {
    border: 4px double var(--electric-blue);
    box-shadow: 0 0 15px var(--electric-blue);
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
}

/* ═══════════ GLOWING TEXT ═══════════ */
.glow-pink {
    color: var(--hot-pink);
    text-shadow:
        0 0 5px var(--hot-pink),
        0 0 10px var(--hot-pink),
        0 0 20px var(--magic-purple);
}

.glow-blue {
    color: var(--electric-blue);
    text-shadow:
        0 0 5px var(--electric-blue),
        0 0 10px var(--electric-blue),
        0 0 20px #0066cc;
}

.glow-gold {
    color: var(--gold);
    text-shadow:
        0 0 5px var(--gold),
        0 0 10px #FFA500;
}

/* ═══════════ TYPOGRAPHY ═══════════ */
h1,
h2,
h3 {
    font-family: var(--font-uncial);
}

.title-main {
    font-size: clamp(2rem, 6vw, 4rem);
    text-align: center;
    margin: 20px 0;
    letter-spacing: 4px;
}

.title-section {
    font-family: var(--font-medieval);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    margin: 15px 0;
}

.pixel-text {
    font-family: var(--font-pixel);
    font-size: 10px;
    line-height: 1.8;
}

/* ═══════════ BLINK & MARQUEE ═══════════ */
.blink {
    animation: blink-animation 1s steps(2, start) infinite;
}

@keyframes blink-animation {
    to {
        visibility: hidden;
    }
}

.marquee {
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* ═══════════ LAYOUT ═══════════ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-layout {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* ═══════════ NAVIGATION ═══════════ */
.nav-wizard {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.nav-link {
    display: block;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    font-family: var(--font-medieval);
    font-size: 1.2rem;
    color: var(--electric-blue);
    border: 2px solid var(--electric-blue);
    background: rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--electric-blue);
    color: var(--black);
    box-shadow: 0 0 20px var(--electric-blue);
    transform: scale(1.05);
}

/* ═══════════ WELCOME BANNER ═══════════ */
.welcome-banner {
    padding: 30px;
    margin: 20px 0;
    text-align: center;
}

.welcome-text {
    font-family: var(--font-medieval);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

/* ═══════════ SIDEBAR WIDGETS ═══════════ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    padding: 15px;
    text-align: center;
}

.widget-title {
    font-family: var(--font-medieval);
    font-size: 1rem;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--hot-pink);
}

/* ═══════════ VISITOR COUNTER ═══════════ */
.visitor-counter {
    font-family: var(--font-pixel);
    font-size: 12px;
    padding: 10px;
    background: #111;
    border: 2px inset #444;
    display: inline-block;
}

.counter-display {
    background: #000;
    color: #0f0;
    padding: 5px 10px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* ═══════════ DECORATIVE DIVIDERS ═══════════ */
.divider-stars {
    text-align: center;
    padding: 10px 0;
    font-size: 1.5rem;
    letter-spacing: 10px;
    color: var(--hot-pink);
}

.divider-line {
    height: 3px;
    background: linear-gradient(90deg,
            transparent,
            var(--hot-pink),
            var(--electric-blue),
            var(--hot-pink),
            transparent);
    margin: 20px 0;
}

/* ═══════════ BUTTONS ═══════════ */
.btn-magic {
    display: inline-block;
    padding: 15px 30px;
    font-family: var(--font-medieval);
    font-size: 1.2rem;
    color: var(--star-white);
    background: linear-gradient(180deg, var(--magic-purple), var(--hot-pink));
    border: 2px solid var(--gold);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-magic:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px var(--hot-pink);
}

/* ═══════════ GALLERY STYLES ═══════════ */
.gallery-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding: 20px;
}

@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: 1fr;
    }
}

.tag-sidebar {
    padding: 20px;
}

.tag-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tag-btn {
    display: block;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--hot-pink);
    color: var(--hot-pink);
    font-family: var(--font-pixel);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.tag-btn:hover,
.tag-btn.active {
    background: var(--hot-pink);
    color: var(--black);
    box-shadow: 0 0 10px var(--hot-pink);
}

.tag-btn .tag-count {
    float: right;
    opacity: 0.7;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border: 3px solid var(--electric-blue);
    background: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px var(--electric-blue);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-purple), var(--black));
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--hot-pink);
}

.gallery-item-placeholder .icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.gallery-item-tags {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-tags {
    opacity: 1;
}

.item-tag {
    font-size: 9px;
    padding: 2px 6px;
    background: var(--magic-purple);
    color: var(--star-white);
    font-family: var(--font-pixel);
}

/* ═══════════ LIGHTBOX ═══════════ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 70vh;
    border: 4px solid var(--hot-pink);
    box-shadow: 0 0 30px var(--hot-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: var(--star-white);
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--hot-pink);
}

.lightbox-tags {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ═══════════ UNDER CONSTRUCTION ═══════════ */
.under-construction {
    text-align: center;
    padding: 10px;
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--gold);
}

/* ═══════════ FOOTER ═══════════ */
.footer-wizard {
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    border-top: 2px solid var(--hot-pink);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--electric-blue);
    text-decoration: none;
    font-family: var(--font-pixel);
    font-size: 10px;
}

.footer-links a:hover {
    color: var(--hot-pink);
    text-decoration: underline;
}

/* ═══════════ CUSTOM SCROLLBAR ═══════════ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--hot-pink), var(--electric-blue));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--magic-purple);
}

/* ═══════════ UTILITY CLASSES ═══════════ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}