/* Glassmorphism containers and inputs */
.apple-glass {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Light theme overrides for pure white screen background & high-contrast text */
html:not(.dark) .cps-test-page {
    color: #0f172a;
    background-color: #ffffff !important;
}

html:not(.dark) body {
    background-color: #ffffff !important;
}

html:not(.dark) .cps-test-page .apple-glass {
    background: #ffffff !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03) !important;
}

html:not(.dark) .cps-test-page .text-zinc-400,
html:not(.dark) .cps-test-page .text-zinc-500,
html:not(.dark) .cps-test-page .text-zinc-300,
html:not(.dark) .cps-test-page .text-zinc-200 {
    color: #475569 !important;
}

html:not(.dark) .cps-test-page .text-white {
    color: #0f172a !important;
}

html:not(.dark) .cps-test-page .bg-zinc-950\/60,
html:not(.dark) .cps-test-page .bg-zinc-950\/40 {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html:not(.dark) .cps-test-page .border-white\/5,
html:not(.dark) .cps-test-page .border-white\/10 {
    border-color: #e2e8f0 !important;
}

html:not(.dark) .cps-test-page .click-zone {
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.06) 0%, rgba(241, 245, 249, 0.8) 100%) !important;
    border-color: rgba(14, 165, 233, 0.4) !important;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.08);
}

html:not(.dark) .cps-test-page .click-zone:hover {
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.12) 0%, rgba(226, 232, 240, 0.9) 100%) !important;
    border-color: rgba(14, 165, 233, 0.8) !important;
}

html:not(.dark) .cps-test-page .duration-btn {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

html:not(.dark) .cps-test-page .duration-btn:hover {
    background: rgba(14, 165, 233, 0.1) !important;
    border-color: rgba(14, 165, 233, 0.4) !important;
    color: #0284c7 !important;
}

html:not(.dark) .cps-test-page .duration-btn.active {
    background: #0ea5e9 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35) !important;
}

/* Light mode for modal card */
html:not(.dark) #cps-result-modal .modal-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    color: #0f172a !important;
}

/* Click Zone Styling */
.click-zone {
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.05) 0%, rgba(0, 0, 0, 0.4) 100%);
    border: 2px dashed rgba(14, 165, 233, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.click-zone:hover {
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
    border-color: rgba(14, 165, 233, 0.6);
    box-shadow: 0 0 25px rgba(14, 165, 233, 0.15);
}

.click-zone:active {
    transform: scale(0.98);
    border-color: rgba(14, 165, 233, 0.8);
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.click-zone.active-testing {
    border-style: solid;
    border-color: rgba(14, 165, 233, 0.6);
    animation: border-pulse 1.8s infinite ease-in-out;
}

/* Ripple click animations */
.click-ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.45s ease-out;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, rgba(14, 165, 233, 0) 70%);
    pointer-events: none;
}

/* Floating speed indicator (+1 clicks) */
.click-indicator {
    position: absolute;
    color: #38bdf8;
    font-weight: 800;
    font-size: 1.125rem;
    pointer-events: none;
    animation: float-up 0.55s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.6);
}

/* Timer and count numeric displays */
.neon-text-sky {
    color: #38bdf8;
    text-shadow: 0 0 15px rgba(14, 165, 233, 0.6);
}

/* Custom Graph Horizontal Scrollbar for Mobile Screens */
.custom-graph-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(14, 165, 233, 0.4) transparent;
}

.custom-graph-scroll::-webkit-scrollbar {
    height: 6px;
}

.custom-graph-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 9999px;
}

html.dark .custom-graph-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.custom-graph-scroll::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.4);
    border-radius: 9999px;
    transition: background 0.2s ease;
}

.custom-graph-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.8);
}

/* Keyframe Animations */
@keyframes ripple {
    to {
        transform: scale(3.5);
        opacity: 0;
    }
}

@keyframes float-up {
    0% {
        transform: translate(-50%, -50%) scale(0.8) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3) translateY(-75px);
        opacity: 0;
    }
}

@keyframes border-pulse {
    0%, 100% {
        border-color: rgba(14, 165, 233, 0.4);
        box-shadow: 0 0 15px rgba(14, 165, 233, 0.1);
    }
    50% {
        border-color: rgba(14, 165, 233, 0.95);
        box-shadow: 0 0 35px rgba(14, 165, 233, 0.4);
    }
}

@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-modal-pop {
    animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom progress bar transition */
.progress-bar-fill {
    transition: width 0.08s linear;
}

/* Duration selection pills */
.duration-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.duration-btn:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
}

.duration-btn.active {
    background: rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.8);
    color: #fff;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.3);
}

/* Method selector buttons */
.method-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.method-btn.active {
    background: rgba(14, 165, 233, 0.15) !important;
    color: #0ea5e9 !important;
    border-color: rgba(14, 165, 233, 0.4) !important;
    font-weight: 700;
}

html:not(.dark) .method-btn.active {
    background: rgba(14, 165, 233, 0.1) !important;
    color: #0284c7 !important;
    border-color: rgba(14, 165, 233, 0.5) !important;
}

/* Custom duration input chrome removal */
#custom-seconds-input::-webkit-inner-spin-button,
#custom-seconds-input::-webkit-outer-spin-button {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 430px) {
    .click-zone {
        height: 250px !important;
    }
    #cps-result-modal .modal-card {
        padding: 1.25rem !important;
    }
}

