/**
 * Basketball Landing Page Styles
 * Shared styles for both guest and cloud basketball landing pages
 */

/* ============================================
   LAYOUT VARIABLES
   ============================================ */
:root {
    --landing-max-width: 600px;
    --card-max-width: 420px;
    --accent-orange: #f97316;
    --accent-orange-dark: #ea580c;
}

/* ============================================
   SNAP SCROLL CONTAINER (Guest Landing)
   ============================================ */
.scorekeeper-landing {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.landing-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    padding: 1.5rem;
    padding-top: calc(80px + 1.5rem);
}

/* ============================================
   CLOUD LANDING LAYOUT
   ============================================ */
.cloud-landing {
    min-height: 100vh;
    padding: 2rem 1rem;
    padding-top: calc(80px + 2rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* ============================================
   HERO SECTION (Guest Landing)
   ============================================ */
.landing-hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    justify-content: flex-start;
    align-items: center;
    padding-top: calc(80px + 2.5rem);
    min-height: auto;
    position: relative;
    overflow: hidden;
}

/* Basketball court pattern overlay */
.landing-hero::before {
    content: '';
    position: absolute;
    right: -150px;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
    opacity: 0.06;
    background:
        /* Basketball ball with seams */
        radial-gradient(circle at 50% 50%, #f97316 0%, #ea580c 100%);
    border-radius: 50%;
    box-shadow: 
        inset 0 0 0 4px rgba(0,0,0,0.3),
        inset 60px 0 0 -56px rgba(0,0,0,0.25),
        inset -60px 0 0 -56px rgba(0,0,0,0.25),
        inset 0 60px 0 -56px rgba(0,0,0,0.25),
        inset 0 -60px 0 -56px rgba(0,0,0,0.25);
}

/* Hardwood floor texture */
.landing-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.03;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 80px,
            rgba(139, 90, 43, 0.5) 80px,
            rgba(139, 90, 43, 0.5) 82px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(139, 90, 43, 0.15) 0px,
            rgba(160, 110, 60, 0.15) 2px,
            rgba(139, 90, 43, 0.15) 4px
        );
}

.hero-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    max-width: 1100px;
}

.hero-form-side {
    flex: 0 0 auto;
    width: 100%;
    max-width: var(--card-max-width);
}

.hero-copy-side {
    flex: 0 0 auto;
    max-width: 460px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    line-height: 1.15;
}

.hero-title .text-gradient {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
    line-height: 1.5;
    max-width: 380px;
}

.hero-features-mini {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.hero-feature-item i {
    color: #22c55e;
    font-size: 0.875rem;
}

/* ============================================
   HERO SCOREBOARD PREVIEW
   ============================================ */
.hero-scoreboard-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
}

.preview-period {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-orange);
    background: rgba(249, 115, 22, 0.15);
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
}

.preview-clock {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.025em;
}

.preview-shot-clock {
    font-size: 1rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    min-width: 2rem;
    text-align: center;
}

