/* ============================================
   V2 Design System — "Tactical Luxury"
   Loaded AFTER styles.css to override free pages
   ============================================ */

/* === DESIGN TOKENS === */
:root {
    --bg-primary: #0A0A0F;
    --bg-elevated: #12121A;
    --bg-hover: #1A1A26;
    --border: #2A2A3A;
    --text-primary: #E8E6E3;
    --text-secondary: #9C9CAD;
    --accent: #00E676;
    --accent-dim: rgba(0, 230, 118, 0.15);
    --accent-hover: #00FFAA;
    --accent-warm: #FFD54F;
    --accent-danger: #FF5252;
    --gradient-start: #00E676;
    --gradient-end: #00BFA5;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* === BASE OVERRIDES === */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-primary);
}

/* === TABLE OVERRIDES (free pages only) === */
th, td {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-body);
}

th {
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

/* === TAB NAVIGATION === */
#tabNav a {
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-body);
    border-radius: 6px;
    transition: all 0.2s ease;
}

#tabNav a.active,
#tabNav a:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

/* === TOOLS BUTTON MENU === */
.tools-button-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    width: 100%;
    box-sizing: border-box;
}

.tool-button {
    padding: 8px 14px;
    background: var(--bg-elevated);
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.tool-button:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.tool-button.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.15);
}

/* === TOOLS GRID === */
.tools-grid-header {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 1.2em;
    margin-bottom: 15px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.tool-card {
    display: block;
    padding: 18px;
    background: var(--bg-elevated);
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.25s ease;
}

.tool-card:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.tool-card h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1em;
}

.tool-card p {
    margin: 0;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85em;
    line-height: 1.4;
}

.tool-card:hover h3 {
    color: var(--accent);
}

.tool-card:hover p {
    color: var(--text-primary);
}

/* === BOOKS GRID === */
.odds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 15px 0;
    width: 100%;
    box-sizing: border-box;
}

.book-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 10px;
    background: var(--bg-elevated);
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.25s ease;
}

.book-card:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.book-card.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.2);
}

.book-card-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    object-fit: contain;
    border-radius: 6px;
}

.book-card-title {
    font-family: var(--font-body);
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}

.book-card.active .book-card-title {
    color: var(--accent);
    font-weight: 600;
}

/* Mini variant */
.mini-odds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
    margin: 10px 0;
    width: 100%;
    box-sizing: border-box;
}

.mini-book-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: var(--bg-elevated);
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.25s ease;
}

.mini-book-card:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.mini-book-card.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.15);
}

.mini-book-card-logo {
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
    object-fit: contain;
    border-radius: 4px;
}

.mini-book-card-title {
    font-family: var(--font-body);
    font-size: 0.75em;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

.mini-book-card.active .mini-book-card-title {
    color: var(--accent);
    font-weight: 600;
}

/* === FORM ELEMENTS === */
select {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    padding: 8px 12px;
    transition: border-color 0.3s ease;
}

select:hover,
select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-dim);
}

select option {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="search"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="number"]:hover,
textarea:hover {
    border-color: var(--accent);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

input[type="checkbox"] {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 4px;
}

input[type="checkbox"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

label:has(input[type="checkbox"]) {
    color: var(--text-primary);
}

/* === BUTTONS === */
button,
.button,
a.button,
input[type="submit"] {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--bg-primary);
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

button:hover,
.button:hover,
a.button:hover,
input[type="submit"]:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.25);
}

/* === DROPDOWN MENUS (in-page, not header) === */
.dropdown-content {
    background-color: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
}

.dropdown-content a,
.custom-menu-item {
    color: var(--text-primary);
}

.dropdown-content a:hover,
.custom-menu-item:hover {
    background-color: var(--bg-hover);
    color: var(--accent);
}

.custom-menu-button {
    background-color: var(--accent);
    color: var(--bg-primary);
    border-radius: 6px;
}

