@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

:root {
    /* Bright & Vibrant Color Palette */
    --bg-color: #f0f4ff;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --surface-color: #ffffff;
    --surface-hover: #f8f9ff;
    --primary-color: #ff6b6b;
    /* Vibrant Coral Red */
    --primary-glow: rgba(255, 107, 107, 0.3);
    --secondary-color: #4ecdc4;
    /* Turquoise */
    --accent-color: #ffe66d;
    /* Bright Yellow */
    --success-color: #51cf66;
    /* Fresh Green */
    --purple-color: #845ec2;
    /* Vibrant Purple */
    --orange-color: #ff9671;
    /* Soft Orange */
    --pink-color: #ff6f91;
    /* Hot Pink */
    --blue-color: #4dabf7;
    /* Sky Blue */

    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-light: #b2bec3;

    /* Spacing & Radius */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.1);
    --shadow-md: 0 4px 16px rgba(102, 126, 234, 0.15);
    --shadow-lg: 0 8px 24px rgba(102, 126, 234, 0.2);
    --shadow-color: 0 12px 32px rgba(255, 107, 107, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Mobile Container Constraint */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(180deg, #f0f4ff 0%, #fef9ff 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 50px rgba(102, 126, 234, 0.15);
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.section {
    padding: var(--spacing-md);
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.view-all {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Components */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--pink-color));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 20px var(--primary-glow);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 8px 28px var(--primary-glow);
}

/* Game Card Styles */
.game-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: var(--shadow-sm);
}

.game-card:active {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.game-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.game-info {
    padding: var(--spacing-sm);
}

.game-name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--accent-color);
    margin-top: 4px;
}

.game-rating i {
    color: var(--accent-color);
}

/* Horizontal Scroll Container */
.scroll-x {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
    scrollbar-width: none;
}

.scroll-x::-webkit-scrollbar {
    display: none;
}

.scroll-x .game-card {
    flex: 0 0 120px;
}

/* Grid Layout */
.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

/* Header & Footer */
header {
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-color), var(--orange-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 230, 109, 0.4);
}

.header-actions i {
    color: white;
    cursor: pointer;
}

footer {
    margin-top: auto;
    padding: var(--spacing-lg) var(--spacing-md);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
    color: white;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.9;
}

.copyright {
    color: white;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Colorful Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, var(--success-color), var(--secondary-color));
}

.badge-hot {
    background: linear-gradient(135deg, var(--primary-color), var(--orange-color));
}

.badge-trending {
    background: linear-gradient(135deg, var(--purple-color), var(--pink-color));
}