.preview-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.preview-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.preview-team-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-team-score {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.preview-team.home .preview-team-score {
    color: #3b82f6;
}

.preview-team.away .preview-team-score {
    color: #ef4444;
}

.preview-fouls {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.preview-fouls.bonus {
    color: #f59e0b;
    font-weight: 700;
}

.preview-vs {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0 0.5rem;
}

/* ============================================
   HERO SOCIAL PROOF
   ============================================ */
.hero-social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1rem;
    background: rgba(249, 115, 22, 0.05);
    border: 1px solid rgba(249, 115, 22, 0.15);
    border-radius: 0.75rem;
    margin-top: 1.25rem;
}

.proof-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

.proof-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.proof-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.proof-label i {
    color: #f59e0b;
}

.proof-divider {
    width: 1px;
    height: 2rem;
    background: var(--border-color);
}

/* Mobile: Stack hero layout */
@media (max-width: 850px) {
    .hero-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-copy-side {
        order: -1;
        text-align: center;
        max-width: 100%;
    }

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

    .hero-subtitle {
        max-width: 100%;
    }

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

    .hero-features-mini {
        align-items: center;
    }

    .hero-scoreboard-preview {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-social-proof {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .proof-number {
        font-size: 1rem;
    }

    .proof-label {
        font-size: 0.625rem;
    }
}

/* ============================================
   CLOUD HERO
   ============================================ */
.cloud-hero {
    text-align: center;
    max-width: var(--landing-max-width);
    margin-bottom: 2rem;
}

.cloud-badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.cloud-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.cloud-badge.badge-sync {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.cloud-badge.badge-broadcast {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.cloud-hero h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.cloud-hero h1 .highlight {
    color: var(--accent-orange);
}

.cloud-hero p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.5;
}

/* ============================================
   MATCH SETUP CARD (Shared)
   ============================================ */
.match-setup-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    width: 100%;
    max-width: var(--card-max-width);
}

.setup-group {
    margin-bottom: 1rem;
}

.setup-group:last-of-type {
    margin-bottom: 1.25rem;
}

.setup-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.setup-group-header i {
    font-size: 1rem;
    color: var(--accent-orange);
}

.setup-group-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.setup-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.setup-section {
    margin-bottom: 0.75rem;
}

.setup-section:last-child {
    margin-bottom: 0;
}

/* ============================================
   TEAM NAME INPUTS
   ============================================ */
.team-inputs {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
}

.team-input-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.team-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.team-badge.home {
    background: #3b82f6;
}

.team-badge.away {
    background: #ef4444;
}

.vs-divider {
    flex-shrink: 0;
    padding: 0 0.25rem;
}

.vs-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

.team-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 0.5rem 0.625rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.team-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

.team-input::placeholder {
    color: var(--text-tertiary);
}

/* ============================================
   TOGGLE OPTIONS (Format/Level Selectors)
   ============================================ */
.toggle-options {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.toggle-option {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 0.625rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.toggle-option:hover {
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

.toggle-option.active {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.toggle-option small {
    display: block;
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-top: 0.125rem;
}

.toggle-option.active small {
    color: rgba(249, 115, 22, 0.7);
}

/* ============================================
   CUSTOM DURATION INPUTS
   ============================================ */
.custom-duration-group {
    display: none;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.custom-duration-group.visible {
    display: flex;
}

.custom-duration-input {
    flex: 1;
}

.custom-duration-input label {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.custom-duration-input input {
    width: 100%;
    padding: 0.375rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
    text-align: center;
}

.custom-duration-input input:focus {
    outline: none;
    border-color: var(--accent-orange);
}

/* ============================================
   CHECKBOX OPTIONS
   ============================================ */
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.checkbox-option:hover {
    border-color: var(--text-tertiary);
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-orange);
}

.checkbox-option span {
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* ============================================
   CHECKBOX WITH INLINE STEPPER
   ============================================ */
.checkbox-with-stepper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

.checkbox-with-stepper .checkbox-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.checkbox-with-stepper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--accent-orange);
}

.checkbox-with-stepper .checkbox-label {
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.stepper-control {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.stepper-control.visible {
    display: flex;
    flex-direction: row;
}

.stepper-btn {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stepper-btn:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.stepper-value {
    min-width: 20px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   START BUTTON
   ============================================ */
.start-match-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-match-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

/* ============================================
   ALT LINK
   ============================================ */
.alt-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.alt-link a {
    color: var(--accent-primary);
    text-decoration: none;
}

.alt-link a:hover {
    text-decoration: underline;
}

/* ============================================
   FEATURES SECTION (Guest Landing)
   ============================================ */
.landing-features {
    background: var(--bg-secondary);
    justify-content: center;
    padding: 3rem 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-orange);
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.375rem;
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   FEATURE LIST (Cloud Landing)
   ============================================ */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: var(--landing-max-width);
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.feature-item i {
    color: #22c55e;
    font-size: 0.875rem;
}

/* ============================================
   HOW IT WORKS SECTION (Guest Landing)
   ============================================ */
.landing-how-it-works {
    background: var(--bg-primary);
    padding: 3rem 1.5rem;
    justify-content: center;
}

.steps-list {
    max-width: var(--landing-max-width);
    margin: 0 auto;
}

.step-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.step-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   MOBILE ADJUSTMENTS
   ============================================ */
@media (max-width: 480px) {
    .match-setup-card {
        padding: 1rem;
    }
    
    .toggle-option {
        padding: 0.5rem;
        font-size: 0.75rem;
        min-width: 70px;
    }
    
    .toggle-option small {
        display: none;
    }
}
