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

:root {
    --primary-color: #10b981; /* Green for "Safe/Working" vibe */
    --secondary-color: #059669;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    /* Category Colors */
    --color-puzzle: #facc15;
    --color-sports: #3b82f6;
    --color-dressup: #ec4899;
    --color-story: #a855f7;
    --color-action: #ef4444;
    --color-kids: #22c55e;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    justify-self: start;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.nav-menu-center {
    display: flex;
    list-style: none;
    gap: 2rem;
    justify-self: center;
}

.nav-menu-center a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.2s;
}

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

.nav-menu-right {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    justify-self: end;
}

.nav-menu-right a {
    text-decoration: none;
    font-size: 1.5rem;
    transition: transform 0.2s;
    display: block;
}

.nav-menu-right a:hover {
    transform: scale(1.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    box-shadow: var(--shadow-lg);
    font-family: inherit;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--secondary-color);
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Category Specific Titles */
.section-title.puzzle::before { background: var(--color-puzzle); }
.section-title.sports::before { background: var(--color-sports); }
.section-title.dressup::before { background: var(--color-dressup); }
.section-title.story::before { background: var(--color-story); }
.section-title.action::before { background: var(--color-action); }
.section-title.kids::before { background: var(--color-kids); }

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.app-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid transparent;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0,0,0,0.05);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 1rem;
    object-fit: cover;
    background: #e5e7eb; /* Placeholder color */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.app-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.app-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.mod-tag {
    background: #ecfdf5;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: auto;
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-card:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* App Details Page */
.app-header {
    background: var(--white);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.app-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.app-header-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.app-header-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.app-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-safe { background: #d1fae5; color: #065f46; }
.badge-version { background: #e0f2fe; color: #075985; }
.badge-size { background: #f3f4f6; color: #374151; }

.download-btn-large {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.download-btn-large:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 15px 20px -3px rgba(0, 0, 0, 0.15);
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.content-main {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-box {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label { color: var(--text-light); }
.info-value { font-weight: 600; }

.mod-features-list {
    list-style: none;
    margin: 1rem 0;
}

.mod-features-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.mod-features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Legal Pages */
.legal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h1 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.legal-content h2 {
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.legal-content ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu-center {
        display: none;
    }
    
    .nav-menu-right {
        display: flex;
        gap: 1rem;
    }
    
    .nav-menu-right a {
        font-size: 1.25rem;
    }
    
    .navbar .container {
        display: flex;
        justify-content: space-between;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .app-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}
