/* CoinJaxx Custom Styles */

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #1a1a2e; }
::-webkit-scrollbar-thumb { background: #FFD700; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #e6c200; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-2deg); }
    75% { transform: translateX(5px) rotate(2deg); }
}

.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-pulse-gold { animation: pulse-gold 2s infinite; }
.animate-shake { animation: shake 0.3s ease-in-out; }

/* ========================================
   Mystery Box Crate Visual
   ======================================== */

.box-crate {
    display: inline-block;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.box-crate-body {
    position: relative;
    width: 140px;
    height: 130px;
    margin: 0 auto;
}

.box-crate-base {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85px;
    background: linear-gradient(180deg, #8B6914 0%, #6B4F10 40%, #4A370B 100%);
    border-radius: 6px 6px 10px 10px;
    border: 2px solid #A07818;
    box-shadow:
        inset 0 -8px 15px rgba(0,0,0,0.4),
        inset 0 2px 4px rgba(255,215,0,0.15),
        0 4px 20px rgba(0,0,0,0.5);
}

/* Horizontal wood planks */
.box-crate-base::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 4px;
    right: 4px;
    height: 2px;
    background: rgba(0,0,0,0.25);
    box-shadow: 0 28px 0 rgba(0,0,0,0.2);
}

/* Center metal band */
.box-crate-base::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 100%;
    background: linear-gradient(180deg, #8a8a8a 0%, #5a5a5a 50%, #4a4a4a 100%);
    border-left: 1px solid #999;
    border-right: 1px solid #999;
    opacity: 0.6;
}

.box-crate-lock {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #FFD700, #B8860B);
    border-radius: 50%;
    border: 2px solid #DAA520;
    box-shadow: 0 0 10px rgba(255,215,0,0.4);
    z-index: 2;
    transition: all 0.3s;
}

.box-crate-lock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 8px;
    background: #4A370B;
    border-radius: 1px;
}

.box-crate-lid {
    position: absolute;
    top: 0;
    left: -4px;
    right: -4px;
    height: 50px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom left;
    z-index: 3;
}

.box-crate-lid-top {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #A07818 0%, #8B6914 40%, #7A5C12 100%);
    border-radius: 8px 8px 2px 2px;
    border: 2px solid #B8860B;
    box-shadow:
        inset 0 4px 8px rgba(255,255,255,0.1),
        0 -2px 10px rgba(0,0,0,0.3);
    position: relative;
}

/* Lid metal band */
.box-crate-lid-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 100%;
    background: linear-gradient(180deg, #9a9a9a 0%, #6a6a6a 100%);
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
    opacity: 0.5;
    border-radius: 6px 6px 0 0;
}

