/* ============ CUSTOM STYLES ============ */
/* Supplements Tailwind CSS for custom animations and overrides */

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

/* Custom checkbox visual - checked state */
.purity-cb:checked + .cb-visual {
    background-color: #a855f7;
    border-color: #a855f7;
}
.purity-cb:checked + .cb-visual svg {
    opacity: 1;
}

/* Question row checked state */
.question-row:has(.purity-cb:checked) {
    background-color: #faf5ff;
}
.question-row:has(.purity-cb:checked) span:last-child {
    color: #7e22ce;
}

/* Details/Summary arrow removal (cross-browser) */
details summary::-webkit-details-marker { display: none; }
details summary::marker { display: none; content: ''; }

/* Details open animation */
details[open] > div {
    animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Floating button pulse animation */
@keyframes fabPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(168, 85, 247, 0); }
}
#calcBtn {
    animation: fabPulse 3s infinite;
}
#calcBtn:hover {
    animation: none;
}

/* Header shadow on scroll */
header.scrolled {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
}

/* Confetti particle */
.confetti-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confettiFall 1.5s ease-out forwards;
}
@keyframes confettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(300px) rotate(720deg); opacity: 0; }
}

/* Progress bar for test completion */
.progress-track {
    background: linear-gradient(90deg, #a855f7 0%, #7e22ce 100%);
    transition: width 0.3s ease;
}

/* Score counter animation */
@keyframes countUp {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.score-animate {
    animation: countUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .question-row {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Selection color */
::selection {
    background-color: #e9d5ff;
    color: #581c87;
}

/* Focus styles for accessibility */
.purity-cb:focus + .cb-visual {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

/* Blog card image hover zoom */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}
