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

/* height: auto guard for any img with width/height attributes (global rule) */
img {
    height: auto;
}

/* Particles container */
#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Center everything horizontally, start at the top */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: #e3b5b5;
    color: #7F01FF;
    font-style: italic;
    font-family: sans-serif;
    font-weight: bold;
    text-align: center;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    padding: 0.2vh 1vw;
}

/* SEO H1 styling */
h1.fancy-text,
h2.fancy-text {
    font-size: clamp(1rem, 3vw, 1.8rem);
    margin-bottom: 0.2vh;
    background: linear-gradient(to bottom, purple 50%, red 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

/* Image container - takes up most of the viewport */
.imgbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    justify-content: center;
    max-height: 80%;
    width: 100%;
}

/* Images should be responsive and fit within container */
.center-fit {
    max-width: min(95vw, 900px);
    max-height: min(80vh, 700px);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0px 0px 12px 4px red;
    border-radius: 15%;
    transition: transform 0.3s ease-out;
    transform: scale(1);
    cursor: pointer;
}

.center-fit:hover {
    box-shadow: 0px 0px 20px 8px red;
    animation: shadowPulse 1s ease-in-out infinite;
}

@keyframes shadowPulse {
    0% {
        box-shadow: 0px 0px 12px 4px red;
    }
    50% {
        box-shadow: 0px 0px 25px 10px red;
    }
    100% {
        box-shadow: 0px 0px 12px 4px red;
    }
}

/* Text sections with responsive sizing */
.centered-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0.2vh 0;
    background: linear-gradient(to bottom, purple 50%, red 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.centered-flex small {
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
}

.centered-flex small a {
    color: inherit;
    text-decoration: none;
}

.centered-flex small a:hover {
    text-decoration: underline;
}

/* H2 styling */
h2.centered-flex {
    font-size: clamp(1rem, 3vw, 1.8rem);
    margin: 0.2vh 0;
}

.fancy-text {
    font-weight: bold;
    background: linear-gradient(to bottom, purple 50%, red 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Preserve emoji colors within fancy-text elements */
.fancy-text::before {
    content: attr(data-text);
    background: linear-gradient(to bottom, purple 50%, red 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: absolute;
    pointer-events: none;
}

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

.pulsate {
    animation: pulse 2.5s ease-in-out 2;
}

/* Footer - compact and at bottom */
.footer {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    font-style: normal;
    font-weight: normal;
    text-transform: none;
    color: black;
    padding: 0.2vh 0;
    line-height: 1.2;
    margin-top: 0.5vh;
}

/* Responsive text sizing */
p {
    margin: 0.5vh 0;
    line-height: 1.3;
}

/* "Want to see a new scene?" link (was an inline style) */
.new-scene-link {
    font-size: medium;
    text-decoration: none;
}

/* No-JS warning (was an inline style) */
.noscript-warning {
    color: red;
    font-size: large;
    text-align: center;
    margin-top: 20px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body {
        padding: 0.3vh 2vw;
    }

    .imgbox {
        max-height: 55vh;
    }

    .center-fit {
        max-width: 90vw;
        max-height: 45vh;
        box-shadow: 0px 0px 10px 3px red;
    }

    h1.fancy-text {
        margin-bottom: 0.3vh;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .center-fit {
        max-width: 95vw;
        max-height: 40vh;
    }

    .imgbox {
        max-height: 50vh;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .imgbox {
        max-height: 70vh;
    }

    .center-fit {
        max-height: 60vh;
    }

    h1.fancy-text,
    h2.fancy-text {
        font-size: clamp(1rem, 3vw, 1.5rem);
    }
}

/* Large screens - minimize gaps */
@media (min-width: 1024px) {
    body {
        padding: 0.3vh 2vw;
    }

    .imgbox {
        margin: 0.3vh 0;
        max-height: 87vh;
    }

    .center-fit {
        max-width: min(90vw, 1000px);
        max-height: min(84vh, 750px);
    }

    .centered-flex {
        margin: 0.3vh 0;
    }

    h2.centered-flex {
        margin: 0.3vh 0;
    }

    .footer {
        margin-top: 0.3vh;
    }
}

/* Extra large screens - even tighter */
@media (min-width: 1440px) {
    .center-fit {
        max-width: min(85vw, 1200px);
        max-height: min(75vh, 750px);
    }

    .imgbox {
        margin: 0.2vh 0;
    }
}
