/* static/css/predictions.css */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Brand Anchors */
    --sox-navy: #0C2340;        /* Deep Midnight Navy */
    --giants-cream: #F4F2EC;    /* Classic Home Jersey Off-White */
    
    /* Brand Accents */
    --sox-red: #BD3039;         /* Crimson Red */
    --giants-orange: #FD5A1E;   /* San Fran Vibrant Orange */
    
    /* Functional UI Colours */
    --text-dark: #1A1A1A;       /* Crisp near-black for body copy */
    --text-light: #FFFFFF;
    --card-bg: #FFFFFF;
    --border-light: #E2E8F0;
    
    /* Fonts */
    --font-display: 'Barlow Condensed', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    background-color: var(--giants-cream);
    color: var(--text-dark);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Header Styling - Anchored in Navy with Dual Accents */
.navbar {
    background-color: var(--sox-navy);
    color: var(--text-light);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--giants-orange);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    text-decoration: none;
}

.navbar-brand span {
    color: var(--sox-red);
}

/* Dashboard Wrapper */
.dashboard-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.page-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.page-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--sox-navy);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: #64748B;
    font-size: 1.1rem;
    margin: 0;
}

/* Competitions Responsive Grid */
.competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}



/* --- COMPETITION TILES WITH OVERLAY TEXT --- */

.competition-card {
    position: relative; /* Essential boundary for the stretched link button */
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

/* Dual-brand top decorative bar */
.competition-card::before {
    content: '';
    height: 4px;
    background: linear-gradient(90deg, var(--sox-red) 50%, var(--giants-orange) 50%);
    display: block;
    position: relative;
    z-index: 3;
}

/* Hover effects for the entire tile button */
.competition-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(12, 35, 64, 0.12);
    border-color: var(--sox-navy);
}

/* Container that locks the text on top of the image */
.card-hero-wrapper {
    position: relative;
    min-height: 220px; /* Ensures a good square tile aspect ratio */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Anchors the narrative text to the bottom of the image area */
    background-color: var(--sox-navy); /* Fallback colour while image loads */
    overflow: hidden;
}

/* The background tile image styling */
.card-tile-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents squishing or distortion of your imagery */
    z-index: 0;
    transition: transform 0.3s ease;
}

/* Subtle zoom effect on the image when hovering anywhere on the tile */
.competition-card:hover .card-tile-bg {
    transform: scale(1.04);
}

/* The protection overlay: blends from a faint tint down to a heavier navy shadow */
.card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg, 
        rgba(12, 35, 64, 0.35) 0%, 
        rgba(12, 35, 64, 0.85) 100%
    );
    z-index: 1;
}

/* The actual text wrapper forced to sit over the imagery layers */
.card-text-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    color: var(--text-light);
}

.card-tag {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--giants-orange);
    letter-spacing: 0.75px;
    margin-bottom: 0.25rem;
    display: block;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-description {
    color: rgba(254, 254, 254, 0.9); /* High contrast cream-white text */
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Bottom auxiliary stats bar */
.card-meta {
    background-color: #F8FAFC;
    padding: 0.85rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #64748B;
    position: relative;
    z-index: 3; /* Keeps text visible but sits beneath the invisible button link */
}

.meta-item strong {
    color: var(--text-dark);
}

/* The absolute magic link that stretches across the whole box */
.card-stretched-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4; /* Floats over everything making the whole tile clickable */
    cursor: pointer;
}





.btn-predict {
    background-color: var(--sox-navy);
    color: var(--text-light);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: background-color 0.15s ease;
}

.btn-predict:hover {
    background-color: var(--sox-red);
}

.btn-leaderboard {
    background-color: transparent;
    color: var(--sox-navy);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    padding: 0.725rem 1rem;
    border: 2px solid var(--sox-navy);
    border-radius: 6px;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
}

.btn-leaderboard:hover {
    border-color: var(--giants-orange);
    color: var(--giants-orange);
    background-color: rgba(253, 90, 30, 0.04);
}


.meta-item strong {
    color: var(--text-dark);
}

/* ==========================================================================
   GLOBAL AUTHENTICATION PAGES (LIGHT / INTEGRATED LAYOUT)
   ========================================================================== */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 75vh;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 25px rgba(12, 35, 64, 0.05);
}

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

.auth-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--sox-navy);
    margin: 0;
    text-transform: uppercase;
}

.auth-title span {
    color: var(--giants-orange);
}

.auth-subtitle {
    font-size: 0.95rem;
    color: #64748B;
    margin: 0.25rem 0 0 0;
    letter-spacing: 0.5px;
}

/* Form Element Elements */
.auth-form .form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}

.auth-form label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark, #0c2340);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--sox-navy);
    box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.08);
}

/* Submission Action Button */
.btn-auth-submit {
    width: 100%;
    padding: 0.85rem;
    background-color: var(--sox-navy);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 0.5rem;
}

.btn-auth-submit:hover {
    background-color: #1a365d;
}

/* Feedback banners */
.auth-error-banner {
    background-color: #FEF2F2;
    border: 1px solid #FCA5A5;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    color: #991B1B;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-footer-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-secondary-link {
    font-size: 0.85rem;
    color: #64748B;
    text-decoration: none;
}

.auth-secondary-link:hover {
    color: var(--sox-navy);
    text-decoration: underline;
}


/* ==========================================================================
   6. BASE FRAMEWORK ADDITIONS (Safe to append to bottom)
   ========================================================================== */

/* Extends your existing body layout to safely support a sticky footer */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Structural wrapper that pushes the footer to the bottom of the viewport */
.main-content-wrapper {
    flex: 1 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Utility layout alignment for the inner navbar items */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Layout spacing for authentication widgets in the header */
.nav-utility-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.nav-user-greeting {
    color: rgba(255, 255, 255, 0.8);
}

.nav-user-greeting strong {
    color: var(--text-light);
}

.nav-inline-form {
    margin: 0;
    padding: 0;
    display: inline;
}

/* Minimalist navigation links and button actions matching main typography tokens */
.nav-auth-link,
.nav-auth-btn {
    color: var(--text-light);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.15s ease;
}

.nav-auth-link:hover,
.nav-auth-btn:hover {
    color: var(--giants-orange);
}

/* Main landing footer structure */
.global-site-footer {
    background-color: #081629;
    color: rgba(255, 255, 255, 0.4);
    padding: 1.5rem 0;
    font-size: 0.85rem;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

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