/* ===== 1333 COVENANT GALLERY - Purple Y2K Theme ===== */

/* ===== CSS VARIABLES & RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #8B5CF6;
    --primary-lavender: #C4B5FD;
    --accent-pink: #FF6B9D;
    --accent-magenta: #E879F9;
    --accent-rose: #FDA4AF;
    --chrome-purple: #7C3AED;
    --deep-purple: #1a0a2e;
    --holy-white: #FFFEF0;
    --bg-cream: #FDF4FF;
    --window-lavender: #DDD6FE;
    --window-violet: #C4B5FD;
    --text-dark: #1a0a2e;
    --border-purple: #A78BFA;
    --soft-pink: #F9A8D4;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'VT323', monospace;
    background: transparent;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 0;
    font-size: 1.1em;
}

/* ===== GIF BACKGROUND ===== */
.gif-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gif-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== BACKGROUND PATTERN ===== */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background-image:
        radial-gradient(circle at 20% 80%, var(--accent-pink) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--accent-magenta) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, var(--primary-lavender) 0%, transparent 30%);
}

/* ===== HEADER ===== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(221, 214, 254, 0.25) 0%, rgba(196, 181, 253, 0.25) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 4px solid var(--border-purple);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.3);
    padding: 15px 25px;
    text-align: center;
}

header::after {
    content: '';
    display: block;
    height: 6px;
    margin-top: 12px;
    background: linear-gradient(90deg,
        #C4B5FD, #E879F9, #A78BFA, #8B5CF6,
        #7C3AED, #6D28D9, #C4B5FD);
    background-size: 200% 100%;
    animation: rainbowMove 3s linear infinite;
}

@keyframes rainbowMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

header h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.6rem;
    background: linear-gradient(180deg, var(--primary-lavender) 0%, var(--accent-magenta) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 0 var(--deep-purple));
    margin-bottom: 8px;
    line-height: 1.4;
}

header h1 img {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 8px;
    image-rendering: pixelated;
}

header p {
    font-family: 'Cyrivendell', serif;
    font-size: 1.1rem;
    color: var(--primary-lavender);
    letter-spacing: 3px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    margin-bottom: 6px;
}

header > a {
    font-family: 'Boldness Race', sans-serif;
    font-size: 0.95rem;
    padding: 8px 20px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.5) 0%, rgba(124, 58, 237, 0.5) 100%);
    border: 3px solid var(--deep-purple);
    color: var(--primary-lavender);
    text-decoration: none;
    box-shadow: 3px 3px 0 var(--deep-purple);
    transition: all 0.2s;
    display: inline-block;
    margin-top: 5px;
}

header > a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--deep-purple);
    background: linear-gradient(180deg, rgba(255, 107, 157, 0.5) 0%, rgba(232, 121, 249, 0.5) 100%);
    color: var(--holy-white);
}

/* ===== MAIN CONTENT AREA ===== */
body > section {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 25px auto;
    padding: 0 20px;
}

/* ===== ALBUM INDEX (Main Page) ===== */
nav#index {
    background: rgba(253, 244, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 3px solid var(--border-purple);
    overflow: hidden;
    box-shadow:
        4px 4px 0 var(--deep-purple),
        0 0 15px rgba(167, 139, 250, 0.2);
    padding: 0;
    margin: 10px;
}

nav#index h2 {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.25) 0%, rgba(124, 58, 237, 0.25) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    color: var(--primary-lavender);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    border-bottom: 2px solid var(--deep-purple);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav#index h2::before {
    content: '✟';
    margin-right: 8px;
}

nav#index h2::after {
    content: '●  ●  ●';
    font-size: 0.5rem;
    color: var(--accent-pink);
}

nav#index ul {
    list-style: none;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

nav#index ul li {
    list-style: none;
}

nav#index ul li a {
    font-family: 'Boldness Race', sans-serif;
    font-size: 1.1rem;
    color: var(--primary-lavender);
    text-decoration: none;
    padding: 12px 18px;
    display: block;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    transition: all 0.2s;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

nav#index ul li a::before {
    content: '🖼️ ';
}

nav#index ul li a:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.25) 0%, rgba(232, 121, 249, 0.25) 100%);
    border-color: var(--border-purple);
    transform: translateX(8px);
    color: var(--holy-white);
}

/* ===== PAGE LINKS / PAGINATION ===== */
nav.page-links {
    text-align: center;
    margin: 15px 10px;
    padding: 10px;
    clear: both;
}

.page-links span {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    color: var(--primary-lavender);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.page-links ul {
    padding: 5px 8px;
    margin: 8px 0;
    display: inline-block;
}

.page-links li {
    list-style: none;
    display: inline;
    margin: 0 4px;
}

.page-links li a {
    font-family: 'Boldness Race', sans-serif;
    font-size: 1rem;
    padding: 6px 14px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.5) 0%, rgba(124, 58, 237, 0.5) 100%);
    border: 2px solid var(--deep-purple);
    color: var(--primary-lavender);
    text-decoration: none;
    box-shadow: 2px 2px 0 var(--deep-purple);
    transition: all 0.2s;
}

.page-links li a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--deep-purple);
    background: linear-gradient(180deg, rgba(255, 107, 157, 0.5) 0%, rgba(232, 121, 249, 0.5) 100%);
    color: var(--holy-white);
}

.page-links li b {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    padding: 6px 14px;
    background: linear-gradient(180deg, rgba(232, 121, 249, 0.4) 0%, rgba(255, 107, 157, 0.4) 100%);
    border: 2px solid var(--accent-magenta);
    color: var(--holy-white);
    text-shadow: 0 0 8px var(--accent-magenta);
}