/* Crate damage stages */
.box-crate.hit-1 .box-crate-base { box-shadow: inset 0 -8px 15px rgba(0,0,0,0.4), 0 4px 20px rgba(0,0,0,0.5), 0 0 15px rgba(255,100,0,0.1); }
.box-crate.hit-2 .box-crate-base { box-shadow: inset 0 -8px 15px rgba(0,0,0,0.4), 0 4px 20px rgba(0,0,0,0.5), 0 0 20px rgba(255,100,0,0.15); }
.box-crate.hit-3 .box-crate-lock { box-shadow: 0 0 15px rgba(255,215,0,0.6); }
.box-crate.hit-4 .box-crate-base { border-color: #c88a1e; }
.box-crate.hit-4 .box-crate-lock { box-shadow: 0 0 20px rgba(255,215,0,0.8); transform: translate(-50%, -50%) rotate(5deg); }
.box-crate.hit-5 .box-crate-lid { transform: rotate(-3deg); }
.box-crate.hit-5 .box-crate-lock { box-shadow: 0 0 25px rgba(255,100,0,0.8); background: linear-gradient(135deg, #ff8c00, #B8860B); }
.box-crate.hit-6 .box-crate-lid { transform: rotate(-6deg); }
.box-crate.hit-6 .box-crate-lock { opacity: 0.5; transform: translate(-50%, -50%) rotate(15deg); }

/* Opened state */
.box-crate.opened .box-crate-lid {
    transform: rotate(-110deg) translateY(-10px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.box-crate.opened .box-crate-lock { opacity: 0; transform: translate(-50%, -100%) rotate(45deg); }
.box-crate.opened .box-crate-base {
    box-shadow: inset 0 -8px 15px rgba(0,0,0,0.4), 0 0 40px rgba(255,215,0,0.4), 0 0 80px rgba(255,215,0,0.15);
}

/* Inner glow when opened */
.box-crate.opened .box-crate-base::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 10%;
    right: 10%;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(255,215,0,0.6) 0%, transparent 70%);
    box-shadow: none;
    filter: blur(5px);
}

/* Hit dots */
.hit-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hit-dot.active {
    background: #FFD700;
    border-color: #FFD700;
    box-shadow: 0 0 8px rgba(255,215,0,0.5);
    transform: scale(1.2);
}

/* Shake animations */
@keyframes box-shake-light {
    0%, 100% { transform: translateX(0) rotate(0); }
    20% { transform: translateX(-4px) rotate(-1deg); }
    40% { transform: translateX(4px) rotate(1deg); }
    60% { transform: translateX(-3px) rotate(-0.5deg); }
    80% { transform: translateX(2px) rotate(0.5deg); }
}
@keyframes box-shake-heavy {
    0%, 100% { transform: translateX(0) rotate(0); }
    15% { transform: translateX(-8px) rotate(-3deg); }
    30% { transform: translateX(8px) rotate(3deg); }
    45% { transform: translateX(-6px) rotate(-2deg); }
    60% { transform: translateX(6px) rotate(2deg); }
    75% { transform: translateX(-3px) rotate(-1deg); }
    90% { transform: translateX(3px) rotate(1deg); }
}
@keyframes box-explode {
    0% { transform: scale(1); }
    30% { transform: scale(1.1); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.box-shake-light { animation: box-shake-light 0.35s ease-in-out; }
.box-shake-heavy { animation: box-shake-heavy 0.4s ease-in-out; }
.box-explode { animation: box-explode 0.5s ease-out; }

/* Hit flash */
@keyframes hit-flash {
    0% { background: rgba(255,255,255,0.4); }
    100% { background: rgba(255,255,255,0); }
}
.hit-flash { animation: hit-flash 0.15s ease-out; }

/* Particle effects */
.box-particle {
    position: absolute;
    pointer-events: none;
    font-size: 14px;
    animation: particle-fly 0.8s ease-out forwards;
}
@keyframes particle-fly {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0.3) rotate(var(--pr)); }
}

/* Coin rain */
.coin-drop {
    position: absolute;
    font-size: 20px;
    animation: coin-fall linear forwards;
    pointer-events: none;
}
@keyframes coin-fall {
    0% { opacity: 1; transform: translateY(-20px) rotate(0deg); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(calc(100vh + 40px)) rotate(720deg); }
}

/* Result reveal */
@keyframes result-reveal {
    0% { opacity: 0; transform: translateY(20px) scale(0.8); }
    50% { transform: translateY(-5px) scale(1.05); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.result-reveal { animation: result-reveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* Card hover glow */
.hover\:glow:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

/* Logo: schwarzer Hintergrund wird transparent auf Dark Theme */
.logo-blend {
    mix-blend-mode: lighten;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Loading spinner */
.spinner {
    width: 24px; height: 24px;
    border: 3px solid rgba(255,215,0,0.3);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile touch optimization */
@media (max-width: 640px) {
    button, a { -webkit-tap-highlight-color: transparent; }
}

/* Mobile menu drawer */
.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    color: #d1d5db;
    transition: background-color 0.15s, color 0.15s;
}
.mobile-menu-item:hover,
.mobile-menu-item:active {
    background-color: rgba(255, 255, 255, 0.03);
}
.mobile-menu-active {
    color: #3b82f6;
}
.mobile-menu-active .mobile-menu-icon {
    color: #3b82f6;
}
.mobile-menu-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
}

/* Print styles */
@media print {
    nav, footer, #consent-banner, .no-print { display: none !important; }
    body { background: white !important; color: black !important; }
}
