/* RallyPulse - Tennis Tracker Website Styles */
/* Design: Tech/Gaming with Neon Yellow accents on Dark */

:root {
    --primary-dark: #0d0d0d;
    --secondary-dark: #1a1a1a;
    --card-dark: #242424;
    --neon-yellow: #e5ff00;
    --neon-yellow-dim: rgba(229, 255, 0, 0.15);
    --neon-yellow-glow: rgba(229, 255, 0, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --border-color: #333333;
    --success-green: #4ade80;
    --error-red: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nav-logo svg {
    width: 32px;
    height: 32px;
    fill: var(--neon-yellow);
}

.nav-logo span {
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--neon-yellow);
    background: var(--neon-yellow-dim);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 20px 60px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 50%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, var(--neon-yellow-dim) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

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

.hero-badge {
    display: inline-block;
    background: var(--neon-yellow-dim);
    color: var(--neon-yellow);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid var(--neon-yellow);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--neon-yellow) 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: 40px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--neon-yellow);
    color: var(--primary-dark);
    box-shadow: 0 0 30px var(--neon-yellow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px var(--neon-yellow-glow);
}

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

.btn-secondary:hover {
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
}

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

.device-mockup {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.device-frame {
    position: relative;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px var(--neon-yellow-dim);
}

.device-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
}

.device-screen {
    border-radius: 30px;
    overflow: hidden;
    background: var(--primary-dark);
}

.device-screen img {
    width: 100%;
    height: auto;
    display: block;
    filter: blur(5px);
    transition: filter 0.5s ease;
}

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

/* Features Section */
.features {
    padding: 100px 20px;
    background: var(--secondary-dark);
}

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

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--card-dark);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-yellow);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--neon-yellow-dim);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--neon-yellow);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-description {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: left;
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots {
    padding: 80px 20px;
    background: var(--primary-dark);
    max-height: 500px;
    overflow: hidden;
}

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

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

.carousel-slide {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.carousel-slide.active {
    display: flex;
}

.screenshot-device {
    position: relative;
    max-width: 200px;
    width: 100%;
}

.screenshot-frame {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 30px;
    padding: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.screenshot-frame img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    display: block;
    max-height: 280px;
    object-fit: cover;
    object-position: top;
    cursor: pointer;
    filter: blur(5px);
    transition: filter 0.5s ease;
}

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

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: var(--neon-yellow);
    color: var(--primary-dark);
    border-color: var(--neon-yellow);
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--neon-yellow);
    transform: scale(1.2);
}

/* CTA Section */
.cta {
    padding: 100px 20px;
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, var(--neon-yellow-dim) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 30px;
}

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

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

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo svg {
    width: 32px;
    height: 32px;
    fill: var(--neon-yellow);
}

.footer-logo span {
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: left;
}

.footer-links h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

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

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Page Header (for inner pages) */
.page-header {
    padding: 140px 20px 60px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    text-align: center;
}

.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
}

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

/* Content Section (for Privacy, Terms) */
.content-section {
    padding: 80px 20px;
    background: var(--secondary-dark);
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-dark);
    border-radius: 16px;
    padding: 48px;
    border: 1px solid var(--border-color);
}

.content-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 40px 0 16px;
    color: var(--neon-yellow);
}

.content-container h2:first-child {
    margin-top: 0;
}

.content-container h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 30px 0 12px;
    color: var(--text-primary);
}

.content-container p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-align: left;
    line-height: 1.7;
}

.content-container ul,
.content-container ol {
    color: var(--text-secondary);
    margin: 16px 0;
    padding-left: 24px;
    text-align: left;
}

.content-container li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.content-container a {
    color: var(--neon-yellow);
    text-decoration: none;
}

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

.last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

/* Contact Form */
.contact-section {
    padding: 80px 20px;
    background: var(--secondary-dark);
}

.contact-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info {
    text-align: left;
}

.contact-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.7;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.contact-detail-icon {
    width: 48px;
    height: 48px;
    background: var(--neon-yellow-dim);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-detail-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--neon-yellow);
}

.contact-detail-text {
    text-align: left;
}

.contact-detail-text span {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.contact-detail-text a,
.contact-detail-text p {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    margin: 0;
}

.contact-form-card {
    background: var(--card-dark);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--secondary-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--neon-yellow);
    box-shadow: 0 0 0 3px var(--neon-yellow-dim);
}

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

.form-group input[type="file"] {
    padding: 12px;
    cursor: pointer;
}

.form-group input[type="file"]::file-selector-button {
    background: var(--neon-yellow);
    color: var(--primary-dark);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 12px;
    font-weight: 500;
}

.btn-submit {
    width: 100%;
    padding: 16px 32px;
}

.form-success {
    display: none;
    text-align: center;
    padding: 40px;
}

.form-success.show {
    display: block;
}

.form-success svg {
    width: 64px;
    height: 64px;
    fill: var(--success-green);
    margin-bottom: 20px;
}

.form-success h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.form-success p {
    color: var(--text-secondary);
}

/* Privacy Accept Button (Flutter Integration) */
.privacy-accept-container {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(0deg, var(--primary-dark) 0%, rgba(13, 13, 13, 0.95) 100%);
    z-index: 9999;
    text-align: center;
}

.privacy-accept-container.show {
    display: block;
}

.privacy-accept-btn {
    background: var(--neon-yellow);
    color: var(--primary-dark);
    padding: 18px 60px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 40px var(--neon-yellow-glow);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.privacy-accept-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 60px var(--neon-yellow-glow);
}

/* 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: 20px;
}

.lightbox.show {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
}

.lightbox-close:hover {
    color: var(--neon-yellow);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

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

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

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

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

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

    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
        text-align: center;
    }

    .footer-brand p {
        text-align: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        text-align: center;
    }

    .contact-detail {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 20px;
        text-align: center;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
        padding: 120px 20px 60px;
    }

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

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

    .btn {
        padding: 14px 24px;
        font-size: 0.95rem;
    }

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

    .screenshot-carousel {
        height: 300px;
    }

    .screenshot-device {
        max-width: 160px;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

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

    .footer-links {
        text-align: center;
    }

    .content-container {
        padding: 24px;
    }

    .contact-form-card {
        padding: 24px;
    }

    .screenshots {
        max-height: 400px;
    }
}

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

    .hero-buttons .btn {
        width: 100%;
    }

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

    .screenshot-device {
        max-width: 140px;
    }

    .screenshot-frame img {
        max-height: 220px;
    }

    .screenshots {
        max-height: 350px;
        padding: 60px 20px;
    }

    .screenshot-carousel {
        height: 250px;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