.page-links > a {
    font-family: 'Boldness Race', sans-serif;
    font-size: 1.1rem;
    padding: 6px 14px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.5) 0%, rgba(124, 58, 237, 0.5) 100%);
    border: 2px solid var(--deep-purple);
    color: var(--primary-lavender);
    text-decoration: none;
    box-shadow: 2px 2px 0 var(--deep-purple);
    transition: all 0.2s;
}

.page-links > a:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--deep-purple);
    background: linear-gradient(180deg, rgba(255, 107, 157, 0.5) 0%, rgba(232, 121, 249, 0.5) 100%);
    color: var(--holy-white);
}

/* ===== PHOTO GALLERY GRID ===== */
#photos {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
}

#photos figure {
    margin: 0;
    max-width: min-content;
    background: rgba(196, 181, 253, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 3px solid var(--border-purple);
    overflow: hidden;
    box-shadow:
        4px 4px 0 var(--deep-purple),
        0 0 10px rgba(167, 139, 250, 0.15);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

#photos figure:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-pink);
    box-shadow:
        6px 8px 0 var(--deep-purple),
        0 0 25px rgba(232, 121, 249, 0.4);
}

#photos img {
    border: none;
    display: block;
    transition: transform 0.3s;
}

#photos figure:hover img {
    transform: scale(1.05);
}

#photos span {
    text-align: center;
    display: block;
    color: var(--primary-lavender);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

#photos figcaption {
    padding: 8px;
    font-family: 'Boldness Race', sans-serif;
    font-size: 0.8rem;
    color: var(--primary-lavender);
    text-align: center;
    background: rgba(26, 10, 46, 0.4);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ===== JS VIEWER OVERLAY ===== */
#js-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 10, 46, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#js-viewer img {
    max-width: 92%;
    max-height: 80%;
    height: auto;
    width: auto;
    border: 4px solid var(--accent-pink);
    box-shadow: 0 0 50px rgba(232, 121, 249, 0.5);
}

#js-viewer span {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

#js-viewer span button {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    padding: 12px 24px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.6) 0%, rgba(124, 58, 237, 0.6) 100%);
    border: 3px solid var(--border-purple);
    color: var(--primary-lavender);
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--deep-purple);
    transition: all 0.2s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#js-viewer span button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--deep-purple);
    background: linear-gradient(180deg, rgba(255, 107, 157, 0.6) 0%, rgba(232, 121, 249, 0.6) 100%);
    color: var(--holy-white);
}

#js-viewer span button:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--deep-purple);
}

/* ===== FOOTER ===== */
footer {
    position: relative;
    z-index: 1;
    clear: both;
    font-size: 0.85rem;
    padding: 20px 25px;
    margin-top: 30px;
    background: linear-gradient(180deg, rgba(45, 27, 78, 0.25) 0%, rgba(26, 10, 46, 0.25) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 4px solid var(--primary-lavender);
    text-align: center;
    color: var(--primary-lavender);
}

footer a,
footer a:visited {
    color: var(--accent-pink);
    text-decoration: none;
    font-family: 'Boldness Race', sans-serif;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent-magenta);
    text-shadow: 0 0 8px var(--accent-magenta);
}

/* ===== GENERAL LINKS ===== */
a,
a:visited {
    color: var(--accent-pink);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: var(--accent-magenta);
    text-shadow: 0 0 8px var(--accent-magenta);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--deep-purple);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-pink), var(--accent-magenta));
    border-radius: 6px;
    border: 2px solid var(--deep-purple);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-lavender), var(--chrome-purple));
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 800px) {
    body {
        padding: 0;
    }

    header {
        padding: 12px 15px;
    }

    header h1 {
        font-size: 1rem;
    }

    #photos {
        gap: 10px;
        padding: 10px 0;
    }

    #photos figure {
        width: 95%;
        max-width: unset;
    }

    #photos img {
        width: 100%;
    }

    nav#index ul {
        padding: 10px;
    }

    nav#index ul li a {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
}

@media (max-width: 500px) {
    header h1 {
        font-size: 0.8rem;
    }

    header p {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    #js-viewer span button {
        font-size: 0.5rem;
        padding: 10px 16px;
    }
}

/* ===== FALLING STARS ANIMATION ===== */
.snowflake {
    font-size: 20px;
    position: fixed;
    top: -10%;
    z-index: 9999;
    user-select: none;
    cursor: default;
    pointer-events: none;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
}

@keyframes snowflakes-fall {
    0% { top: -10%; }
    100% { top: 100%; }
}

@keyframes snowflakes-shake {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(80px); }
}

.snowflake:nth-of-type(0) { left: 1%; animation-delay: 0s, 0s; }
.snowflake:nth-of-type(1) { left: 10%; animation-delay: 1s, 1s; }
.snowflake:nth-of-type(2) { left: 20%; animation-delay: 6s, .5s; }
.snowflake:nth-of-type(3) { left: 30%; animation-delay: 4s, 2s; }
.snowflake:nth-of-type(4) { left: 40%; animation-delay: 2s, 2s; }
.snowflake:nth-of-type(5) { left: 50%; animation-delay: 8s, 3s; }
.snowflake:nth-of-type(6) { left: 60%; animation-delay: 6s, 2s; }
.snowflake:nth-of-type(7) { left: 70%; animation-delay: 2.5s, 1s; }
.snowflake:nth-of-type(8) { left: 80%; animation-delay: 1s, 0s; }
.snowflake:nth-of-type(9) { left: 90%; animation-delay: 3s, 1.5s; }
.snowflake:nth-of-type(10) { left: 25%; animation-delay: 2s, 0s; }
.snowflake:nth-of-type(11) { left: 65%; animation-delay: 4s, 2.5s; }
