/*
==========================================================================
LEONUX UI - VIEWS & VISUALS
==========================================================================
Purpose: Page-specific styles, complex animations, and game elements.
Highlights: Particle effects, 3D transforms, fluid text scaling.
==========================================================================
*/

/* ---------------------------------- */
/* 1. HERO ANIMATIONS                 */
/* ---------------------------------- */
.hero-icon {
    text-align: center;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: var(--z-normal);
}

.hero-icon span {
    font-size: clamp(4rem, 12vw, 8rem);
    background: linear-gradient(
        135deg, 
        var(--color-text-main) 30%, 
        var(--color-text-dim) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    animation: floatIcon 6s ease-in-out infinite;
    display: inline-block;
    will-change: transform;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

/* ---------------------------------- */
/* 2. GAME: WORD SCRAMBLE             */
/* ---------------------------------- */
.word-display {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 8vw + 1rem, 6rem);
    line-height: 1.1;
    text-align: center;
    letter-spacing: 0.15em;
    font-weight: 800;
    text-transform: uppercase;
    margin: var(--space-lg) 0;
    
    color: var(--color-text-main);
    text-shadow: 
        0 0 10px var(--color-primary-dim),
        0 0 30px var(--color-primary-glow);
        
    word-break: break-all;
    overflow-wrap: break-word;
}

.progress-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: var(--space-md);
    padding: 0.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-full);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--color-bg-surface-3);
    border: 1px solid var(--glass-border);
    transition: all 0.3s var(--ease-snappy);
}

.dot.active {
    background-color: var(--color-error);
    box-shadow: 0 0 10px var(--color-error-bg);
    transform: scale(1.2);
    border-color: transparent;
}

/* Hints Grid */
#hints-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: var(--space-lg);
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--color-bg-surface-3) transparent;
}

.hint-row {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    animation: rowEnter 0.3s var(--ease-snappy);
}

@keyframes rowEnter {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hint-cell {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.h-correct { background-color: var(--color-success); box-shadow: 0 0 8px var(--color-success-bg); }
.h-present { background-color: var(--color-warning); box-shadow: 0 0 8px var(--color-warning-bg); }
.h-absent  { background-color: var(--color-bg-surface-3); opacity: 0.5; }

/* ---------------------------------- */
/* 3. TRUTH OR DARE FLIP CARD         */
/* ---------------------------------- */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: min(400px, 55vh);
    perspective: 1200px;
    cursor: pointer;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s var(--ease-elastic);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1);
}

.card-front {
    background: radial-gradient(circle at center, var(--color-bg-surface-2) 0%, #000 100%);
}

.card-back {
    background: linear-gradient(135deg, var(--color-primary-dim) 0%, var(--color-bg-base) 100%);
    transform: rotateY(180deg);
    border: 1px solid var(--color-primary);
}

#tod-content {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text-main);
}

/* ---------------------------------- */
/* 4. LEADERBOARD                     */
/* ---------------------------------- */
#leaderboard-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.rank-row {
    display: grid;
    grid-template-columns: 3rem 1fr auto;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
    transition: background-color 0.2s ease;
}

.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background-color: var(--color-bg-surface-2); }

.rank-icon {
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--color-text-dim);
    text-align: center;
}

/* Rank Coloring */
.rank-row:nth-child(1) .rank-icon { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.4); }
.rank-row:nth-child(2) .rank-icon { color: #9ca3af; }
.rank-row:nth-child(3) .rank-icon { color: #b45309; }

/* ---------------------------------- */
/* 5. PROFILE SECTION                 */
/* ---------------------------------- */
.profile-avatar {
    width: clamp(6rem, 15vw, 10rem);
    height: clamp(6rem, 15vw, 10rem);
    border-radius: 50%;
    background: var(--color-bg-surface-2);
    border: 4px solid var(--color-primary);
    box-shadow: 0 0 30px var(--color-primary-glow);
    display: grid;
    place-items: center;
    margin-bottom: var(--space-md);
}

/* ---------------------------------- */
/* 6. ANIMATION UTILS                 */
/* ---------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .view-container, .hero-icon span, .nav-btn {
        will-change: transform, opacity;
    }
}


