/* ==========================================================================
   Strangers United FC - Mobile Web App Stylesheet
   Predominantly White with Broad Navy Blue Uniform Sections
   ========================================================================== */

:root {
    --white-pure: #FFFFFF;
    --white-bg: #F8FAFC;
    --navy-dark: #071328;
    --navy-deep: #0A192F;
    --navy-primary: #0F2342;
    --navy-accent: #1E3A8A;
    --navy-card-bg: #162B4D;
    
    --slate-dark: #1E293B;
    --slate-muted: #64748B;
    --slate-light: #E2E8F0;
    --slate-border: #E2E8F0;
    
    --blue-highlight: #0284C7;
    --gold-accent: #D97706;
    --green-win: #059669;
    --red-loss: #DC2626;
    --blue-draw: #2563EB;
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(15, 35, 66, 0.06);
    --shadow-md: 0 10px 25px -5px rgba(15, 35, 66, 0.08);
    --shadow-lg: 0 15px 35px -5px rgba(10, 25, 47, 0.15);
    
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

/* Reset & Mobile App Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background-color: var(--white-bg);
    color: var(--slate-dark);
    font-family: var(--font-body);
    width: 100%;
    min-height: 100vh;
    padding-bottom: 75px; /* Clear bottom app bar */
}

/* Container Wrapper (Mobile-Centric Frame) */
.mobile-app {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--white-pure);
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Mobile Top Header (Crisp White) */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-border);
    padding: 0.8rem 1.2rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.header-logo {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    color: var(--navy-deep);
    line-height: 1.1;
}

.brand-sub {
    font-size: 0.72rem;
    color: var(--slate-muted);
    font-weight: 500;
}

.header-ez-btn {
    background: var(--white-bg);
    border: 1px solid var(--slate-border);
    color: var(--navy-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    text-decoration: none;
}

/* App Sections Switcher */
.app-main {
    width: 100%;
}

.app-section {
    display: none;
}

.app-section.active {
    display: block;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BROAD NAVY BLUE UNIFORM HERO BANNER */
.navy-hero-banner {
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-primary) 100%);
    color: var(--white-pure);
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-crest-wrapper {
    width: 130px;
    height: 130px;
    margin: 0 auto 1.2rem;
    position: relative;
    border-radius: 50%;
    background: var(--white-pure);
    padding: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.hero-crest {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
    color: var(--white-pure);
}

.hero-sub {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.jersey-stripe-accent {
    width: 60px;
    height: 4px;
    background: var(--white-pure);
    margin: 1.2rem auto 0;
    border-radius: 2px;
}

/* Section Title Banner for Sub-Pages */
.section-title-banner {
    background: var(--navy-deep);
    color: var(--white-pure);
    padding: 1.8rem 1.2rem 1.5rem;
    text-align: center;
}

.section-title-banner h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
}

.section-title-banner p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0.2rem;
}

/* PREDOMINANTLY WHITE CONTAINERS & CARDS */
.white-container {
    background-color: var(--white-bg);
    padding: 1.2rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card {
    background-color: var(--white-pure);
    border: 1px solid var(--slate-border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.2rem;
    box-shadow: var(--shadow-sm);
}

/* Next Match Card */
.next-match-card {
    border-top: 4px solid var(--navy-primary);
}

.card-badge {
    display: inline-block;
    background: var(--navy-primary);
    color: var(--white-pure);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.match-vs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    background: var(--white-bg);
    border-radius: var(--radius-md);
}

.vs-team {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.vs-label {
    font-size: 0.68rem;
    color: var(--slate-muted);
    font-weight: 700;
}

.vs-name {
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--navy-deep);
}

.vs-team.club-highlight .vs-name {
    color: var(--blue-highlight);
}

.vs-circle {
    width: 32px;
    height: 32px;
    background: var(--navy-deep);
    color: var(--white-pure);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 900;
}

.match-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: var(--slate-dark);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* App Buttons */
.app-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.app-btn:active {
    transform: scale(0.98);
}

.btn-navy {
    background-color: var(--navy-deep);
    color: var(--white-pure);
}

.btn-navy:hover {
    background-color: var(--navy-primary);
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid var(--navy-deep);
    color: var(--navy-deep);
}

.btn-whatsapp {
    background-color: #059669;
    color: var(--white-pure);
}

/* Info & Uniform Cards */
.info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--navy-deep);
    margin-bottom: 0.8rem;

}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    text-align: center;
}

