/* Custom CSS extensions for Tailwind */

/* Core smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0F172A; /* Slate 900 */
}

::-webkit-scrollbar-thumb {
    background: #334155; /* Slate 700 */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569; /* Slate 600 */
}

/* Glassmorphism Card Style */
.game-card {
    background: rgba(30, 41, 59, 0.4); /* Slate 800 with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(45, 212, 191, 0.4); /* Brand Teal border */
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(45, 212, 191, 0.15);
    background: rgba(30, 41, 59, 0.75);
}

.game-card:hover .game-card-img-wrapper img {
    transform: scale(1.08); /* slight zoom on hover */
}

.game-card-img-wrapper {
    overflow: hidden;
}

.game-card-img-wrapper img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Image overlay gradient */
.game-card-img-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0.6) 40%, rgba(15, 23, 42, 0) 100%);
}

/* Fade in up animation for initialization */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Base animation delays */
.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-400 { animation-delay: 400ms; }
.animation-delay-2000 { animation-delay: 2000ms; }
.animation-delay-4000 { animation-delay: 4000ms; }

/* Truncate multi-line text */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge styling for score with glowing rotation border */
.score-badge {
    position: relative;
    overflow: hidden;
    padding: 1px; /* space for border */
    border-radius: 9999px;
}
.score-badge::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, rgba(255,255,255,0.4), transparent 30%);
    animation: rotate 3s linear infinite;
}
.score-badge-inner {
    position: absolute;
    inset: 1px;
    background: #0f172a;
    border-radius: inherit;
    z-index: 1;
}
.score-badge-text {
    position: relative;
    z-index: 2;
}

@keyframes rotate {
    100% {
        transform: rotate(1turn);
    }
}

/* Focus Utility */
*:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}
