/* 3D Patakha Simulator - Professional Studio Theme */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Space+Mono:wght@700&display=swap');

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #06050e;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #fef3c7;
    touch-action: none;
}

#canvas-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: crosshair;
}

/* Blast Screen Flash */
#flash-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 15;
    background: radial-gradient(circle, rgba(255,250,220,0.95) 0%, rgba(255,140,20,0.6) 55%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transition: opacity 0.05s ease-out;
}

/* Luxury Frosted Glass */
.hud-glass {
    background: rgba(13, 11, 22, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Modular Action Chips */
.action-chip {
    padding: 5px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #fef08a;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: manipulation;
    white-space: nowrap;
}

.action-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fff;
    transform: translateY(-1px);
}

.action-chip:active {
    transform: scale(0.95);
}

.action-chip.active {
    background: rgba(245, 158, 11, 0.22);
    border-color: #fbbf24;
    color: #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}

/* Floating Right-Side Gadget Buttons (Desi Sandbox Toolbox) */
.gadget-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    padding: 0;
}

.gadget-btn:hover {
    transform: scale(1.08) translateX(-3px);
}

.gadget-btn:active {
    transform: scale(0.92);
}

.gadget-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(18, 16, 29, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .gadget-icon-box {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }
}

.gadget-btn:hover .gadget-icon-box {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.35);
}

.gadget-label {
    font-size: 8.5px;
    font-weight: 700;
    color: rgba(254, 243, 199, 0.85);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
    letter-spacing: 0.1px;
    white-space: nowrap;
}

.gadget-key {
    font-size: 8px;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: rgba(251, 191, 36, 0.5);
    margin-top: -3px;
}

/* Active Slo-Mo Button Pulsing Neon Amber Ring */
.gadget-btn.active .gadget-icon-box {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.45) 0%, rgba(245, 158, 11, 0.5) 100%);
    border-color: #fbbf24;
    box-shadow: 0 0 22px rgba(251, 191, 36, 0.75), inset 0 0 10px rgba(251, 191, 36, 0.35);
    animation: slomoPulse 1.2s infinite alternate;
}

@keyframes slomoPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6)); }
    100% { transform: scale(1.05); filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.9)); }
}

/* Camera Chips */
.cam-chip {
    padding: 4px 7px;
    height: 28px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #cbd5e1;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    cursor: pointer;
    touch-action: manipulation;
}

.cam-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cam-chip.active {
    background: rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.6);
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* Clear Arena Button (Distinct Red Accent) */
.clear-btn {
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.22) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
}

/* Mode Segmented Controls */
.mode-pill {
    padding: 5px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(254, 243, 199, 0.75);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    touch-action: manipulation;
    cursor: pointer;
    text-align: center;
}

@media (max-width: 639px) {
    .mode-pill {
        padding: 5px 6px;
        font-size: 10px;
        gap: 3px;
    }
}

@media (min-width: 640px) {
    .mode-pill {
        padding: 5px 12px;
        gap: 5px;
    }
}

.mode-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.mode-pill:active {
    transform: scale(0.95);
}

.mode-pill.active {
    color: #0f0d19;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #ea580c 100%);
    border-color: #fde047;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
}

/* Inventory Arsenal Game Cards */
.arsenal-card {
    min-width: 72px;
    max-width: 76px;
    height: 86px;
    padding: 6px 3px 5px 3px;
    border-radius: 12px;
    background: rgba(18, 16, 29, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    touch-action: manipulation;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .arsenal-card {
        min-width: 88px;
        max-width: 92px;
        height: 100px;
        padding: 8px 6px 7px 6px;
        border-radius: 14px;
    }
}

.arsenal-card:hover {
    transform: translateY(-3px);
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(26, 22, 42, 0.95);
}

.arsenal-card:active {
    transform: scale(0.95);
}

.arsenal-card.active {
    transform: translateY(-4px);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.18) 0%, rgba(220, 38, 38, 0.22) 100%);
    border-color: #fbbf24;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.35), inset 0 0 8px rgba(251, 191, 36, 0.15);
}

.card-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .card-icon-wrap {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 21px;
    }
}

/* Horizontal Scroll Subtle Gradient Fade Indicators */
#arsenal-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    mask-image: linear-gradient(to right, transparent 0px, black 16px, black calc(100% - 16px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0px, black 16px, black calc(100% - 16px), transparent 100%);
}

@media (min-width: 768px) {
    .card-icon-wrap {
        width: 40px;
        height: 40px;
        font-size: 21px;
    }
}

.card-title {
    font-size: 10.5px;
    font-weight: 800;
    color: #fef3c7;
    text-align: center;
    line-height: 1.15;
    margin-top: 3px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-sub {
    font-size: 8.5px;
    font-weight: 500;
    color: rgba(254, 243, 199, 0.55);
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-key {
    position: absolute;
    top: 4px;
    right: 5px;
    font-size: 8.5px;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    color: rgba(251, 191, 36, 0.4);
}

/* Locked Arsenal Card Style & Golden Lock Badge */
.arsenal-card.locked {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(180deg, rgba(28, 20, 16, 0.95) 0%, rgba(18, 14, 24, 0.95) 100%);
    opacity: 0.92;
}

.arsenal-card.locked:hover {
    border-color: rgba(245, 158, 11, 0.7);
    transform: translateY(-2px);
}

.card-lock-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    border: 1.5px solid #fef3c7;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    animation: lockBadgePulse 2s infinite ease-in-out;
}

@keyframes lockBadgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); }
    50% { transform: scale(1.15); box-shadow: 0 0 12px rgba(245, 158, 11, 0.9); }
}

.step-complete {
    background: #10b981 !important;
    color: #022c22 !important;
    border-color: #6ee7b7 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.7) !important;
}

/* Detonate All Button Glow */
.detonate-btn {
    background: linear-gradient(135deg, #ff4e00 0%, #dc2626 50%, #991b1b 100%);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.35);
    animation: pulseGlow 1.4s infinite alternate;
    touch-action: manipulation;
}

.detonate-btn:hover {
    transform: scale(1.04);
    filter: brightness(1.15);
}

.detonate-btn:active {
    transform: scale(0.96);
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.6), 0 0 25px rgba(245, 158, 11, 0.3); }
    100% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.95), 0 0 50px rgba(245, 158, 11, 0.7); }
}

/* Hide scrollbars */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mono-num {
    font-family: 'Space Mono', monospace;
}

.safe-bottom {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Diwali Music Player & Equalizer Animations */
.music-wave-bar {
    display: inline-block;
    width: 2px;
    height: 10px;
    margin: 0 1px;
    background-color: #fbbf24;
    border-radius: 1px;
    animation: waveEqualizer 0.8s ease-in-out infinite alternate;
}

.music-wave-bar:nth-child(2) {
    animation-delay: 0.25s;
    height: 14px;
}

.music-wave-bar:nth-child(3) {
    animation-delay: 0.5s;
    height: 8px;
}

@keyframes waveEqualizer {
    0% { transform: scaleY(0.3); opacity: 0.5; }
    100% { transform: scaleY(1.2); opacity: 1; }
}

.spinning-art {
    animation: spinVinyl 8s linear infinite;
}

@keyframes spinVinyl {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Deluxe Salon Music Capsule Styles */
.hud-deluxe-glass {
    background: rgba(12, 9, 18, 0.86);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.deluxe-vinyl-disc {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.4), 0 4px 12px rgba(0, 0, 0, 0.6);
}

.deluxe-track-btn {
    transition: all 0.18s ease;
}

.deluxe-track-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.35);
}

.deluxe-track-btn.active {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
}
