/* ========================================
   2116 Tennis Match Tracker — Custom Styles
   Dark tech theme with lime accent
   ======================================== */

:root {
    --ct-dark: #0f1923;
    --ct-surface: #1a2332;
    --ct-card: #243040;
    --ct-accent: #c5e83d;
    --ct-accent-hover: #d4f24c;
    --ct-text: #f0f6fc;
    --ct-muted: #8b949e;
    --ct-border: #2d3748;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--ct-dark);
    color: var(--ct-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---- Device Mockup (Hero — large) ---- */
.device-mockup {
    position: relative;
    width: 280px;
    max-width: 100%;
    background: #000;
    border-radius: 36px;
    padding: 12px;
    box-shadow: 0 25px 60px rgba(0,0,0,.5), inset 0 0 0 2px rgba(255,255,255,.1);
}
.device-mockup::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: #1a1a2e;
    border-radius: 3px;
    z-index: 2;
}
.device-screen {
    width: 100%;
    display: block;
    border-radius: 24px;
    object-fit: cover;
    aspect-ratio: 9/19.5;
}

/* ---- Device Mockup (Carousel — small) ---- */
.device-mockup-sm {
    position: relative;
    width: 220px;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    border-radius: 30px;
    padding: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,.4), inset 0 0 0 2px rgba(255,255,255,.08);
    cursor: pointer;
    transition: transform .3s ease;
}
.device-mockup-sm:hover { transform: scale(1.02); }
.device-screen-sm {
    width: 100%;
    display: block;
    border-radius: 20px;
    object-fit: cover;
    aspect-ratio: 9/19.5;
}

/* ---- Screenshot Carousel ---- */
.carousel-container {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
    padding: 0 50px;
}
.carousel-viewport {
    overflow: hidden;
    border-radius: 10px;
}
.carousel-track {
    display: flex;
    transition: transform .4s ease;
}
.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ct-card);
    border: 1px solid var(--ct-border);
    border-radius: 50%;
    color: var(--ct-text);
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
    z-index: 2;
}
.carousel-prev:hover,
.carousel-next:hover {
    background: var(--ct-accent);
    border-color: var(--ct-accent);
    color: var(--ct-dark);
}
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--ct-border);
    cursor: pointer;
    transition: background .2s, transform .2s;
    padding: 0;
}
.carousel-dot.active {
    background: var(--ct-accent);
    transform: scale(1.3);
}

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.lightbox.active {
    opacity: 1;
    pointer-events: all;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 101;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
    object-fit: contain;
}

/* ---- Feature icon block ---- */
.feature-icon-block {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ct-surface);
    border: 1px solid var(--ct-border);
    border-radius: 20px;
    flex-shrink: 0;
}

/* ---- Privacy Accept Button (Flutter) ---- */
.privacy-accept-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    padding: 16px 20px 24px;
    background: linear-gradient(transparent, var(--ct-dark) 30%);
    display: flex;
    justify-content: center;
}
.privacy-accept-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    padding: 16px 32px;
    background: var(--ct-accent);
    color: var(--ct-dark);
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: background .2s;
    text-align: center;
    font-family: inherit;
}
.privacy-accept-btn:hover { background: var(--ct-accent-hover); }

/* ---- Content pages (privacy, terms) ---- */
.content-page { max-width: 800px; margin: 0 auto; }
.content-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; color: var(--ct-text); }
.content-page h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--ct-accent); }
.content-page h3 { font-size: 1.15rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: .75rem; color: var(--ct-text); }
.content-page p { text-align: left; margin-bottom: 1rem; color: var(--ct-muted); line-height: 1.7; }
.content-page ul { text-align: left; padding-left: 1.5rem; margin-bottom: 1rem; }
.content-page li { color: var(--ct-muted); margin-bottom: .5rem; line-height: 1.6; }
.content-page li strong { color: var(--ct-text); }
.content-page a { color: var(--ct-accent); text-decoration: underline; text-underline-offset: 2px; }
.content-page a:hover { color: var(--ct-accent-hover); }

/* ---- Contact form ---- */
.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--ct-dark);
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    color: var(--ct-text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color .2s;
    outline: none;
}
.form-input:focus,
.form-textarea:focus { border-color: var(--ct-accent); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--ct-muted); }
.form-textarea { resize: vertical; min-height: 140px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--ct-text); }

.form-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 32px;
    background: var(--ct-accent);
    color: var(--ct-dark);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s;
    font-family: inherit;
    text-align: center;
}
.form-submit:hover { background: var(--ct-accent-hover); }

.form-success {
    display: none;
    padding: 20px;
    background: rgba(197,232,61,.1);
    border: 1px solid var(--ct-accent);
    border-radius: 12px;
    text-align: center;
    color: var(--ct-accent);
    font-weight: 500;
}
.form-success.show { display: block; }

/* ---- Responsive ---- */
@media (min-width: 769px) {
    .carousel-container { max-width: 360px; padding: 0 54px; }
    .device-mockup-sm { width: 260px; }
}

@media (max-width: 768px) {
    .device-mockup { width: 240px; }
    .carousel-container { max-width: 260px; padding: 0 44px; }
    .device-mockup-sm { width: 180px; }
    .content-page h1 { font-size: 1.6rem; }
    .content-page h2 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .device-mockup { width: 200px; }
    .carousel-container { max-width: 220px; padding: 0 40px; }
    .device-mockup-sm { width: 160px; }
    .carousel-prev,
    .carousel-next { width: 34px; height: 34px; }
}
