/* ==========================================
   4MyFamily Landing Page Styles
   ========================================== */

/* CSS Variables */
:root {
    --primary: #5C6BC0;
    --primary-dark: #3949AB;
    --primary-light: #7986CB;
    --secondary: #FF6B6B;
    --accent: #FFD700;
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #f44336;

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #1a1a2e;

    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-light: #ffffff;

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(92, 107, 192, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(92, 107, 192, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-light);
}

.btn-white {
    background: var(--bg-primary);
    color: var(--primary);
}

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

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

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

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-cta {
    padding: 10px 24px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    z-index: -2;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: linear-gradient(135deg, rgba(92, 107, 192, 0.1) 0%, rgba(255, 107, 107, 0.1) 100%);
    border-radius: 50%;
    z-index: -1;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(92, 107, 192, 0.1) 0%, rgba(255, 107, 107, 0.1) 100%);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 20px;
}

.hero-badge i {
    color: var(--accent);
}

.hero-title {
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.phone-mockup {
    position: relative;
    width: 280px;
    height: 560px;
    background: #1a1a2e;
    border-radius: 40px;
    padding: 12px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: #0d0d1a;
    border-radius: 20px;
}

.phone-screen {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    height: 100%;
    padding: 50px 16px 20px;
    overflow: hidden;
}

.app-header {
    color: white;
    margin-bottom: 20px;
}

.app-greeting {
    font-size: 1.3rem;
    font-weight: 700;
}

.app-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

.app-progress {
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 16px;
}

.progress-label {
    color: white;
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 1s ease;
}

.progress-stars {
    text-align: center;
    margin-top: 8px;
    font-size: 1rem;
}

.app-tasks {
    background: white;
    border-radius: var(--radius-md);
    padding: 8px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.task-item.completed {
    color: var(--success);
}

.task-item.completed span:nth-child(2) {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-item i {
    font-size: 1.1rem;
}

.task-item .points {
    margin-left: auto;
    font-weight: 600;
    color: var(--accent);
    font-size: 0.75rem;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    font-weight: 500;
    animation: float 3s ease-in-out infinite;
}

.floating-card .emoji {
    font-size: 1.2rem;
}

.card-1 {
    top: 10%;
    left: -20px;
    animation-delay: 0s;
}

.card-2 {
    top: 40%;
    right: -30px;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20%;
    left: -10px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(92, 107, 192, 0.1) 0%, rgba(255, 107, 107, 0.1) 100%);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
}

.section-title {
    margin-bottom: 16px;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Features Section */
.features {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.feature-list i {
    color: var(--success);
    font-size: 0.8rem;
}

/* TDAH Section */
.tdah-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tdah-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.tdah-section .section-badge {
    background: rgba(255,255,255,0.2);
    color: white;
}

.tdah-section .section-title {
    color: white;
}

.tdah-section .section-description {
    color: rgba(255,255,255,0.9);
}

.tdah-features {
    margin-top: 40px;
}

.tdah-feature {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.tdah-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tdah-feature h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.tdah-feature p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Celebration Demo */
.celebration-demo {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.celebration-content {
    position: relative;
    z-index: 1;
}

.celebration-emoji {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.celebration-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.celebration-points {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
}

.celebration-message {
    color: var(--text-secondary);
}

.confetti {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle, var(--accent) 2px, transparent 2px),
        radial-gradient(circle, var(--secondary) 2px, transparent 2px),
        radial-gradient(circle, var(--primary) 2px, transparent 2px);
    background-size: 60px 60px, 45px 45px, 30px 30px;
    background-position: 0 0, 20px 30px, 10px 10px;
    opacity: 0.3;
    animation: confetti-fall 2s linear infinite;
}

@keyframes confetti-fall {
    0% { background-position: 0 0, 20px 30px, 10px 10px; }
    100% { background-position: 0 60px, 20px 90px, 10px 70px; }
}

/* Gamification Section */
.gamification {
    background: var(--bg-secondary);
}

.gamification-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gamification-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
}

.gamification-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.gamification-icon {
    font-size: 2rem;
}

.gamification-header h3 {
    font-size: 1.2rem;
}

.achievements-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.achievement-icon {
    font-size: 1.2rem;
}

.bonus-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bonus-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border-left: 3px solid var(--color);
}

.bonus-item .pts {
    margin-left: auto;
    font-weight: 700;
    color: var(--color);
}

.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.leader-1 { background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%); }
.leader-2 { background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(192, 192, 192, 0.1) 100%); }
.leader-3 { background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(205, 127, 50, 0.1) 100%); }

.leader .position {
    font-size: 1.2rem;
}

.leader .avatar {
    font-size: 1.5rem;
}

.leader .name {
    font-weight: 600;
}

.leader .score {
    margin-left: auto;
    font-weight: 700;
    color: var(--primary);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
}

.cta-content {
    text-align: center;
    color: white;
}

.cta-content h2 {
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.about-card {
    text-align: center;
    padding: 32px 24px;
}

.about-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.about-card h3 {
    margin-bottom: 8px;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    margin-top: 12px;
}

.footer-brand .logo-text {
    color: white;
    -webkit-text-fill-color: white;
}

.footer h4 {
    margin-bottom: 16px;
    font-size: 1rem;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    text-align: center;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    margin-bottom: 40px;
}

.mobile-nav-links li {
    margin-bottom: 20px;
}

.mobile-nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .features-grid,
    .gamification-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .mobile-menu-btn {
        display: block;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin: 0 auto 32px;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

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

    .tdah-content {
        grid-template-columns: 1fr;
    }

    .tdah-visual {
        order: -1;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-contact p {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn-lg {
        width: 100%;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
}
