/* =========================================
   1. Global Reset & Variables
   ========================================= */
:root {
    --bg-color: #0f172a;       /* Deep Dark Blue */
    --card-bg: #1e293b;        /* Lighter Blue/Slate */
    --text-main: #f1f5f9;      /* Off-white */
    --text-muted: #94a3b8;     /* Greyish blue */
    --accent: #3b82f6;         /* Bright Blue */
    --accent-hover: #2563eb;   /* Darker Blue */
    --pick-em-green: #22c55e;  /* Green for Pick'em Apps */
    --pick-em-yellow: #facc15; /* Yellow for Highlights */
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* =========================================
   2. Header / Navigation
   ========================================= */
header {
    background-color: #1e293b;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover, nav a.active {
    color: var(--accent);
}

/* =========================================
   3. Main Container & Typography
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

/* =========================================
   4. INDEX PAGE: FAQ & Filters
   ========================================= */
.faq-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px; 
    margin-bottom: 30px;
    border: 1px solid #334155;
}

.faq-container h2 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.faq-item { margin-bottom: 15px; } 
.faq-question { font-weight: bold; font-size: 1rem; margin-bottom: 4px; color: #e2e8f0; }
.faq-answer { color: var(--text-muted); font-size: 0.9rem; }
.faq-answer strong { color: var(--pick-em-yellow); }

/* Filters */
.filter-container { margin-bottom: 30px; }

.filter-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-title { 
    font-size: 1.2rem; 
    font-weight: 600; 
    color: var(--accent); 
    margin: 0; 
}

.filter-divider { height: 1px; background-color: #334155; width: 100%; margin-bottom: 20px; }

.filter-controls { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }

.filter-group-inline { display: flex; align-items: center; gap: 6px; }
.filter-group-inline label { font-size: 0.85rem; color: var(--text-muted); }

select, input[type="number"], input[type="text"] {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid #334155;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 110px;
}
select:focus, input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* =========================================
   5. INDEX PAGE: Offer Cards
   ========================================= */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 18px;
    border: 1px solid #334155;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    top: 0;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5); border-color: var(--accent); }

.card.pick-em-card { border: 1px solid var(--pick-em-yellow); }
.card.pick-em-card:hover { border-color: #fde047; box-shadow: 0 10px 15px -3px rgba(250, 204, 21, 0.2); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.title-group { display: flex; flex-direction: column; }
.card-title { font-size: 1.15rem; font-weight: 600; line-height: 1.2; }
.ev-badge {
    font-size: 0.75rem; font-weight: 700; color: #4ade80;
    background-color: rgba(34, 197, 94, 0.15); padding: 2px 6px;
    border-radius: 4px; display: inline-block; width: fit-content; margin-top: 4px;
}
.card-logo {
    width: 45px; height: 45px; background-color: #fff;
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.card-logo img { width: 100%; height: 100%; object-fit: contain; }

.offer-details { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 15px; flex-grow: 1; }
.bonus-text { color: var(--text-main); font-weight: bold; font-size: 1rem; line-height: 1.3; }
.bonus-subtext { font-size: 0.8rem; color: #64748b; margin-top: 4px; font-style: italic; margin-bottom: 12px; }

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #334155;
    margin-top: 10px;
}

.age-badge { 
    display: inline-block;
    padding: 3px 6px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.age-21 { background-color: rgba(220, 38, 38, 0.2); color: #fca5a5; border: 1px solid #7f1d1d; }
.age-18 { background-color: rgba(22, 163, 74, 0.2); color: #86efac; border: 1px solid #14532d; }

.availability { 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    line-height: 1.3;
}
.availability span { color: var(--text-main); font-weight: 500; }

.card-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn {
    display: block; 
    padding: 10px; 
    background-color: var(--accent); 
    color: white;
    text-align: center; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: bold;
    transition: background 0.2s; 
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}
.btn:hover { background-color: var(--accent-hover); }

.btn-details {
    flex: 0 0 30%;
    background-color: #334155;
}
.btn-details:hover {
    background-color: #475569;
}

.btn-view {
    flex: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #334155;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: var(--text-main);
}

.modal-content h2 {
    color: var(--accent);
    margin-bottom: 20px;
    margin-top: 0;
}

.modal-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* =========================================
   6. STRATEGY PAGE Styles
   ========================================= */
.text-content { max-width: 800px; margin: 0 auto; }
.strategy-card {
    background-color: var(--card-bg); padding: 30px; border-radius: var(--border-radius);
    margin-bottom: 30px; border: 1px solid #334155;
}
.strategy-card h2 { color: var(--accent); margin-bottom: 15px; }
.strategy-card h3 { margin-top: 20px; margin-bottom: 10px; color: #e2e8f0; }
.strategy-card p { color: var(--text-muted); margin-bottom: 15px; }
.strategy-card ul { margin-left: 20px; color: var(--text-muted); }
.strategy-card li { margin-bottom: 10px; }

/* Sticky Table */
.table-container { overflow-x: auto; margin-top: 20px; border: 1px solid #334155; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 0.9rem; }
th, td { padding: 12px 15px; text-align: center; border-bottom: 1px solid #334155; white-space: nowrap; }
th { background-color: #0f172a; color: var(--accent); font-weight: 600; }
td { color: var(--text-main); }

/* Toggles */
.mode-toggle { display: flex; align-items: center; gap: 10px; }
.active-mode { color: var(--text-main); font-weight: bold; font-size: 0.9rem; }
.inactive-mode { color: #475569; font-size: 0.9rem; }
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #334155; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 20px; }
.slider.round:before { border-radius: 50%; }

/* =========================================
   7. CALCULATOR PAGE Styles
   ========================================= */
.calc-wrapper {
    background-color: var(--card-bg); padding: 30px; border-radius: var(--border-radius);
    border: 1px solid #334155; margin-bottom: 40px;
}
.calc-header {
    margin-bottom: 25px; border-bottom: 1px solid #334155; padding-bottom: 10px;
    color: var(--accent); font-size: 1.25rem; font-weight: 600;
}
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 900px) {
    .calc-grid { grid-template-columns: 1fr 1fr; align-items: start; }
    .calc-left { border-right: 1px solid #334155; padding-right: 30px; }
}
@media (max-width: 899px) {
    .calc-left { border-right: none; border-bottom: 1px solid #334155; padding-bottom: 30px; padding-right: 0; }
}

.calc-inputs { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; align-items: flex-end; }
.input-group { display: flex; flex-direction: column; flex: 1; min-width: 100px; }
.input-group label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }

.radio-group { display: flex; gap: 10px; margin-top: 5px; align-items: center; color: var(--text-muted); font-size: 0.9rem; }
.toggle-wrapper { display: flex; align-items: center; gap: 10px; margin-top: 10px; margin-bottom: 20px; font-size: 0.9rem; color: var(--text-muted); cursor: pointer; }
.toggle-checkbox { accent-color: var(--accent); width: 18px; height: 18px; }

/* Dynamic Leg Styles */
.leg-container {
    margin-bottom: 25px; border-bottom: 1px dashed #334155; padding-bottom: 20px;
}
.btn-add-leg {
    background-color: #334155; color: #94a3b8; border: 1px dashed #64748b;
    padding: 10px 15px; border-radius: 8px; cursor: pointer; font-size: 0.9rem;
    transition: all 0.2s; width: 100%;
}
.btn-add-leg:hover { color: #f1f5f9; border-color: var(--accent); background-color: #1e293b; }

/* Remove Leg 'X' Button */
.btn-remove-leg {
    position: absolute; right: 0; top: 0;
    background: transparent; border: none; color: #ef4444; 
    font-size: 1.5rem; line-height: 1; cursor: pointer;
    transition: color 0.2s; z-index: 10;
}
.btn-remove-leg:hover { color: #f87171; }

/* Results */
.calc-results { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 20px; }
.result-box { background-color: #0f172a; padding: 15px; border-radius: 8px; text-align: center; border: 1px solid #334155; }
.result-box h3 { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.big-number { font-size: 1.4rem; font-weight: bold; color: var(--text-main); }
.sub-text { font-size: 0.75rem; color: #ef4444; margin-top: 5px; }
.green-text { color: var(--pick-em-green) !important; }
.red-text { color: #ef4444 !important; }

.combined-results {
    grid-column: 1 / -1;
    text-align: left;
}

.sim-header { color: #e2e8f0; font-weight: bold; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.sim-badge { background: #334155; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; color: #94a3b8; }

/* Visual Bar */
.dist-container { position: relative; height: 40px; background-color: #0f172a; border: 1px solid #334155; border-radius: 6px; margin-top: 10px; width: 100%; overflow: hidden; }
.dist-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background-color: #475569; z-index: 1; }
.dist-bar { position: absolute; top: 12px; height: 16px; background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%); border-radius: 4px; opacity: 0.8; z-index: 2; transition: all 0.5s ease; min-width: 4px; }
.dist-marker { position: absolute; top: 8px; height: 24px; width: 4px; background-color: #fbbf24; z-index: 3; border-radius: 2px; box-shadow: 0 0 4px rgba(0,0,0,0.5); transition: all 0.5s ease; }
.dist-labels { display: grid; grid-template-columns: 1fr auto 1fr; font-size: 0.75rem; color: #94a3b8; font-family: monospace; margin-top: 5px; text-align: center; }
.dist-labels span:first-child { text-align: left; }
.dist-labels span:last-child { text-align: right; }

.input-wrapper { position: relative; width: 100%; }
.input-wrapper input { width: 100%; padding-right: 60px !important; }
.input-overlay { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.8rem; color: #64748b; font-weight: 600; pointer-events: none; user-select: none; }

footer { text-align: center; padding: 40px; color: var(--text-muted); font-size: 0.8rem; margin-top: 40px; border-top: 1px solid #334155; }