/* ========== SPECIAL THROW ANIMATIONS ========== */

/* Animation Overlay Base */
.animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.animation-overlay.show {
    opacity: 1;
}

.animation-content {
    text-align: center;
    transform: scale(0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animation-overlay.show .animation-content {
    transform: scale(1);
}

/* 180 Animation */
.animation-180 {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.animation-180 .animation-number {
    font-size: 8rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow:
        0 0 20px #ffd700,
        0 0 40px #ffd700,
        0 0 60px #f39c12,
        0 0 80px #e74c3c;
    animation: glow-pulse 0.5s ease-in-out infinite alternate;
}

.animation-180 .animation-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 10px;
    margin-top: 10px;
    animation: text-bounce 0.6s ease-in-out;
}

@keyframes glow-pulse {
    from {
        text-shadow:
            0 0 20px #ffd700,
            0 0 40px #ffd700,
            0 0 60px #f39c12,
            0 0 80px #e74c3c;
    }
    to {
        text-shadow:
            0 0 30px #ffd700,
            0 0 60px #ffd700,
            0 0 90px #f39c12,
            0 0 120px #e74c3c;
    }
}

@keyframes text-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Checkout Animation */
.animation-checkout {
    background: radial-gradient(circle, rgba(46, 204, 113, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.animation-checkout .animation-icon {
    font-size: 6rem;
    animation: trophy-bounce 0.5s ease-out;
}

.animation-checkout .animation-text {
    font-size: 3rem;
    font-weight: bold;
    color: #2ecc71;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-top: 10px;
    text-shadow: 0 0 20px rgba(46, 204, 113, 0.8);
}

@keyframes trophy-bounce {
    0% { transform: scale(0) rotate(-20deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Bust Animation */
.animation-bust {
    background: radial-gradient(circle, rgba(231, 76, 60, 0.4) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.animation-bust .animation-icon {
    font-size: 5rem;
    animation: shake-bust 0.4s ease-in-out;
}

.animation-bust .animation-text {
    font-size: 3rem;
    font-weight: bold;
    color: #e74c3c;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-top: 10px;
    animation: flash-red 0.3s ease-in-out 2;
}

@keyframes shake-bust {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-20px) rotate(-5deg); }
    40% { transform: translateX(20px) rotate(5deg); }
    60% { transform: translateX(-15px) rotate(-3deg); }
    80% { transform: translateX(15px) rotate(3deg); }
}

@keyframes flash-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Confetti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall 2s ease-out forwards;
}

.confetti:nth-child(odd) {
    border-radius: 50%;
}

.confetti:nth-child(even) {
    transform: rotate(45deg);
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* High Score Flash */
.high-score-flash {
    animation: high-score-pulse 0.3s ease-in-out 2;
}

@keyframes high-score-pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.3);
    }
}

/* ========== THEME TOGGLE BUTTON ========== */

.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.theme-toggle-btn {
    width: 60px;
    height: 30px;
    background: var(--surface-light);
    border-radius: 15px;
    position: relative;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.theme-toggle-btn::before {
    content: '🌙';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: opacity 0.3s;
}

.theme-toggle-btn::after {
    content: '☀️';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

[data-theme="light"] .theme-toggle-btn::before {
    opacity: 0.5;
}

[data-theme="light"] .theme-toggle-btn::after {
    opacity: 1;
}

.theme-toggle-slider {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .theme-toggle-slider {
    transform: translateX(30px);
    background: #f39c12;
}

.theme-toggle-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========== SETTINGS TOGGLE SWITCHES ========== */

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--surface-light);
    border-radius: 10px;
    margin-bottom: 10px;
}

.settings-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.settings-toggle-label {
    font-weight: 500;
    color: var(--text-primary);
}

.settings-toggle-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    display: none;
}

.toggle-switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--text-secondary);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s, background 0.3s;
}

.toggle-switch input:checked + .toggle-switch-slider {
    background: var(--secondary-color);
}

.toggle-switch input:checked + .toggle-switch-slider::before {
    transform: translateX(24px);
    background: white;
}

/* Volume Slider */
.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--surface-light);
    border-radius: 10px;
    margin-bottom: 10px;
}

.volume-slider-container label {
    min-width: 100px;
    color: var(--text-primary);
    font-weight: 500;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--surface);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.volume-value {
    min-width: 40px;
    text-align: right;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Settings Section */
.settings-section {
    margin-bottom: 25px;
}

.settings-section h4 {
    color: var(--gold);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--surface-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section h4 .icon {
    font-size: 1.2rem;
}

/* Quick Settings Bar (for game pages) */
.quick-settings-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: var(--surface);
    border-radius: 10px;
}

.quick-settings-btn {
    background: var(--surface-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-settings-btn:hover {
    background: var(--primary-color);
}

.quick-settings-btn.active {
    background: var(--secondary-color);
}

.quick-settings-btn.muted {
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 480px) {
    .animation-180 .animation-number {
        font-size: 5rem;
    }

    .animation-180 .animation-text,
    .animation-checkout .animation-text,
    .animation-bust .animation-text {
        font-size: 1.8rem;
        letter-spacing: 5px;
    }

    .animation-checkout .animation-icon,
    .animation-bust .animation-icon {
        font-size: 4rem;
    }
}
