@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

/* Base Styles */

* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body.homepage {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.homepage::-webkit-scrollbar {
    display: none;
}

/* Custom Scrollbar Design */
::-webkit-scrollbar {
    width: 12px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 70, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(28, 181, 224, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg,
            rgba(28, 181, 224, 0.8) 0%,
            rgba(0, 123, 255, 0.8) 50%,
            rgba(28, 181, 224, 0.8) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 2px 8px rgba(28, 181, 224, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg,
            rgba(28, 181, 224, 1) 0%,
            rgba(0, 123, 255, 1) 50%,
            rgba(28, 181, 224, 1) 100%);
    box-shadow:
        0 4px 15px rgba(28, 181, 224, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg,
            rgba(0, 123, 255, 1) 0%,
            rgba(28, 181, 224, 1) 50%,
            rgba(0, 123, 255, 1) 100%);
    box-shadow:
        0 2px 8px rgba(28, 181, 224, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(28, 181, 224, 0.8) rgba(0, 0, 70, 0.3);
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: white;
    position: relative;
    overflow-x: hidden;

    /* Dynamic background colors using CSS custom properties */
    --bg-primary: rgba(28, 181, 224, 0.6);
    --bg-secondary: rgba(0, 0, 70, 0.7);
    --bg-accent: rgba(28, 181, 224, 0.4);
    --bg-deep: rgba(0, 0, 70, 0.8);
    --bg-gradient-start: #000046;
    --bg-gradient-mid: #1CB5E0;
    --bg-gradient-end: rgba(0, 0, 70, 0.9);

    background:
        radial-gradient(circle at 30% 30%, var(--bg-primary) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, var(--bg-secondary) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, var(--bg-accent) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, var(--bg-deep) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 30%, var(--bg-gradient-end) 70%, var(--bg-gradient-start) 100%);
    background-size: 300% 300%, 300% 300%, 300% 300%, 300% 300%, 100% 100%;
    background-attachment: fixed;
    animation: gradientShift 10s ease infinite;

    /* Smooth transition for background color changes */
    transition: all 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body.homepage {
    height: 100vh;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120vw;
    height: 120vh;
    background:
        radial-gradient(circle at 20% 80%, rgba(28, 181, 224, 0.15) 0%, transparent 70%),
        radial-gradient(circle at 80% 20%, rgba(0, 0, 70, 0.15) 0%, transparent 70%),
        radial-gradient(circle at 40% 40%, rgba(28, 181, 224, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 60% 10%, rgba(0, 0, 70, 0.12) 0%, transparent 80%),
        radial-gradient(circle at 90% 90%, rgba(28, 181, 224, 0.18) 0%, transparent 70%);
    background-attachment: fixed;
    animation: floatingOrbs 15s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    transition: opacity 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%, 0% 0%;
    }

    33% {
        background-position: 100% 0%, 0% 100%, 100% 0%, 0% 100%, 0% 0%;
    }

    66% {
        background-position: 0% 100%, 100% 0%, 0% 0%, 100% 100%, 0% 0%;
    }

    100% {
        background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%, 0% 0%;
    }
}

@keyframes floatingOrbs {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }

    33% {
        transform: translate(3vw, -3vh) scale(1.1);
        opacity: 0.6;
    }

    66% {
        transform: translate(-2vw, 2vh) scale(0.9);
        opacity: 0.7;
    }
}

main#main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2%;
    padding: 2% 3%;
    width: 100%;
}

body.homepage main#main {
    justify-content: center;
    min-height: calc(100vh - 8vh);
    margin-top: 8vh;
}

body:not(.homepage) main#main {
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
}

/* Typography */

a {
    text-decoration: none;
    color: white;
    transition: color 0.4s ease;
    outline: none;
}

a:hover,
a:focus {
    color: lightgrey;
    text-decoration: none;
    outline: none;
    cursor: pointer;
}

.big-text {
    color: white;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 600;
    text-align: center;
    cursor: default;
    text-shadow: 0 0 2rem rgba(255, 255, 255, 0.6);
    animation: textFloat 4s ease-in-out infinite;
    transform-origin: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2% 5%;
}

.big-text.static-text {
    animation: none;
    transform: none !important;
}

