/* NumberCraft Lotto - Creative & Playful Design */
/* Framework: Bulma CSS with custom overrides */

:root {
    /* Primary Colors - Energetic palette from app */
    --primary-teal: #4A7C91;
    --primary-blue: #5BA4CE;
    --accent-coral: #E85A4F;
    --accent-orange: #F5A623;
    --accent-purple: #9B59B6;
    --accent-green: #27AE60;

    /* Lottery Ball Colors */
    --ball-red: #E74C3C;
    --ball-orange: #F39C12;
    --ball-yellow: #F1C40F;
    --ball-green: #2ECC71;
    --ball-blue: #3498DB;
    --ball-purple: #9B59B6;
    --ball-teal: #1ABC9C;

    /* Neutral Colors */
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-medium: #5D6D7E;
    --text-light: #95A5A6;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;

    /* Border Radius - Soft style */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 50px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background: var(--bg-light);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-coral);
}

/* Navigation */
.navbar {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) var(--spacing-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.brand-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
}

.brand-text span {
    color: var(--accent-coral);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-medium);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-blue);
    background: rgba(91, 164, 206, 0.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 2px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding-top: var(--spacing-sm);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: var(--spacing-sm);
        border-bottom: 1px solid var(--bg-light);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
    color: white;
    padding: var(--spacing-xl) var(--spacing-md);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: left;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.device-mockup {
    position: relative;
    max-width: 280px;
    margin: 0 auto;
}

.device-mockup::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(145deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    border-radius: 35px;
    z-index: -1;
}

.device-mockup img {
    width: 100%;
    height: auto;
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .device-mockup {
        max-width: 220px;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    gap: var(--spacing-xs);
    min-height: 48px;
    text-align: center;
}

.btn-primary {
    background: var(--accent-coral);
    color: white;
    box-shadow: 0 4px 15px rgba(232, 90, 79, 0.4);
}

.btn-primary:hover {
    background: #d14940;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 90, 79, 0.5);
    color: white;
}

.btn-secondary {
    background: var(--accent-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
}

.btn-secondary:hover {
    background: #e09a1f;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 166, 35, 0.5);
    color: white;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-teal);
}

.btn-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .btn-group {
        justify-content: center;
    }
}

/* Lottery Balls Decoration */
.lottery-balls {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: center;
    margin: var(--spacing-md) 0;
}

.ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: bounce 2s ease-in-out infinite;
}

.ball:nth-child(1) { background: var(--ball-red); animation-delay: 0s; }
.ball:nth-child(2) { background: var(--ball-orange); animation-delay: 0.1s; }
.ball:nth-child(3) { background: var(--ball-blue); animation-delay: 0.2s; }
.ball:nth-child(4) { background: var(--ball-green); animation-delay: 0.3s; }
.ball:nth-child(5) { background: var(--ball-purple); animation-delay: 0.4s; }
.ball:nth-child(6) { background: var(--ball-teal); animation-delay: 0.5s; }

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

/* Sections */
.section {
    padding: var(--spacing-xl) var(--spacing-md);
}

.section-light {
    background: var(--bg-white);
}

.section-gradient {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

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

.section-title h2 {
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-coral), var(--accent-orange));
    border-radius: 2px;
}

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

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

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

.feature-icon.red { background: rgba(231, 76, 60, 0.15); }
.feature-icon.orange { background: rgba(243, 156, 18, 0.15); }
.feature-icon.blue { background: rgba(52, 152, 219, 0.15); }
.feature-icon.green { background: rgba(46, 204, 113, 0.15); }
.feature-icon.purple { background: rgba(155, 89, 182, 0.15); }
.feature-icon.teal { background: rgba(26, 188, 156, 0.15); }

.feature-card h3 {
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

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

/* Screenshots Section */
.screenshots-section {
    max-height: 500px;
    padding: var(--spacing-lg) var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
    overflow: hidden;
}

.screenshots-section .section-title h2 {
    color: white;
}

.screenshots-section .section-title h2::after {
    background: white;
}

.screenshot-carousel {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    height: 350px;
}

.screenshot-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
}

.screenshot-wrapper {
    position: relative;
    max-width: 200px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: absolute;
}

.screenshot-wrapper.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.screenshot-wrapper.prev,
.screenshot-wrapper.next {
    opacity: 0.5;
    transform: scale(0.7);
    z-index: 1;
}

.screenshot-wrapper.prev {
    left: 10%;
}

.screenshot-wrapper.next {
    right: 10%;
}

.screenshot-device {
    position: relative;
    background: #1a1a1a;
    border-radius: 30px;
    padding: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.screenshot-device::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background: #333;
    border-radius: 3px;
}

.screenshot-device img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    filter: blur(5px);
    transition: filter 0.3s ease;
}

.screenshot-device img.loaded {
    filter: blur(0);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-teal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: var(--accent-coral);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev { left: 5%; }
.carousel-nav.next { right: 5%; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .screenshots-section {
        max-height: 400px;
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .screenshot-carousel {
        height: 280px;
    }

    .screenshot-wrapper {
        max-width: 150px;
    }

    .screenshot-wrapper.prev,
    .screenshot-wrapper.next {
        display: none;
    }

    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-orange) 100%);
    color: white;
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
}

.cta-section h2 {
    margin-bottom: var(--spacing-sm);
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.cta-section .btn-outline {
    border-color: white;
    color: white;
}

.cta-section .btn-outline:hover {
    background: white;
    color: var(--accent-coral);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--spacing-lg) var(--spacing-md);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: var(--spacing-md) auto 0;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* Privacy Page Specific */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
}

.legal-content h1 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-teal);
}

.legal-content h2 {
    color: var(--text-dark);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--bg-light);
}

.legal-content h3 {
    color: var(--text-medium);
    margin-top: var(--spacing-sm);
}

.legal-content p,
.legal-content li {
    text-align: left;
    color: var(--text-medium);
}

.legal-content ul {
    padding-left: var(--spacing-md);
    margin: var(--spacing-sm) 0;
}

.legal-content li {
    margin-bottom: var(--spacing-xs);
}

.legal-content a {
    color: var(--primary-blue);
}

.legal-content a:hover {
    text-decoration: underline;
}

.last-updated {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: var(--spacing-md);
}

/* Contact Page */
.contact-section {
    padding: var(--spacing-xl) var(--spacing-md);
    min-height: calc(100vh - 200px);
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.contact-form h1 {
    text-align: center;
    color: var(--primary-teal);
    margin-bottom: var(--spacing-md);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--bg-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input[type="file"] {
    padding: var(--spacing-sm);
    background: var(--bg-light);
    cursor: pointer;
}

.form-submit {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--accent-coral);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit:hover {
    background: #d14940;
    transform: translateY(-2px);
}

.form-success {
    display: none;
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(46, 204, 113, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent-green);
    margin-top: var(--spacing-md);
}

.form-success.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Privacy Accept Button - CRITICAL for Flutter */
.privacy-accept-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent, rgba(44, 62, 80, 0.95) 30%);
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
    z-index: 9999;
    display: none;
}

.privacy-accept-container.show {
    display: block;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.privacy-accept-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.5);
    transition: all 0.3s ease;
}

.privacy-accept-btn:hover {
    background: #219a52;
    transform: scale(1.02);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius-md);
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

/* Responsive adjustments */
@media (max-width: 480px) {
    .hero {
        min-height: auto;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .feature-card {
        padding: var(--spacing-sm);
    }

    .contact-form {
        padding: var(--spacing-md);
    }
}
