/* =========================================================
   DESIGN SYSTEM – DARK MODE & GLASSMORPHISM
========================================================= */

:root {
    /* Backgrounds */
    --bg-body: #0f172a;
    /* Dark Slate */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Slate 800 with opacity */
    --bg-glass: rgba(30, 41, 59, 0.4);
    --bg-header: rgba(15, 23, 42, 0.85);
    --bg-footer: #020617;
    /* Slate 950 */

    /* Text Colors */
    --color-text-main: #f8fafc;
    /* Slate 50 */
    --color-text-muted: #94a3b8;
    /* Slate 400 */
    --color-heading: #ffffff;

    /* Accents (Neon) */
    --accent-primary: #e00034;
    /* Red for consistency with logo/history, but can be adjusted if user strictly wants green/blue only. Keeping red for Branding? User said: Green #22c55e and Blue #0ea5e9. I will use Green/Blue as primary/secondary as requested. */
    --accent-neon-green: #22c55e;
    --accent-neon-blue: #0ea5e9;

    /* Mapping semantic names to user requested neons */
    --primary-color: #22c55e;
    /* Green as primary CTA? or Blue? Let's use Green for Primary Actions (Success) and Blue for Links/Info */
    --secondary-color: #0ea5e9;

    /* Borders & Shadows */
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
    --shadow-neon: 0 0 10px rgba(34, 197, 94, 0.3);
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.36);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* =========================================================
   RESET & BASE
========================================================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(34, 197, 94, 0.08), transparent 25%);
    color: var(--color-text-main);
    line-height: 1.6;
    font-size: 16px;
}

ul,
ol {
    padding-left: 1.5rem;
    color: var(--color-text-muted);
}

li::marker {
    color: var(--accent-neon-green);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-neon-green);
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.container {
    width: 92%;
    max-width: 1160px;
    margin: 0 auto;
}

/* Typography */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-heading);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 3vw, 3rem);
}

h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
}

h3 {
    font-size: 1.35rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.text-gradient {
    background: linear-gradient(to right, var(--accent-neon-green), var(--accent-neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================================
   HEADER & NAVIGATION
========================================================= */

.site-header {
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.header-inner .logo {
    margin-right: 10px;
}

.header-inner .logo-text {
    background: linear-gradient(90deg, #fff, var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.5rem;
}

/* Desktop Nav */
.main-nav ul {
    /* Keep for legacy if using ul */
    display: flex;
    gap: 24px;
    list-style: none;
}

.main-nav {
    display: flex;
    align-items: center;
    /* If using a tags directly inside nav */
    gap: 5px;
}

.main-nav a {
    color: var(--color-text-muted);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 999px;
    /* Pills */
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(14, 165, 233, 0.15);
    color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
}

a.btn-melbet.active {
    background: var(--primary-color);
    color: #0f172a;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        border-bottom: var(--border-glass);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .main-nav a {
        display: block;
        width: 100%;
        text-align: center;
    }
}

/* =========================================================
   COMPONENTS: GLASS CARDS & TABLES
========================================================= */

/* Glass Morphism Base */
.glass-panel,
.card,
.faq-item,
.cookie-modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--border-glass);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-md);
}

.card {
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.3);
}

.card h3 {
    color: var(--accent-neon-green);
    margin-bottom: 0.5rem;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    background: var(--bg-glass);
    border: var(--border-glass);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Ensure check on mobile */
}

.ranking-table thead {
    background: rgba(0, 0, 0, 0.3);
}

.ranking-table th {
    text-align: left;
    padding: 18px 20px;
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.ranking-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
    vertical-align: middle;
}

.ranking-table tr:last-child td {
    border-bottom: none;
}

.ranking-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badge in table */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--accent-neon-green);
    color: #000;
    margin-top: 4px;
}

/* =========================================================
   BUTTONS
========================================================= */

/* Button Padding Update */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.btn.primary,
.btn-table,
.btn primary {
    background: var(--primary-color);
    color: #0f172a;
    /* Dark text on neon green */
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.btn.primary:hover,
.btn-table:hover {
    background: #16a34a;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.6);
    transform: translateY(-2px);
}

.btn.secondary,
.btn.secondary {
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.1);
}

