/* ============================================
   ATOMIC BOMBERMAN IMAGE GALLERY
   90s Retro Styling
   ============================================ */

:root {
    --hot-pink: #ff00ff;
    --cyan: #00ffff;
    --lime: #00ff00;
    --yellow: #ffff00;
    --orange: #ff6600;
    --navy: #000033;
    --dark-purple: #330033;
    --light-purple: #9933ff;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, var(--navy) 0%, var(--dark-purple) 50%, var(--navy) 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

@keyframes float-up {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-up-2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-25px); }
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* ============================================
   HEADER SECTION
   ============================================ */

.header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
    animation: slideInUp 1s ease-out;
}

.header-image-wrapper {
    margin-bottom: 20px;
}

.title-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 10px var(--hot-pink)) drop-shadow(0 0 5px var(--cyan));
    animation: pulse 3s ease-in-out infinite;
}

.main-title {
    font-family: "Comic Sans MS", "Chalkboard SE", monospace;
    font-size: 4rem;
    font-weight: bold;
    color: var(--hot-pink);
    text-shadow:
        3px 3px 0 var(--cyan),
        6px 6px 0 var(--lime),
        -2px -2px 0 var(--orange);
    letter-spacing: 2px;
    animation: neon-flicker 4s ease-in-out infinite;
    margin: 20px 0;
}

.subtitle {
    font-family: "Comic Sans MS", "Chalkboard SE", monospace;
    font-size: 1.3rem;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
    font-style: italic;
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */

.decoration {
    position: fixed;
    z-index: 5;
    pointer-events: none;
}

.decoration-image {
    image-rendering: pixelated;
    width: 100%;
    height: auto;
}

.bombdude {
    left: 20px;
    top: 200px;
    width: 120px;
    animation: float-up 4s ease-in-out infinite;
}

.pow-flame {
    right: 30px;
    top: 300px;
    width: 100px;
    animation: float-up 5s ease-in-out infinite;
}

.pow-bomb {
    right: 40px;
    top: 600px;
    width: 90px;
    animation: float-up-2 6s ease-in-out infinite;
}

@media (max-width: 768px) {
    .decoration {
        display: none;
    }
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */

.toc-section {
    background: linear-gradient(135deg, var(--dark-purple), var(--navy));
    border: 5px ridge var(--hot-pink);
    padding: 30px;
    margin-bottom: 60px;
    border-radius: 10px;
    box-shadow:
        0 8px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    animation: slideInUp 1s ease-out;
}

.toc-title {
    font-family: "Comic Sans MS", "Chalkboard SE", monospace;
    font-size: 1.8rem;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
    text-align: center;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.toc-nav {
    max-width: 600px;
    margin: 0 auto;
}

.toc-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.toc-list li a {
    display: block;
    padding: 12px 15px;
    background: linear-gradient(135deg, #6600cc, #9933ff);
    border: 3px outset var(--lime);
    border-radius: 5px;
    color: var(--lime);
    text-decoration: none;
    font-weight: bold;
    text-shadow: 0 0 5px var(--lime);
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.toc-list li a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #7700dd, #aa44ff);
    color: var(--yellow);
    text-shadow: 0 0 10px var(--yellow);
}

.toc-list li a:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
    border-style: inset;
}

/* ============================================
   SECTION BACK TO TOC
   ============================================ */

.section-toc {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 3px solid var(--hot-pink);
}

.back-to-toc {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6600cc, #9933ff);
    border: 3px outset var(--cyan);
    border-radius: 5px;
    color: var(--cyan);
    text-decoration: none;
    font-weight: bold;
    text-shadow: 0 0 5px var(--cyan);
    transition: all 0.2s;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    font-size: 0.95rem;
}

.back-to-toc:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #7700dd, #aa44ff);
    color: var(--lime);
    text-shadow: 0 0 10px var(--lime);
}

.back-to-toc:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
    border-style: inset;
}

/* ============================================
   GALLERY SECTIONS
   ============================================ */

.gallery-section {
    margin-bottom: 60px;
    position: relative;
    z-index: 10;
    animation: slideInUp 1s ease-out forwards;
}

.section-title {
    font-family: "Comic Sans MS", "Chalkboard SE", monospace;
    font-size: 2.2rem;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1), rgba(0, 255, 255, 0.1));
    border: 5px ridge var(--hot-pink);
    border-radius: 10px;
}

/* ============================================
   IMAGE GRID
   ============================================ */

.images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
}

.images-grid.single-image {
    grid-template-columns: 1fr;
    width: 100%;
}

/* Power-ups section uses multiple columns */
#powerups .images-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    max-width: 100%;
}

/* ============================================
   IMAGE CARD
   ============================================ */

.image-card {
    background: linear-gradient(135deg, #6600cc, #9933ff);
    border: 5px ridge var(--hot-pink);
    padding: 15px;
    border-radius: 10px;
    box-shadow:
        0 8px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 12px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 15px var(--hot-pink);
}

.image-card:active {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.gallery-image {
    width: auto;
    height: auto;
    image-rendering: pixelated;
    margin-bottom: 10px;
    display: block;
}

.image-name {
    font-family: "Courier New", monospace;
    font-size: 0.75rem;
    color: var(--cyan);
    text-shadow: 0 0 5px var(--cyan);
    text-align: center;
    word-break: break-all;
    font-weight: bold;
    width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 5px ridge var(--hot-pink);
    background: linear-gradient(135deg, var(--dark-purple), var(--navy));
    color: var(--cyan);
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

.footer a {
    color: var(--lime);
    text-decoration: none;
    text-shadow: 0 0 5px var(--lime);
    transition: all 0.2s;
    font-weight: bold;
    margin: 0 10px;
}

.footer a:hover {
    color: var(--hot-pink);
    text-shadow: 0 0 10px var(--hot-pink);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .toc-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .toc-section {
        padding: 20px;
    }

    .toc-title {
        font-size: 1.4rem;
    }

    #powerups .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .title-image {
        max-width: 300px;
    }

    .header {
        margin-bottom: 30px;
    }

    .container {
        padding: 15px;
    }

    .section-title {
        font-size: 1.6rem;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .toc-list {
        grid-template-columns: 1fr;
    }

    .toc-section {
        padding: 15px;
        margin-bottom: 40px;
    }

    .toc-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .toc-list li a {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    #powerups .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .main-title {
        font-size: 1.8rem;
        text-shadow:
            2px 2px 0 var(--cyan),
            4px 4px 0 var(--lime);
    }

    .title-image {
        max-width: 250px;
    }

    .section-title {
        font-size: 1.2rem;
        padding: 12px;
        margin-bottom: 25px;
    }


    .image-name {
        font-size: 0.65rem;
    }

    .container {
        padding: 10px;
    }

    .gallery-section {
        margin-bottom: 40px;
    }
}