.stat-box {
    background: var(--white-bg);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.4rem;
}

.stat-val {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy-deep);
}

.stat-lbl {
    font-size: 0.72rem;
    color: var(--slate-muted);
    font-weight: 600;
}

.uniform-card {
    text-align: center;
}

.uniform-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: left;
    margin-bottom: 1rem;
}

.uniform-icon {
    font-size: 1.8rem;
}

.uniform-header h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--navy-deep);
}

.uniform-header p {
    font-size: 0.78rem;
    color: var(--slate-muted);
}

.uniform-img {
    width: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
    max-height: 280px;
    border: 1px solid var(--slate-border);
}

/* Mobile Filter Bar */
.mobile-filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.filter-pill {
    flex: 1;
    padding: 0.55rem 0.2rem;
    border-radius: 20px;
    border: 1px solid var(--slate-border);
    background: var(--white-pure);
    color: var(--slate-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.filter-pill.active {
    background: var(--navy-deep);
    color: var(--white-pure);
    border-color: var(--navy-deep);
}

/* Mobile Fixtures Feed */
.mobile-fixtures-feed {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.fixture-card {
    background: var(--white-pure);
    border: 1px solid var(--slate-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.fixture-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--slate-muted);
    margin-bottom: 0.8rem;
}

.badge-result {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.18rem 0.5rem;
    border-radius: 10px;
}

.badge-result.win { background: #E6F4EA; color: var(--green-win); }
.badge-result.loss { background: #FCE8E6; color: var(--red-loss); }
.badge-result.draw { background: #E8F0FE; color: var(--blue-draw); }
.badge-result.upcoming { background: #FEF3C7; color: var(--gold-accent); }

.fixture-teams-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

.fixture-team {
    flex: 1;
    color: var(--navy-deep);
}

.fixture-team.is-club {
    color: var(--blue-highlight);
    font-weight: 900;
}

.fixture-score {
    background: var(--navy-deep);
    color: var(--white-pure);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    min-width: 54px;
    text-align: center;
}

.fixture-venue {
    font-size: 0.75rem;
    color: var(--slate-muted);
    margin-top: 0.6rem;
}

/* Mobile Standings Table */
.table-scroll-wrapper {
    overflow-x: auto;
    background: var(--white-pure);
    border: 1px solid var(--slate-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mobile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.mobile-table th {
    background: var(--navy-deep);
    color: var(--white-pure);
    font-weight: 600;
    padding: 0.75rem 0.6rem;
}

.mobile-table td {
    padding: 0.8rem 0.6rem;
    border-bottom: 1px solid var(--slate-border);
}

.mobile-table tr.highlight-club {
    background: #F0F9FF;
    font-weight: 800;
}

.mobile-table tr.highlight-club td {
    color: var(--navy-deep);
    border-bottom: 2px solid var(--blue-highlight);
}

.pts-val {
    font-weight: 900;
    color: var(--navy-deep);
}

/* EZ Toggle Card */
.ez-toggle-card {
    margin-top: 0.5rem;
}

.iframe-wrapper.hidden {
    display: none;
}

.iframe-wrapper {
    margin-top: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--slate-border);
    height: 500px;
}

.mobile-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile RSVP Cards */
.mobile-rsvp-feed {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.rsvp-mobile-card {
    background: var(--white-pure);
    border: 1px solid var(--slate-border);
    border-radius: var(--radius-lg);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.rsvp-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--navy-deep);
    margin-bottom: 0.2rem;
}

.rsvp-card-sub {
    font-size: 0.78rem;
    color: var(--slate-muted);
    margin-bottom: 0.8rem;
}

.rsvp-buttons {
    display: flex;
    gap: 0.4rem;
}

.r-btn {
    flex: 1;
    padding: 0.6rem 0.2rem;
    border-radius: 20px;
    border: 1px solid var(--slate-border);
    background: var(--white-bg);
    color: var(--slate-dark);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.r-btn.in.active { background: var(--green-win); color: var(--white-pure); border-color: var(--green-win); }
.r-btn.maybe.active { background: var(--gold-accent); color: var(--white-pure); border-color: var(--gold-accent); }
.r-btn.out.active { background: var(--red-loss); color: var(--white-pure); border-color: var(--red-loss); }

/* WhatsApp Card */
.whatsapp-share-card h4 {
    font-family: var(--font-heading);
    color: var(--navy-deep);
    font-size: 1rem;
}

.whatsapp-share-card p {
    font-size: 0.8rem;
    color: var(--slate-muted);
}

.wa-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.wa-icon {
    font-size: 1.5rem;
}

.mobile-textarea {
    width: 100%;
    background: var(--white-bg);
    border: 1px solid var(--slate-border);
    border-radius: var(--radius-md);
    color: var(--navy-deep);
    font-family: monospace;
    font-size: 0.82rem;
    padding: 0.7rem;
    margin-bottom: 0.8rem;
    resize: none;
}

/* Roster Form Styles */
.rsvp-form-card {
    border-top: 4px solid var(--navy-deep);
}

.form-title {
    font-family: var(--font-heading);
    color: var(--navy-deep);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--navy-deep);
    margin-bottom: 0.4rem;
}

.mobile-select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--slate-border);
    background-color: var(--white-bg);
    color: var(--navy-deep);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
}

.mobile-select:focus {
    border-color: var(--navy-deep);
    background-color: var(--white-pure);
}

.rsvp-btn-row {
    display: flex;
    gap: 0.5rem;
}

.rsvp-action-btn {
    flex: 1;
    padding: 0.75rem 0.3rem;
    border-radius: 25px;
    border: none;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.rsvp-action-btn:active {
    transform: scale(0.96);
}

.btn-in { background: var(--green-win); color: var(--white-pure); }
.btn-maybe { background: var(--gold-accent); color: var(--white-pure); }
.btn-out { background: var(--red-loss); color: var(--white-pure); }

.sync-msg {
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    margin-top: 0.6rem;
}

/* Live Roster Attendance List */
.roster-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.roster-card-header h3 {
    font-family: var(--font-heading);
    color: var(--navy-deep);
    font-size: 1.05rem;
}

.live-sync-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: #059669;
    background: #E6F4EA;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.attendance-summary-pills {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.summary-pill {
    flex: 1;
    text-align: center;
    padding: 0.4rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
}

.pill-in { background: #E6F4EA; color: var(--green-win); }
.pill-maybe { background: #FEF3C7; color: var(--gold-accent); }
.pill-out { background: #FCE8E6; color: var(--red-loss); }

.roster-attendance-grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.roster-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: var(--white-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-border);
}

.player-name-text {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--navy-deep);
}

.player-st-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.player-st-badge.in { background: #E6F4EA; color: var(--green-win); }
.player-st-badge.maybe { background: #FEF3C7; color: var(--gold-accent); }
.player-st-badge.out { background: #FCE8E6; color: var(--red-loss); }
.player-st-badge.pending { background: var(--slate-light); color: var(--slate-muted); }

/* MOBILE BOTTOM APP NAVIGATION BAR (Pinned Bottom) */
.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 65px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--slate-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.06);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--slate-muted);
    font-size: 0.7rem;
    font-weight: 600;
    flex: 1;
    height: 100%;
    transition: color 0.2s ease;
}

.nav-svg {
    width: 22px;
    height: 22px;
    margin-bottom: 0.2rem;
}

.nav-item.active {
    color: var(--navy-deep);
    font-weight: 800;
}

.nav-item.active .nav-svg {
    stroke: var(--navy-deep);
    transform: translateY(-1px);
}