.btn.secondary:hover {
    background: var(--secondary-color);
    color: #fff;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

/* =========================================================
   HERO
========================================================= */

.page-hero {
    padding: 80px 0;
}

.hero {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

/* Glow effect behind hero image */
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: var(--accent-neon-blue);
    filter: blur(120px);
    opacity: 0.2;
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    margin: 24px 0 30px;
    flex-wrap: wrap;
}

.hero-bullets {
    list-style: none;
    padding: 0;
}

.hero-bullets li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 10px;
    color: var(--color-text-muted);
}

.hero-bullets li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-neon-green);
    text-shadow: 0 0 5px var(--accent-neon-green);
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* =========================================================
   SECTIONS & GRIDS
========================================================= */

.section {
    padding: 80px 0;
}

.section-alt {
    background: rgba(0, 0, 0, 0.2);
}

.grid-2,
.columns-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.image-card {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-card img {
    max-height: 400px;
    width: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cards-grid,
.columns-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

/* Steps Visual Grid */
.steps-visual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.step-card {
    background: var(--bg-card);
    border: var(--border-glass);
    padding: 30px;
    border-radius: var(--radius-md);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.1);
    border-color: var(--secondary-color);
}

.step-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
}

.step-icon {
    width: 60px;
    height: 60px;
    fill: var(--secondary-color);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.4));
    display: block;
}

.step-card h3 {
    color: var(--accent-neon-green);
    margin-bottom: 12px;
}

/* Legacy Steps (Text only) */
.steps {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.steps li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 24px;
}

.steps li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    text-align: center;
    line-height: 34px;
    font-weight: 700;
}

.steps strong {
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

/* =========================================================
   FAQ
========================================================= */

.faq-item {
    margin-bottom: 12px;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-icon {
    color: var(--accent-neon-green);
    font-size: 1.5rem;
    line-height: 1;
}

.faq-answer {
    padding: 0 20px 20px;
    display: none;
    color: var(--color-text-muted);
}

.faq-answer.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    background: var(--bg-footer);
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.3);
}

.link-button {
    background: none;
    border: none;
    color: var(--color-text-muted);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
}

/* Forms & Inputs */
input,
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-neon-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 16px;
    color: var(--color-heading);
    font-weight: 500;
    gap: 8px;
}

.cookie-toggle span {
    width: 90%;
}

/* label input { width: auto; } Removed to allow full width inputs in forms */

/* =========================================================
   COOKIES
========================================================= */

.cookie-banner {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--secondary-color);
    padding: 16px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.cookie-banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1160px;
    margin: 0 auto;
    width: 92%;
}

.cookie-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-buttons button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

#acceptCookies {
    background: var(--primary-color);
    color: #000;
}

#cookieSettingsBtn {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
}

/* Modal */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.cookie-modal-content {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(34, 197, 94, 0.1);
    color: #fff;
    max-width: 500px;
    width: 90%;
    margin: 20px;
    padding: 32px;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-modal-content h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.5rem;
    background: linear-gradient(90deg, #fff, var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cookie-modal-content p {
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Custom Toggles */
/* Custom Toggles */
.cookie-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 16px;
    cursor: pointer;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: background 0.3s;
}

.cookie-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.cookie-toggle span {
    font-weight: 500;
    color: #e2e8f0;
}

.cookie-toggle input {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 22px;
    background: #334155;
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    outline: none;
    border: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: background 0.3s;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.cookie-toggle input::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.cookie-toggle input:checked {
    background: var(--primary-color);
}

.cookie-toggle input:checked::after {
    transform: translateX(18px);
}

.cookie-toggle input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    justify-content: flex-end;
}

.cookie-modal-actions button {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

#cookieSavePreferences,
#saveCookieSettings {
    background: linear-gradient(135deg, var(--primary-color) 0%, #16a34a 100%);
    color: #0f172a;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

#cookieSavePreferences:hover,
#saveCookieSettings:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.5);
}

#cookieModalClose,
#closeCookieModal {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    float: right;
    padding: 0 4px;
}

#cookieModalClose:hover,
#closeCookieModal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* X Close Button override if specific class structure */
button.cookie-modal-close-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    padding: 4px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

button.cookie-modal-close-icon:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {

    .hero-grid,
    .grid-2,
    .columns-2,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
    }

    h1 {
        font-size: 2.2rem;
    }
}