@keyframes textFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        text-shadow: 0 0 2rem rgba(28, 181, 224, 0.6);
    }

    50% {
        transform: translateY(-1vh) scale(1.02);
        text-shadow: 0 0 2.5rem rgba(28, 181, 224, 0.8);
    }
}

/* Navigation */

nav {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(135deg,
            rgba(0, 0, 70, 0.85) 0%,
            rgba(28, 181, 224, 0.6) 50%,
            rgba(0, 0, 70, 0.85) 100%);
    border-bottom: 2px solid rgba(28, 181, 224, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: all 0.3s ease;
    transform: translateZ(0);
    will-change: auto;
}

nav.scrolled {
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    background: linear-gradient(135deg,
            rgba(0, 0, 70, 0.95) 0%,
            rgba(28, 181, 224, 0.8) 50%,
            rgba(0, 0, 70, 0.95) 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    pointer-events: none;
    z-index: 1001;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0) 100%);
}

nav .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8%;
    height: 8vh;
    min-height: 60px;
}

.page-title {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: white;
    text-align: center;
    flex: 1;
    margin: 0 2rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.wrapper .logo a {
    color: #f2f2f2;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    text-shadow: 0 0 1.5rem rgba(28, 181, 224, 0.5);
    animation: logoGlow 3s ease-in-out infinite alternate;
    display: inline-block;
}

.wrapper .logo a:hover {
    transform: scale(1.05) rotate(1deg);
    text-shadow: 0 0 30px rgba(28, 181, 224, 0.8);
    color: #1CB5E0;
}

@keyframes logoGlow {
    0% {
        text-shadow: 0 0 1.5rem rgba(28, 181, 224, 0.5);
    }

    100% {
        text-shadow: 0 0 2rem rgba(28, 181, 224, 0.7);
    }
}

.wrapper .nav-links {
    display: flex;
    gap: 3%;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li a {
    color: #f2f2f2;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 500;
    padding: 1.5% 3%;
    border-radius: 0.75rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 4rem;
}

.nav-links li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 181, 224, 0.1);
    opacity: 0;
    border-radius: 12px;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-links li a:hover {
    color: #ffffff;
    border-color: rgba(28, 181, 224, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(28, 181, 224, 0.3);
    text-shadow: 0 0 10px rgba(28, 181, 224, 0.5);
}

.nav-links li a:hover::before {
    opacity: 1;
}

.discord-icon {
    width: clamp(1.2rem, 3vw, 1.8rem);
    height: clamp(1.2rem, 3vw, 1.8rem);
    opacity: 0.8;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0;
}

.nav-links li a:hover .discord-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Gallery */

.gallery-header {
    position: fixed;
    top: 8vh;
    left: 0;
    right: 0;
    z-index: 999;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: translateZ(0);
    will-change: transform;
}

.gallery-header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.header-info {
    text-align: center;
    margin-bottom: 1%;
}

.header-info h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin: 0 0 0.5% 0;
    color: white;
    text-shadow: 0 0 10px rgba(28, 181, 224, 0.5);
}

.header-info p {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    margin: 0;
    opacity: 0.9;
    color: #f2f2f2;
}

.gallery-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.search-container {
    width: 100%;
    max-width: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.filter-controls {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    align-content: stretch;
    overflow: visible;
    box-sizing: border-box;
}

/* Color Radio Group */
.color-radio-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}



.color-radio-group input[type="radio"] {
    display: none;
}

/* Staggered entrance animation for color buttons */
.color-radio-group label {
    opacity: 0;
    animation: colorButtonEnter 0.6s ease-out forwards;
}

/* Prevent layout shifts during animation */
.color-radio-group {
    min-height: 44px;
    /* Ensure consistent height during animation */
}

.color-radio-group label:nth-child(2) {
    animation-delay: 0.1s;
}

.color-radio-group label:nth-child(4) {
    animation-delay: 0.2s;
}

.color-radio-group label:nth-child(6) {
    animation-delay: 0.3s;
}

.color-radio-group label:nth-child(8) {
    animation-delay: 0.4s;
}

.color-radio-group label:nth-child(10) {
    animation-delay: 0.5s;
}

.color-radio-group label:nth-child(12) {
    animation-delay: 0.6s;
}

.color-radio-group label:nth-child(14) {
    animation-delay: 0.7s;
}

.color-radio-group label:nth-child(16) {
    animation-delay: 0.8s;
}

.color-radio-group label:nth-child(18) {
    animation-delay: 0.9s;
}

.color-radio-group label:nth-child(20) {
    animation-delay: 1.0s;
}

.color-radio-group label:nth-child(22) {
    animation-delay: 1.1s;
}

.color-radio-group label:nth-child(24) {
    animation-delay: 1.2s;
}

.color-radio-group label:nth-child(26) {
    animation-delay: 1.3s;
}

.color-radio-group label:nth-child(28) {
    animation-delay: 1.4s;
}

@keyframes colorButtonEnter {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.color-radio-group label {
    background: rgba(0, 0, 70, 0.7);
    color: #fff;
    border: 1px solid rgba(28, 181, 224, 0.3);
    border-radius: 0.5rem;
    padding: 0.2% 1.5%;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-radio-group label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.color-radio-group label:hover {
    background: rgba(28, 181, 224, 0.3);
    border-color: rgba(28, 181, 224, 0.6);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(28, 181, 224, 0.3);
}

.color-radio-group label:hover::before {
    left: 100%;
}

.color-radio-group label:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.color-radio-group input[type="radio"]:checked+label {
    transform: translateY(-4px) scale(1.15);
    box-shadow: 0 -20px 30px rgba(255, 255, 255, 0.8);
    font-weight: 700;
    border-width: 2px;
    z-index: 10;
    position: relative;
}

/* Color-specific styling for color filter buttons with enhanced animations */
.color-radio-group label[data-color="black"] {
    background: linear-gradient(135deg, rgba(33, 37, 41, 0.8), rgba(52, 58, 64, 0.8));
    border-color: rgba(33, 37, 41, 0.6);
}

.color-radio-group label[data-color="black"]:hover {
    background: linear-gradient(135deg, rgba(33, 37, 41, 1), rgba(52, 58, 64, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="blue"] {
    background: linear-gradient(135deg, rgba(31, 121, 255, 0.8), rgba(239, 253, 106, 0.8));
    border-color: rgba(31, 121, 255, 0.6);
}

.color-radio-group label[data-color="blue"]:hover {
    background: linear-gradient(135deg, rgba(31, 121, 255, 1), rgba(239, 253, 106, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="classic"] {
    background: linear-gradient(135deg, rgba(98, 110, 251, 0.8), rgba(255, 35, 35, 0.8));
    border-color: rgba(98, 110, 251, 0.6);
}

.color-radio-group label[data-color="classic"]:hover {
    background: linear-gradient(135deg, rgba(98, 110, 251, 1), rgba(255, 35, 35, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="cyan"] {
    background: linear-gradient(135deg, rgba(244, 233, 80, 0.8), rgba(120, 253, 253, 0.8));
    border-color: rgba(244, 233, 80, 0.6);
}

.color-radio-group label[data-color="cyan"]:hover {
    background: linear-gradient(135deg, rgba(244, 233, 80, 1), rgba(120, 253, 253, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="green"] {
    background: linear-gradient(135deg, rgba(133, 250, 82, 0.8), rgba(122, 119, 255, 0.8));
    border-color: rgba(133, 250, 82, 0.6);
}

.color-radio-group label[data-color="green"]:hover {
    background: linear-gradient(135deg, rgba(133, 250, 82, 1), rgba(122, 119, 255, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="lime"] {
    background: linear-gradient(135deg, rgba(244, 125, 47, 0.8), rgba(196, 255, 118, 0.8));
    border-color: rgba(244, 125, 47, 0.6);
}

.color-radio-group label[data-color="lime"]:hover {
    background: linear-gradient(135deg, rgba(244, 125, 47, 1), rgba(196, 255, 118, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="number"] {
    background: linear-gradient(135deg, rgba(255, 153, 35, 0.8), rgba(198, 45, 205, 0.8));
    border-color: rgba(255, 153, 35, 0.6);
}

.color-radio-group label[data-color="number"]:hover {
    background: linear-gradient(135deg, rgba(255, 153, 35, 1), rgba(198, 45, 205, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="orange"] {
    background: linear-gradient(135deg, rgba(129, 124, 244, 0.8), rgba(255, 135, 70, 0.8));
    border-color: rgba(129, 124, 244, 0.6);
}

.color-radio-group label[data-color="orange"]:hover {
    background: linear-gradient(135deg, rgba(129, 124, 244, 1), rgba(255, 135, 70, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="pink"] {
    background: linear-gradient(135deg, rgba(255, 31, 203, 0.8), rgba(81, 194, 249, 0.8));
    border-color: rgba(255, 31, 203, 0.6);
}

.color-radio-group label[data-color="pink"]:hover {
    background: linear-gradient(135deg, rgba(255, 31, 203, 1), rgba(81, 194, 249, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="purple"] {
    background: linear-gradient(135deg, rgba(255, 149, 29, 0.8), rgba(221, 79, 249, 0.8));
    border-color: rgba(255, 149, 29, 0.6);
}

.color-radio-group label[data-color="purple"]:hover {
    background: linear-gradient(135deg, rgba(255, 149, 29, 1), rgba(221, 79, 249, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="red"] {
    background: linear-gradient(135deg, rgba(246, 147, 12, 0.8), rgba(252, 8, 73, 0.8));
    border-color: rgba(246, 147, 12, 0.6);
}

.color-radio-group label[data-color="red"]:hover {
    background: linear-gradient(135deg, rgba(246, 147, 12, 1), rgba(252, 8, 73, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="stunt"] {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.9), rgba(255, 182, 193, 0.9));
    border-color: rgba(128, 218, 224, 0.7);
}

.color-radio-group label[data-color="stunt"]:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 1), rgba(255, 182, 193, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.color-radio-group label[data-color="white"] {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.95), rgba(255, 255, 255, 0.95));
    border-color: rgba(248, 249, 250, 0.8);
    color: black;
}

.color-radio-group label[data-color="white"]:hover {
    background: linear-gradient(135deg, rgba(248, 249, 250, 1), rgba(255, 255, 255, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.color-radio-group label[data-color="yellow"] {
    background: linear-gradient(135deg, rgba(89, 238, 229, 0.9), rgba(252, 230, 34, 0.9));
    border-color: rgba(89, 238, 229, 0.7);
}

.color-radio-group label[data-color="yellow"]:hover {
    background: linear-gradient(135deg, rgba(89, 238, 229, 1), rgba(252, 230, 34, 1));
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.gallery-container {
    margin-top: 180px;
    padding: 0 2% 120px 2%;
    width: 100%;
}

#gallery-search {
    width: 100%;
    padding: 1.2% 3%;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    border-radius: 0.5rem;
    border: 1px solid rgba(28, 181, 224, 0.3);
    background: rgba(28, 181, 224, 0.15);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(28, 181, 224, 0.4);
    margin: 1%;
}

#gallery-search:focus {
    border-color: #1CB5E0;
    transform: translateY(-1px);
}

#gallery-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5%;
    padding: 0;
    width: 100%;
    will-change: scroll-position;
}

/* Large screens - bigger images */
@media screen and (min-width: 1600px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2%;
    }
}

/* Ultra-wide screens - even bigger images */
@media screen and (min-width: 2200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 2.5%;
    }
}

.load-more-trigger {
    height: 100px;
    margin: 2% 0;
}

.loading-spinner {
    text-align: center;
    padding: 3% 0;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #1CB5E0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.gallery-item {
    background: rgba(0, 0, 70, 0.3);
    border-radius: 0.75rem;
    padding: 1.5%;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(28, 181, 224, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
    aspect-ratio: 1.5;
    contain: layout paint;
    transform: translateZ(0);
    will-change: transform;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(28, 181, 224, 0.1), transparent);
    transition: left 0.6s ease;
}

.gallery-item:hover {
    transform: translateY(-0.5vh) scale(1.02);
    box-shadow: 0 0.6rem 2rem rgba(28, 181, 224, 0.3);
    border-color: rgba(28, 181, 224, 0.5);
}

.gallery-item:hover::before {
    left: 100%;
}

.gallery-item img {
    width: 90%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
    margin: 0 auto;
    box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item img.loading {
    background: linear-gradient(45deg,
            rgba(28, 181, 224, 0.1) 25%,
            transparent 25%,
            transparent 50%,
            rgba(28, 181, 224, 0.1) 50%,
            rgba(28, 181, 224, 0.1) 75%,
            transparent 75%);
    background-size: 20px 20px;
    animation: shimmer 1.5s infinite linear;
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item img.error {
    opacity: 0.5;
    background: rgba(255, 0, 0, 0.1);
}

@keyframes shimmer {
    0% {
        background-position: -20px 0;
    }

    100% {
        background-position: 20px 0;
    }
}

.gallery-item img:hover {
    transform: scale(1.08);
    box-shadow: 0 0.6rem 2rem rgba(28, 181, 224, 0.4);
    border-radius: 0.75rem;
}

.gallery-item .caption {
    color: #f2f2f2;
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    word-break: break-all;
    flex-grow: 1;
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
}

/* Image Modal */

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

/* Blur effect for navbar and gallery header when modal is open */
.modal-blur {
    filter: blur(8px);
    transition: filter 0.3s ease;
    z-index: 1 !important;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    align-items: center;
    gap: 20px;
    animation: modalFadeIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2147483647;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    outline: none;
}

.modal-close:hover {
    background: rgba(28, 181, 224, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 12px 25px rgba(28, 181, 224, 0.4);
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-info {
    text-align: center;
    padding: 2% 0;
}

.modal-info h3 {
    color: #1CB5E0;
    font-size: clamp(1rem, 2vw, 1.3rem);
    margin: 0 0 1% 0;
    word-break: break-word;
}

.copy-url-btn {
    background: rgba(28, 181, 224, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(28, 181, 224, 0.3);
    outline: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.copy-url-btn:hover {
    background: rgba(28, 181, 224, 1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(28, 181, 224, 0.5);
}

/* Variant Selector */

.variant-selector {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.variant-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.variant-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.variant-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.variant-btn {
    background: rgba(0, 0, 70, 0.7);
    color: white;
    border: 1px solid rgba(28, 181, 224, 0.3);
    border-radius: 0.4rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.variant-btn:hover {
    background: rgba(28, 181, 224, 0.3);
    border-color: rgba(28, 181, 224, 0.6);
    transform: translateY(-1px);
}

.variant-btn.active {
    background: rgba(28, 181, 224, 0.8);
    border-color: rgba(28, 181, 224, 1);
    color: white;
    font-weight: 600;
}

/* Modal Notification */

.modal-notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(28, 181, 224, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    text-align: center;
    box-shadow: 0 4px 15px rgba(28, 181, 224, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Color-specific styling for variant buttons */

.variant-btn.color-btn[data-color="black"] {
    background-color: rgba(33, 37, 41, 0.8);
    border-color: rgba(33, 37, 41, 0.6);
}

.variant-btn.color-btn[data-color="blue"] {
    background: linear-gradient(135deg, rgba(31, 121, 255, 0.8), rgba(239, 253, 106, 0.8));
    border-color: rgba(31, 121, 255, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="classic"] {
    background: linear-gradient(135deg, rgba(98, 110, 251, 0.8), rgba(255, 35, 35, 0.8));
    border-color: rgba(98, 110, 251, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="cyan"] {
    background: linear-gradient(135deg, rgba(244, 233, 80, 0.8), rgba(120, 253, 253, 0.8));
    border-color: rgba(244, 233, 80, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="green"] {
    background: linear-gradient(135deg, rgba(133, 250, 82, 0.8), rgba(122, 119, 255, 0.8));
    border-color: rgba(133, 250, 82, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="lime"] {
    background: linear-gradient(135deg, rgba(244, 125, 47, 0.8), rgba(196, 255, 118, 0.8));
    border-color: rgba(244, 125, 47, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="number"] {
    background: linear-gradient(135deg, rgba(255, 153, 35, 0.8), rgba(198, 45, 205, 0.8));
    border-color: rgba(255, 153, 35, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="orange"] {
    background: linear-gradient(135deg, rgba(129, 124, 244, 0.8), rgba(255, 135, 70, 0.8));
    border-color: rgba(129, 124, 244, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="pink"] {
    background: linear-gradient(135deg, rgba(255, 31, 203, 0.8), rgba(81, 194, 249, 0.8));
    border-color: rgba(255, 31, 203, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="purple"] {
    background: linear-gradient(135deg, rgba(255, 149, 29, 0.8), rgba(221, 79, 249, 0.8));
    border-color: rgba(255, 149, 29, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="red"] {
    background: linear-gradient(135deg, rgba(246, 147, 12, 0.8), rgba(252, 8, 73, 0.8));
    border-color: rgba(246, 147, 12, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="stunt"] {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.8), rgba(255, 182, 193, 0.8));
    border-color: rgba(128, 218, 224, 0.6);
    color: black;
}

.variant-btn.color-btn[data-color="white"] {
    background-color: rgba(248, 249, 250, 0.9);
    border-color: rgba(248, 249, 250, 0.7);
    color: black;
}

.variant-btn.color-btn[data-color="yellow"] {
    background: linear-gradient(135deg, rgba(89, 238, 229, 0.8), rgba(252, 230, 34, 0.8));
    border-color: rgba(89, 238, 229, 0.6);
    color: black;
}

.variant-btn.color-btn:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.variant-btn.color-btn.active {
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    font-weight: 700;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* UI Components */

.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(28, 181, 224, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 20px 35px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 40px rgba(28, 181, 224, 0.4);
    font-weight: 600;
    font-size: 1.2rem;
    z-index: 2147483648;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    min-width: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.notification.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

#backToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: rgba(28, 181, 224, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(28, 181, 224, 0.3);
    outline: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#backToTopBtn:hover {
    transform: translateY(-8px) scale(1.15);
    background: rgba(28, 181, 224, 1);
    box-shadow: 0 20px 40px rgba(28, 181, 224, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Page Transitions */

.page-container {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.page-container.loaded {
    opacity: 1;
}

.page-container main {
    transform: translateY(2vh) scale(0.99);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.page-container.loaded main {
    transform: translateY(0) scale(1);
}

/* Staggered animation for gallery items */
.gallery-item {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: calc(min(var(--item-index), 20) * 0.05s);
    opacity: 0;
    transform: translateY(3vh);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.loading {
    text-align: center;
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    padding: 3% 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20vh;
}

/* Responsive Design */

@media screen and (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 1.5%;
        width: 100%;
        padding: 0 1%;
    }
}

@media screen and (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 2%;
        width: 100%;
        padding: 0 2%;
    }

    .nav-links li a {
        padding: 2% 4%;
        min-width: 3rem;
    }
}

@media screen and (max-width: 768px) {

    /* Navigation improvements */
    nav .wrapper {
        padding: 0 4%;
    }

    .nav-links li a {
        padding: 2% 3%;
        font-size: clamp(0.8rem, 2.5vw, 1rem);
        min-width: 2.5rem;
    }

    /* Typography */
    .big-text {
        font-size: clamp(2.5rem, 8vw, 4rem);
        padding: 3% 8%;
    }

    /* Gallery grid improvements */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 3%;
        width: 100%;
        padding: 20% 3%;
    }

    /* Gallery controls improvements */
    .gallery-controls {
        margin: 4% 0;
        padding: 0 2%;
    }

    .gallery-controls input[type="text"] {
        min-width: 70%;
        max-width: 90%;
        padding: 12px 16px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Search container */
    .search-container {
        max-width: 95%;
        margin: 0 auto;
    }

    /* Variant selector improvements */
    .variant-selector {
        gap: 0.8rem;
        margin: 0.8rem 0;
        max-width: 100%;
        overflow-x: auto;
        padding: 0.5rem 0;
    }

    .variant-group {
        min-width: max-content;
    }

    .variant-group label {
        font-size: 0.85rem;
    }

    .variant-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-height: 44px;
        min-width: 44px;
        white-space: nowrap;
    }

    /* Modal improvements */
    .modal-notification {
        font-size: 0.9rem;
        padding: 12px 16px;
        margin: 0 2%;
    }

    /* Color radio group major improvements */
    .color-radio-group {
        gap: 0.5rem;
        margin: 1rem 0;
        justify-content: center;
        max-width: 100%;
        flex-wrap: wrap;
        padding: 0.5rem;
        /* Prevent horizontal scrolling, use wrapping instead */
        overflow-x: visible;
        overflow-y: visible;
    }

    .color-radio-group label {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        flex-shrink: 0;
        /* Better touch targets */
        touch-action: manipulation;
    }

    /* Filter controls container */
    .filter-controls {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    /* Prevent horizontal scroll on main container */
    .gallery-container {
        padding: 2% 1%;
        max-width: 100%;
    }

    /* Image captions */
    .caption {
        font-size: 0.8rem;
        padding: 0.3rem;
        word-wrap: break-word;
        hyphens: auto;
    }
}

@media screen and (max-width: 635px) {

    /* Typography for very small screens */
    .big-text {
        font-size: clamp(2rem, 10vw, 3rem);
        padding: 4% 8%;
        word-wrap: break-word;
        hyphens: auto;
    }

    /* Gallery items for very small screens */
    .gallery-item {
        flex: 1 1 100%;
        min-width: 120px;
        max-width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 2%;
        padding: 3% 2%;
    }

    /* Navigation for very small screens */
    nav .wrapper {
        padding: 0 2%;
        flex-direction: column;
        height: auto;
        min-height: 10vh;
        gap: 1%;
    }

    .nav-links {
        gap: 2% !important;
        justify-content: center;
        padding: 0.5rem 0;
    }

    .nav-links li a {
        padding: 8px 12px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        font-size: 0.9rem;
    }

    main#main {
        margin-top: 12vh;
    }

    /* Gallery controls for very small screens */
    .gallery-controls {
        padding: 0 1%;
    }

    .search-container {
        max-width: 95%;
        margin: 0 auto;
    }

    .gallery-controls input[type="text"] {
        padding: 12px 14px;
        font-size: 16px;
        width: 100%;
    }

    /* Color radio buttons for very small screens */
    .color-radio-group {
        gap: 0.3rem;
        margin: 0.8rem 0;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.3rem;
    }

    .color-radio-group label {
        padding: 3px 5px;
        font-size: 0.8rem;
        min-height: 40px;
        min-width: 40px;
        border-radius: 20px;
        flex-shrink: 0;
    }

    /* Variant buttons for very small screens */
    .variant-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-height: 40px;
        min-width: 40px;
        border-radius: 20px;
    }

    .variant-selector {
        gap: 0.5rem;
        margin: 0.5rem 0;
        justify-content: center;
    }

    /* Container adjustments */
    .gallery-container {
        margin-top: 160px;
        padding: 1% 1%;
        max-width: 100%;
    }

    /* Modal improvements for small screens */
    .modal-content {
        margin: 5% auto;
        padding: 15px;
        max-width: 95%;
        max-height: 90%;
    }

    .modal-notification {
        font-size: 0.8rem;
        padding: 8px 12px;
        margin: 0 1%;
    }

    /* Image captions for small screens */
    .caption {
        font-size: 0.75rem;
        padding: 0.2rem;
        line-height: 1.2;
        word-break: break-word;
    }

    /* Ensure no horizontal overflow */
    body,
    html {
        overflow-x: hidden;
    }

    * {
        max-width: 100%;
    }
}

/* Extra small screens (phones in portrait) */
@media screen and (max-width: 480px) {

    /* Typography for extra small screens */
    .big-text {
        font-size: clamp(1.8rem, 12vw, 2.5rem);
        padding: 6% 5%;
        text-align: center;
    }

    /* Gallery for extra small screens */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1.5%;
        padding: 0 1%;
    }

    .gallery-item {
        min-width: 100px;
    }

    /* Navigation for extra small screens */
    nav .wrapper {
        padding: 0 1%;
    }

    .nav-links li a {
        padding: 6px 8px;
        min-width: 38px;
        min-height: 38px;
        font-size: 0.8rem;
    }

    /* Controls for extra small screens */
    .gallery-controls {
        gap: 0.8rem;
        padding: 0;
    }

    .color-radio-group {
        gap: 0.2rem;
        padding: 0.2rem;
    }

    .color-radio-group label {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-height: 36px;
        min-width: 36px;
        border-radius: 18px;
    }

    .variant-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
        min-height: 36px;
        min-width: 36px;
        border-radius: 18px;
    }

    /* Container for extra small screens */
    .gallery-container {
        margin-top: 140px;
        padding: 0.5%;
    }

    /* Modal for extra small screens */
    .modal-content {
        margin: 2% auto;
        padding: 10px;
        max-width: 98%;
        max-height: 95%;
    }

    /* Search input */
    .gallery-controls input[type="text"] {
        padding: 10px 12px;
        font-size: 16px;
    }

    /* Image captions */
    .caption {
        font-size: 0.7rem;
        padding: 0.1rem;
        line-height: 1.1;
    }
}