/* Core Premium Stylesheet - Steppa Games (steppa.in) */

/* 1. Base Variables & Styles */
:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-header: rgba(15, 23, 42, 0.8);
    --border-color: rgba(51, 65, 85, 0.5);
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #7c3aed;
    --accent: #06b6d4;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Poppins', var(--font-sans);
}

/* Light Mode support (if active) */
body.light-mode {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-header: rgba(248, 250, 252, 0.85);
    --border-color: rgba(226, 232, 240, 0.8);
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dark: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
}

/* 2. Utility Layout Framework (Vanillafied CSS) */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}
@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }

/* Grid Layouts */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-10 { gap: 2.5rem; }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Helper Alignments */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1 1 0%; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

/* Sticky and Absolute overlays */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }

/* Modern Glassmorphic Header & Panels */
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bg-slate-950\/80 { background-color: rgba(3, 7, 18, 0.8); }
.bg-slate-900 { background-color: var(--bg-card); }
.bg-slate-950 { background-color: #030712; }
.border-b { border-bottom: 1px solid var(--border-color); }
.border-t { border-top: 1px solid var(--border-color); }
.border { border: 1px solid var(--border-color); }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Styling Components */
.text-cyan-400 { color: var(--accent); }
.text-indigo-400 { color: #818cf8; }
.text-slate-400 { color: var(--text-muted); }
.text-slate-500 { color: var(--text-dark); }
.text-white { color: #ffffff; }

.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-tr { background-image: linear-gradient(to top right, var(--tw-gradient-stops)); }
.from-indigo-600 { --tw-gradient-from: #4f46e5; --tw-gradient-to: rgba(79, 70, 229, 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-cyan-400 { --tw-gradient-to: #22d3ee; }
.via-purple-600 { --tw-gradient-to: rgba(124, 58, 237, 0); --tw-gradient-stops: var(--tw-gradient-from), #7c3aed, var(--tw-gradient-to); }

/* Custom Sliders & Carousel */
.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}
.slider-container::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.slider-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

/* Beautiful Hero Card Styling */
.hero-gradient-overlay {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, 0.95) 100%);
}

/* Responsive Single Game Page Iframe details */
.game-iframe-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Orientation templates */
.game-iframe-wrapper.orientation-landscape {
    aspect-ratio: 16 / 9;
}
.game-iframe-wrapper.orientation-portrait {
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 9 / 16;
}

.game-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Fullscreen implementation */
.game-iframe-wrapper.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    aspect-ratio: auto !important;
}

/* Play button and overlay in Single Game Playable Arena */
.play-overlay-trigger {
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

/* Interactive animations */
.transition-all { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.duration-300 { transition-duration: 300ms; }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }
.hover\:scale-105:hover { transform: scale(1.05); }
.group:hover .group-hover\:scale-110 { transform: scale(1.10); }
.group:hover .group-hover\:opacity-100 { opacity: 1; }

/* Custom Forms styling */
input, textarea, select {
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: inherit;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Ratings component styling */
.rating-bar-filled {
    height: 100%;
    background-color: var(--accent);
    transition: width 0.4s ease;
}

/* Custom Scrollbar for modern feel */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}