.custom-menu-button:hover {
    box-shadow: 0 4px 12px rgba(0, 230, 118, 0.25);
}

.custom-dropdown-content {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* === HOVER INTERACTIONS === */
.hoverable-cell:hover,
.hoverable-player-names:hover,
.hoverable-text:hover {
    background-color: var(--accent) !important;
    color: var(--bg-primary) !important;
}

.hoverable-cell:hover a,
.hoverable-player-names:hover a,
.hoverable-text:hover a {
    color: var(--bg-primary) !important;
}

/* === HOVER POPUPS === */
.hover-popup,
.hover-popup-base {
    background: var(--accent);
    border: 3px solid var(--accent);
    border-radius: 12px !important;
}

.info-tooltip-base {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
}

/* === SORT INDICATORS === */
th.sorted {
    background-color: var(--accent);
    color: var(--bg-primary);
}

/* === FLASH ANIMATIONS (keep functional, update colors) === */
@keyframes flash-green {
    0%, 100% { background-color: transparent; }
    15%, 65% { background-color: var(--accent); color: var(--bg-primary); }
}

/* === SUB-MENUS === */
.sub-menu-button {
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.sub-menu-button:hover {
    background-color: var(--accent);
    color: var(--bg-primary);
}

.sub-menu {
    background-color: var(--bg-elevated);
}

.sub-menu a {
    color: var(--text-primary);
}

.sub-menu a:hover {
    background-color: var(--accent);
    color: var(--bg-primary);
}

/* === DISABLED ELEMENTS === */
input:disabled,
select:disabled,
textarea:disabled {
    background-color: var(--bg-elevated);
    color: var(--text-secondary);
    opacity: 0.5;
}

/* === FILTER ACTIVE STATE === */
select.filter-active {
    border: 2px solid var(--accent-warm) !important;
    background-color: rgba(255, 213, 79, 0.08) !important;
}

input.filter-active {
    border: 2px solid var(--accent-warm) !important;
    background-color: rgba(255, 213, 79, 0.08) !important;
}

/* === CONNECTION STATUS === */
.status-connected {
    background-color: var(--accent);
    color: var(--bg-primary);
    border-radius: 8px;
    font-family: var(--font-body);
}

.status-disconnected {
    background-color: var(--accent-danger);
    color: white;
    border-radius: 8px;
}

/* === INACTIVE LINKS === */
.inactive-link {
    color: var(--text-secondary) !important;
}

/* === V2 UTILITY CLASSES === */

/* Glassmorphism card */
.v2-glass {
    background: rgba(15, 20, 32, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
}

/* Container */
.v2-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 80px);
}

/* Section spacing */
.v2-section {
    padding: 60px 0;
}

/* Content sections (faq, tos, contact, privacy, etc.) */
.faq-section,
.contact-section,
.tos-section,
.privacy-section,
.responsible-gambling-section {
    color: var(--text-primary);
    font-family: var(--font-body);
}

.faq-section h2,
.contact-section h2,
.tos-section h2,
.privacy-section h2,
.responsible-gambling-section h2 {
    font-family: var(--font-display);
    color: var(--text-primary);
}

.faq-section h3,
.contact-section h3,
.tos-section h3,
.privacy-section h3,
.responsible-gambling-section h3 {
    font-family: var(--font-display);
    color: var(--accent);
}

.faq-section p,
.contact-section p,
.tos-section p,
.privacy-section p,
.responsible-gambling-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-section a,
.contact-section a,
.tos-section a,
.privacy-section a,
.responsible-gambling-section a {
    color: var(--accent);
}

/* === BETSLIP === */
#betslip-container {
    background-color: var(--bg-elevated);
    border-left: 1px solid var(--border);
    color: var(--text-primary);
}

.betslip-item {
    border-bottom: 1px solid var(--border);
}

/* === PAGE WRAPPER === */
#page-wrapper {
    background-color: var(--bg-primary);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .v2-section {
        padding: 40px 0;
    }
}
