/* assets/css/global.css */

/* ============================================
   LUCKY SPIN - NEON CYBER THEME
   Global Stylesheet
   ============================================ */

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(10, 10, 26, 0.5);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-blue), var(--neon-purple));
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-purple), var(--neon-pink));
}

/* Keyframes */
@keyframes glowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px var(--neon-blue)) drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--neon-blue)) drop-shadow(0 0 40px rgba(0, 212, 255, 0.5));
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes neonFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.3; }
    94% { opacity: 1; }
    96% { opacity: 0.5; }
    97% { opacity: 1; }
}

@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(0, 212, 255, 0.3);
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
    }
    50% {
        border-color: rgba(0, 212, 255, 0.6);
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    }
}

/* Glitch Text Effect */
.glitch-text {
    animation: glitch 0.5s ease-in-out;
}

/* Winner card */
.winner-card {
    transition: all 0.3s ease;
}

.winner-card:hover {
    transform: translateX(4px);
    border-color: rgba(139, 92, 246, 0.5);
}

/* Input focus glow */
input:focus {
    animation: borderGlow 2s ease-in-out infinite;
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn-ripple:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(40) translate(-50%, -50%);
        opacity: 0;
    }
}

/* Toast animation */
.toast-enter {
    animation: slideInRight 0.5s ease forwards;
}

.toast-exit {
    animation: slideOutRight 0.5s ease forwards;
}

/* Neon text utility */
.neon-text-blue {
    text-shadow:
        0 0 7px var(--neon-blue),
        0 0 10px var(--neon-blue),
        0 0 21px var(--neon-blue);
}

.neon-text-purple {
    text-shadow:
        0 0 7px var(--neon-purple),
        0 0 10px var(--neon-purple),
        0 0 21px var(--neon-purple);
}

.neon-text-pink {
    text-shadow:
        0 0 7px var(--neon-pink),
        0 0 10px var(--neon-pink),
        0 0 21px var(--neon-pink);
}

/* Neon border utility */
.neon-border {
    box-shadow:
        0 0 10px rgba(0, 212, 255, 0.2),
        inset 0 0 10px rgba(0, 212, 255, 0.1);
}

/* Wheel specific */
#wheelCanvas {
    transition: none;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .font-cyber {
        letter-spacing: 0.1em;
    }
}

@media (max-width: 480px) {
    #wheelContainer {
        max-width: 300px;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 16, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 212, 255, 0.1);
    border-top: 3px solid var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print hidden */
@media print {
    #starfield, .fixed, footer {
        display: none !important;
    }
}

/* ============================================
   GOLD SHINE ANIMATED TITLE
   ============================================ */

/* Gold Shine Gradient Animation */
@keyframes goldShine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes goldGlow {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(255, 215, 0, 0.4),
            0 0 20px rgba(255, 215, 0, 0.2),
            0 0 40px rgba(255, 165, 0, 0.1);
        filter: brightness(1);
    }
    50% {
        text-shadow:
            0 0 15px rgba(255, 215, 0, 0.6),
            0 0 30px rgba(255, 215, 0, 0.4),
            0 0 60px rgba(255, 165, 0, 0.2),
            0 0 80px rgba(218, 165, 32, 0.1);
        filter: brightness(1.15);
    }
}

@keyframes goldSparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

@keyframes goldShimmer {
    0% {
        background-position: -300% center;
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(5deg);
    }
    100% {
        background-position: 300% center;
        filter: hue-rotate(0deg);
    }
}

/* Main Gold Shine Title Class */
.gold-shine-title {
    background: linear-gradient(
        90deg,
        #B8860B 0%,
        #DAA520 8%,
        #FFD700 15%,
        #FFFACD 20%,
        #FFFFFF 25%,
        #FFFACD 30%,
        #FFD700 35%,
        #FFA500 42%,
        #DAA520 50%,
        #B8860B 58%,
        #DAA520 65%,
        #FFD700 70%,
        #FFFACD 75%,
        #FFFFFF 80%,
        #FFFACD 85%,
        #FFD700 90%,
        #DAA520 95%,
        #B8860B 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation:
        goldShimmer 3s linear infinite,
        goldGlow 2s ease-in-out infinite;
    position: relative;
    display: inline-block;
}

/* Extra shine layer using pseudo-element */
.gold-shine-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 35%,
        rgba(255, 255, 255, 0.5) 45%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.5) 55%,
        transparent 65%,
        transparent 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShine 2.5s ease-in-out infinite;
    pointer-events: none;
}

/* Sparkle dots around the title */
.gold-shine-wrapper {
    position: relative;
    display: inline-block;
}

.gold-shine-wrapper .sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #FFD700 40%, transparent 70%);
    pointer-events: none;
    animation: goldSparkle 2s ease-in-out infinite;
}

.gold-shine-wrapper .sparkle:nth-child(1) {
    top: -5px;
    left: 15%;
    animation-delay: 0s;
    width: 4px;
    height: 4px;
}

.gold-shine-wrapper .sparkle:nth-child(2) {
    top: 5px;
    right: 10%;
    animation-delay: 0.5s;
    width: 5px;
    height: 5px;
}

.gold-shine-wrapper .sparkle:nth-child(3) {
    bottom: -3px;
    left: 40%;
    animation-delay: 1s;
    width: 3px;
    height: 3px;
}

.gold-shine-wrapper .sparkle:nth-child(4) {
    top: 50%;
    right: 3%;
    animation-delay: 1.5s;
    width: 4px;
    height: 4px;
}

.gold-shine-wrapper .sparkle:nth-child(5) {
    top: -8px;
    right: 30%;
    animation-delay: 0.8s;
    width: 5px;
    height: 5px;
}

.gold-shine-wrapper .sparkle:nth-child(6) {
    bottom: -6px;
    left: 70%;
    animation-delay: 1.3s;
    width: 3px;
    height: 3px;
}

/* Star sparkle shape variant */
.gold-shine-wrapper .sparkle-star {
    position: absolute;
    pointer-events: none;
    animation: goldSparkle 2.5s ease-in-out infinite;
}

.gold-shine-wrapper .sparkle-star::before,
.gold-shine-wrapper .sparkle-star::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

.gold-shine-wrapper .sparkle-star::before {
    width: 12px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gold-shine-wrapper .sparkle-star::after {
    width: 2px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gold-shine-wrapper .sparkle-star:nth-of-type(1) {
    top: -12px;
    left: 5%;
    animation-delay: 0.3s;
}

.gold-shine-wrapper .sparkle-star:nth-of-type(2) {
    top: -10px;
    right: 15%;
    animation-delay: 1.2s;
}

.gold-shine-wrapper .sparkle-star:nth-of-type(3) {
    bottom: -10px;
    left: 55%;
    animation-delay: 0.7s;
}

/* Subtitle gold style */
.gold-subtitle {
    background: linear-gradient(
        90deg,
        #B8860B 0%,
        #DAA520 25%,
        #FFD700 50%,
        #DAA520 75%,
        #B8860B 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShine 4s linear infinite;
    opacity: 0.85;
}

/* Gold border underline effect */
.gold-underline {
    position: relative;
    display: inline-block;
}

.gold-underline::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #B8860B 15%,
        #FFD700 30%,
        #FFFFFF 50%,
        #FFD700 70%,
        #B8860B 85%,
        transparent 100%
    );
    background-size: 200% auto;
    animation: goldShine 2s linear infinite;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}