/* Click Zone Styles */
.click-zone {
    position: relative;
    min-height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(102, 126, 234, 0);
}

.click-zone:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.click-zone.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse-glow 2s ease-in-out infinite;
}

.click-zone.finished {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.click-zone-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 2rem;
    color: white;
    text-align: center;
}

.click-zone-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.click-zone-text {
    font-size: 1.25rem;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 0;
}

.click-counter {
    font-size: 6rem;
    font-weight: 800;
    margin: 1rem 0;
    color: #ffffff !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: scale-in 0.3s ease-out;
}

.timer-display {
    display: none;
    font-size: 2rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    margin-top: 1rem;
}

/* Click Ripple Effect */
.click-ripple-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.click-ripple {
    position: absolute;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: ripple-effect 0.6s ease-out;
    pointer-events: none;
}

/* Click Pulse Animation */
.click-zone.click-pulse {
    transform: scale(1.02);
}

/* Results Section */
.result-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .result-stat {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.result-stat:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-primary-text-emphasis);
}

[data-bs-theme="dark"] .result-value {
    color: var(--bs-primary);
}

/* Rating Guide */
.rating-guide {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-item {
    padding: 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}

[data-bs-theme="dark"] .rating-item {
    background: rgba(102, 126, 234, 0.2);
}

.rating-item:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
}

[data-bs-theme="dark"] .rating-item:hover {
    background: rgba(102, 126, 234, 0.3);
}

/* Animations */
@keyframes ripple-effect {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(15);
        opacity: 0;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 20px rgba(245, 87, 108, 0.3);
    }
    50% {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 40px rgba(245, 87, 108, 0.6);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes scale-in {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Duration Button Group */
#durationButtons .btn {
    font-weight: 600;
}

#durationButtons .btn-check:checked + .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

/* Restart Button */
#restartBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
    padding: 0.75rem;
    transition: all 0.3s;
}

#restartBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 991px) {
    .click-zone {
        min-height: 350px;
    }

    .click-zone-content {
        min-height: 350px;
    }

    .click-zone-title {
        font-size: 2rem;
    }

    .click-counter {
        font-size: 4.5rem;
    }

    .timer-display {
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    .click-zone {
        min-height: 300px;
    }

    .click-zone-content {
        min-height: 300px;
        padding: 1.5rem;
    }

    .click-zone-title {
        font-size: 1.75rem;
    }

    .click-counter {
        font-size: 3.5rem;
    }

    .timer-display {
        font-size: 1.25rem;
        padding: 0.4rem 1rem;
    }

    .result-value {
        font-size: 1.25rem;
    }

    #durationButtons .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Dark Mode Adjustments */
[data-bs-theme="dark"] .click-zone {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .click-zone:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .timer-display {
    background: rgba(0, 0, 0, 0.3);
}

/* Prevent text selection during clicking */
.click-zone * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Loading State */
.click-zone.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Achievement Badge Animation */
@keyframes badge-pop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.achievement-badge {
    animation: badge-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
