/* ========================================
   Kids Learning Kingdom - Website Styles
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #6C5CE7;
    --secondary-color: #FF6B9D;
    --accent-color: #4ECDC4;
    --success-color: #A8E6CF;
    --warning-color: #FFD93D;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);

    /* Typography */
    --font-family: 'Fredoka', sans-serif;
    --font-size-base: 16px;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Container */
    --container-max-width: 1200px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    color: #333;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

.logo-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-right: var(--spacing-sm);
    transition: transform var(--transition-base);
}

.logo-icon:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.language-selector select {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-full);
    background: white;
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.language-selector select:hover {
    border-color: var(--primary-color);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 0.05;
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: var(--font-weight-bold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-semibold);
}

.hero-description {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: 1.125rem;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Floating Emojis */
.hero-image {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(106, 90, 205, 0.3));
    animation: float 3s ease-in-out infinite;
}

.floating-emojis {
    position: relative;
    width: 100%;
    height: 100%;
}

.emoji {
    position: absolute;
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

.emoji:nth-child(1) {
    top: 10%;
    left: 10%;
}

.emoji:nth-child(2) {
    top: 20%;
    right: 15%;
}

.emoji:nth-child(3) {
    top: 50%;
    left: 5%;
}

.emoji:nth-child(4) {
    bottom: 30%;
    right: 10%;
}

.emoji:nth-child(5) {
    bottom: 10%;
    left: 20%;
}

.emoji:nth-child(6) {
    top: 40%;
    right: 25%;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Section Styles */
section {
    padding: var(--spacing-xxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: #333;
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.25rem;
    color: #666;
}

/* Features Section */
.features {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    color: #333;
}

.feature-description {
    color: #666;
    line-height: 1.7;
}

/* Games Section */
.games {
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.game-card {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.game-card:hover::before {
    transform: scaleX(1);
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.game-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
}

.game-name {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    color: #333;
}

.game-description {
    color: #666;
    line-height: 1.7;
}

/* Download Section */
.download {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    padding: var(--spacing-xxl) 0;
}

.download-title {
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
}

.download-subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

.download-button {
    display: inline-block;
    margin-bottom: var(--spacing-md);
    transition: transform var(--transition-base);
}

.download-button:hover {
    transform: scale(1.05);
}

.google-play-badge {
    height: 80px;
    width: auto;
}

.download-info {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-md);
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright,
.footer-developer {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-xs);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

[dir="rtl"] .download-badges {
    flex-direction: row-reverse;
}

[dir="rtl"] .footer-grid {
    direction: rtl;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .hero-image {
        height: 300px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-image {
        height: 300px;
        margin-top: var(--spacing-lg);
    }

    .hero-banner-img {
        max-width: 300px;
    }

    .download-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    [dir="rtl"] .hero-buttons {
        flex-direction: column;
        justify-content: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .features-grid,
    .games-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .emoji {
        font-size: 2.5rem;
    }

    .google-play-badge {
        height: 60px;
    }
}

/* Download Badges Container */
.download-badges {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.store-badge {
    height: 60px;
    width: auto;
}

/* Mobile: stack badges vertically */
@media (max-width: 480px) {
    .download-badges {
        flex-direction: column;
    }

    .store-badge {
        height: 50px;
    }
}