html, body {
    margin: 0;
    padding: 0;
    /*background-color: rgba(14, 27, 43, 0.1);*/
    background-color: white;
    /*background-image: linear-gradient(135deg, rgba(14, 27, 43, 0.85), rgba(25, 40, 65, 0.7)), url('/assets/orbyz-notext.webp');*/
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    color: black;
    /* Allow the body to be at least 100% of viewport height but grow as needed */
    min-height: 100vh;
    min-height: 100dvh; /* For modern browsers */
}

.yellow-curve {
    clip-path: url(#yellow-curve-clip);
}

.green-curve {
    clip-path: url(#green-curve-clip);
}

.glow {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7),
    0 0 12px rgba(65, 176, 232, 0.5),
    0 0 20px rgba(65, 176, 232, 0.4);
}

.title-glow {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(65, 176, 232, 0.8),
    0 0 40px rgba(147, 51, 234, 0.6),
    0 0 60px rgba(239, 68, 68, 0.4);
    letter-spacing: 3px;
}

.gradient-animate {
    background: linear-gradient(60deg, #ff00ff, #d7ef00, #ff4444, #ff00ff);
    background-size: 200% 200%;
    animation: animatedGradient 8s ease-in-out infinite alternate, ctaPulse 1.5s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

@keyframes animatedGradient {
    0% {
        background-position: 70% 100%;
    }
    100% {
        background-position: 180% 50%;
    }
}

.count-glow {
    text-shadow: 0 0 15px #ff00ff, 0 0 25px #d7ef00, 0 0 35px #ff4444;
    animation: pulse 2s ease-in-out infinite;
}

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

.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: float 6s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.7;
    }
    50% {
        transform: translateY(-100px);
        opacity: 0.3;
    }
}

.halo {
    position: absolute;
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.15;
    z-index: -1;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.bounce {
    animation: bounce 2s infinite;
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(-10deg);
    }
    20% {
        transform: rotate(10deg);
    }
    30% {
        transform: rotate(-10deg);
    }
    40% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

.shake {
    animation: shake 2s infinite;
    animation-delay: 1s;
}

input[type="file"] {
    display: none;
}

.festival-text {
    font-family: 'Anton', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1;
}

.festival-caption {
    font-family: 'Anton', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    letter-spacing: 2px;
    line-height: 1;
}

.location-text {
    font-family: 'Anton', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    letter-spacing: 0px;
    text-transform: uppercase;
    line-height: 1;
}

#canvasElement {
    display: none;
}

.cta-pulse {
    box-shadow: 0 0 20px #ff00ff, 0 0 30px #d7ef00;
}

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

/* Progress indicators */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.step.active {
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Badge styles */
.badge-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.8), rgba(65, 176, 232, 0.8));
    color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Preview screen */
.preview-container {
    position: relative;
    width: 100%;
    max-width: 280px;
    height: 280px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#previewImage, #finalImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Social share buttons */
.social-share {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 1.5rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.twitter {
    background-color: black;
}

.location-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 15px;
    margin: 15px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gallery-trigger {
    color: #41B0E8;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.gallery-trigger:hover {
    color: #ff00ff;
}

.legal-text {
    font-size: 0.8rem;
    opacity: 0.8;
    max-width: 90%;
    margin: 0 auto;
}

.btn {
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: black;
    border: 1px solid black;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

footer {
    margin-top: 2rem;
}

/* Strobe light effect */
.strobe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
}

.strobe-active {
    animation: strobeFlash 0.8s ease-in-out 4;
}

@keyframes strobeFlash {
    0%, 100% {
        opacity: 0;
    }
    10% {
        opacity: 0.5;
        background: #ff00ff;
    }
    20% {
        opacity: 0.4;
        background: #d7ef00;
    }
    30% {
        opacity: 0.5;
        background: #ff4444;
    }
    40% {
        opacity: 0.4;
        background: #41B0E8;
    }
}

/* Confetti effect - DO NOT remove */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, #ff00ff, #d7ef00);
    opacity: 0.8;
    animation: confettiFall 3s ease-out forwards;
    transform: rotate(45deg);
    z-index: 60;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.leaderboard-checkbox {
    position: relative;
    font-size: 1.1rem;
    font-weight: 600;
    color: black;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
    user-select: none;
}

.leaderboard-checkbox .checkmark {
    position: relative;
    display: inline-block;
    height: 24px;
    width: 24px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    vertical-align: middle;
}

.leaderboard-checkbox input:checked ~ .checkmark {
    background: linear-gradient(60deg, #ff00ff, #d7ef00);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
}

.leaderboard-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.leaderboard-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.leaderboard-checkbox:hover .checkmark {
    box-shadow: 0 0 8px rgba(65, 176, 232, 0.6);
}

/* Gallery popup */
.gallery-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 40;
    display: none;
    flex-direction: column;
    padding: 80px 20px 20px;
    overflow-y: auto;
    height: 100vh;
}

.gallery-popup.active {
    display: flex;
}

.gallery-container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    padding: 16px;
    margin: 0 auto 20px;
    justify-content: center;
}

/* Responsive grid adjustments */
@media (min-width: 360px) {
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .gallery-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

.gallery-title {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 41;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
}

.close-gallery {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 42;
    transition: all 0.2s ease;
}

.close-gallery:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.image-container:hover {
    transform: scale(1.03);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ff00ff;
    border-right: 4px solid #d7ef00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

.spinner.hidden {
    display: none;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.karma-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff3366, #ff0033);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    font-family: 'Arial', sans-serif;
    width: 38px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    opacity: 0.95;
    transition: transform 0.3s ease, opacity 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    text-align: center;
    border-radius: 10px;
}

.karma-badge:hover {
    transform: scale(1.15) rotate(0deg);
    opacity: 1;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(255, 51, 102, 0.7);
    animation: heartbeat 1s infinite alternate;
}

@keyframes heartbeat {
    0% {
        transform: scale(1.15) rotate(0deg);
    }
    50% {
        transform: scale(1.25) rotate(0deg);
    }
    100% {
        transform: scale(1.15) rotate(0deg);
    }
}

.green-section {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, #8bc34a, #689f38);
    clip-path: url(#green-curve-clip);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    user-select: none;
}

.green-section:hover {
    background: linear-gradient(135deg, #9ccc65, #7cb342);
    transform: scale(1.02);
}

.green-section:active {
    transform: scale(0.98);
}

.shutter-button {
    width: 80px;
    height: 80px;
    border: 4px solid white;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.shutter-button::before {
    content: '';
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
}

.green-section:hover .shutter-button {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.green-section:active .shutter-button {
    transform: scale(0.9);
}

.camera-text {
    font-size: 30px;
    font-weight: bold;
    font-family: 'Anton', sans-serif;
    /*text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);*/
    margin: 0;
}

.camera-emoji {
    font-size: 32px;
    margin-left: 10px;
}

.hidden-input {
    display: none;
}

/* Pulse animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.shutter-button {
    animation: pulse 2s infinite;
}

@keyframes slide-left-to-right {
    0% {
        transform: translateX(-100vw); /* Start off-screen to the left */
    }
    45% {
        transform: translateX(0); /* Stop at center */
    }
    55% {
        transform: translateX(0); /* Pause at center */
    }
    100% {
        transform: translateX(100vw); /* Move off-screen to the right */
    }
}

.animate-slide-left-to-right {
    animation: slide-left-to-right 4s infinite ease-in-out; /* 4s duration, infinite loop, ease-in-out */
}


.text-snap-selfie {
    animation: strobeFlash2 1s linear infinite;
}

@keyframes strobeFlash2 {
    0%, 100% {
        color: black;
    }
    50% {
        color: #ff7500;
    }
}

/* Blinking animation for the emoji */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Flash effect for brightness */
@keyframes flash {
    0%, 44%, 56%, 100% {
        filter: brightness(100%); /* Normal brightness outside center */
    }
    45% {
        filter: brightness(100%); /* Start of flash */
    }
    48% {
        filter: brightness(250%); /* Peak brightness */
    }
    52% {
        filter: brightness(250%); /* Hold peak */
    }
    55% {
        filter: brightness(100%); /* Fade back */
    }
}

.flash-effect {
    animation: flash 4s infinite ease-in-out; /* Sync with slide animation */
}
