* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #071019;
    --bg-card: rgba(9, 20, 31, 0.78);
    --bg-card-strong: rgba(9, 21, 33, 0.9);
    --text-main: #f4f8fb;
    --text-muted: #8fa0af;
    --accent-blue: #19d8ff;
    --accent-blue-soft: #4aa7ff;
    --accent-purple: #7c5cff;
    --accent-green: #23e6a8;
    --accent-warning: #ffc857;
    --border: rgba(124, 170, 198, 0.16);
    --border-bright: rgba(25, 216, 255, 0.3);
    --glass-bg: rgba(9, 20, 31, 0.72);
    --glass-bg-strong: rgba(8, 18, 29, 0.86);
    --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.35);
    --shadow-cyan: 0 0 34px rgba(25, 216, 255, 0.2);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-primary);
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center 34%;
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
}

/* Cinematic overlay: keeps the football photo visible while making the neon UI belong to it. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        radial-gradient(circle at 23% 23%, rgba(25, 216, 255, 0.09), transparent 27%),
        radial-gradient(circle at 76% 20%, rgba(124, 92, 255, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(4, 10, 17, 0.63) 0%, rgba(4, 11, 18, 0.77) 48%, rgba(3, 9, 15, 0.93) 100%);
}

/* Subtle tactical grid — visible only enough to connect the photo and data layer. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(43, 133, 173, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 133, 173, 0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 86%);
}

#particles-js {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.78;
    pointer-events: auto;
}

h1, h2, h3, h4 { font-family: 'Orbitron', sans-serif; }

.container {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hidden { display: none !important; }

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(4, 12, 20, 0.8);
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
    border-bottom: 1px solid rgba(25, 216, 255, 0.1);
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
    padding: 11px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    flex: 0 0 auto;
}

.logo svg {
    filter: drop-shadow(0 0 8px rgba(25,216,255,0.45));
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.2px;
}

.logo-accent {
    color: var(--accent-blue);
    text-shadow: 0 0 18px rgba(25,216,255,0.45);
}

.nav {
    display: flex;
    gap: 3px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav a {
    position: relative;
    color: #8392a0;
    text-decoration: none;
    font-size: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.65px;
    transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
    cursor: pointer;
}

.nav a:hover {
    color: #dff9ff;
    background: rgba(25,216,255,0.055);
}

.nav a[data-tab]::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 3px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    transform: scaleX(0);
    opacity: 0;
    transition: all 0.22s ease;
}

.nav a[data-tab].active {
    color: var(--accent-blue);
    background: rgba(25,216,255,0.06);
}

.nav a[data-tab].active::after {
    transform: scaleX(1);
    opacity: 1;
}

.btn-login, .btn-signup, .btn-cabinet {
    padding: 9px 16px !important;
    border-radius: 9px !important;
    font-weight: 700;
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: 1px !important;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.22s ease !important;
}

.btn-login {
    color: var(--accent-blue) !important;
    background: rgba(5, 20, 29, 0.42) !important;
    border: 1px solid rgba(25,216,255,0.7) !important;
}

.btn-login:hover {
    background: rgba(25,216,255,0.09) !important;
    box-shadow: 0 0 18px rgba(25,216,255,0.18);
}

.btn-signup {
    color: #041119 !important;
    background: linear-gradient(135deg, #2ce1ff 0%, #18c6f2 100%) !important;
    border: 1px solid #5ceaff !important;
    box-shadow: 0 0 20px rgba(25,216,255,0.26);
}

.btn-signup:hover {
    box-shadow: 0 0 28px rgba(25,216,255,0.42);
    transform: translateY(-1px);
}

.btn-cabinet {
    color: var(--accent-green) !important;
    background: rgba(35,230,168,0.05) !important;
    border: 1px solid rgba(35,230,168,0.55) !important;
}

.main-content {
    flex: 1;
    padding: 46px 0 52px;
}

.tab-content { display: none; }

.tab-content.active {
    display: block;
    animation: fadeIn 0.38s ease;
}

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

.home-container {
    display: flex;
    flex-direction: column;
    gap: 34px;
    align-items: center;
    text-align: center;
    padding: 28px 0 48px;
}

.hero {
    width: min(760px, 100%);
    padding: 34px 32px 28px;
    border: 1px solid rgba(143, 187, 208, 0.09);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(7, 18, 28, 0.42), rgba(7, 17, 28, 0.22));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 25px 80px rgba(0,0,0,0.2);
}

.hero-title {
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.04;
    font-weight: 800;
    color: #f8fbfd;
    letter-spacing: -0.8px;
    text-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.hero-accent {
    color: var(--accent-blue);
    text-shadow: 0 0 26px rgba(25,216,255,0.42);
}

.hero-slogan {
    margin-top: 8px;
    font-size: 15px;
    color: #9b83ff;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.6px;
}

.hero-sub {
    margin-top: 5px;
    color: #9aa8b5;
    font-size: 14px;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 20px auto 0;
}

.search-box input {
    width: 100%;
    padding: 15px 18px;
    background: rgba(6, 16, 27, 0.86);
    border: 1px solid rgba(116, 154, 180, 0.22);
    border-radius: 11px;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
    transition: all 0.22s ease;
}

.search-box input::placeholder { color: #667786; }

.search-box input:focus {
    outline: none;
    border-color: rgba(25,216,255,0.62);
    box-shadow: 0 0 0 3px rgba(25,216,255,0.07), 0 0 26px rgba(25,216,255,0.11);
}

.suggestions {
    position: absolute;
    top: calc(100% - 51px);
    left: 0;
    width: 100%;
    background: rgba(7,17,27,0.97);
    border: 1px solid var(--border-bright);
    border-radius: 10px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: var(--shadow-soft);
}

.suggestions.active { display: block; }

.suggestion-item {
    padding: 11px 15px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.suggestion-item:hover { background: rgba(25,216,255,0.07); }

.btn-analyze {
    margin-top: 11px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(110deg, #21d8f7 0%, #4c9cff 50%, #775df0 100%);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 11px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 1.7px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 12px 35px rgba(16,133,184,0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.btn-analyze:hover {
    box-shadow: 0 15px 40px rgba(28,178,231,0.26), 0 0 28px rgba(124,92,255,0.13);
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 14px;
    width: min(740px, 100%);
}

.stat-item {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10, 24, 37, 0.78), rgba(8, 18, 29, 0.73));
    border: 1px solid rgba(126, 170, 195, 0.14);
    border-radius: 13px;
    padding: 18px 14px 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 45px rgba(0,0,0,0.18);
}

.stat-item::before {
    content: '';
    position: absolute;
    left: 22%;
    right: 22%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(25,216,255,0.72), transparent);
}

.stat-number {
    font-size: 29px;
    font-weight: 800;
    color: var(--accent-blue);
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 18px rgba(25,216,255,0.24);
}

.stat-label {
    margin-top: 4px;
    font-size: 10px;
    color: #778898;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.7px;
}

.section-title {
    text-align: center;
    font-size: 30px;
    color: #eafaff;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(25,216,255,0.12);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 22px;
    font-size: 14px;
}

.how-to-box {
    background: rgba(12, 29, 43, 0.72);
    border: 1px solid rgba(25,216,255,0.15);
    border-radius: 12px;
    padding: 16px;
    margin: 0 auto 22px;
    max-width: 650px;
    font-size: 13px;
    color: var(--text-muted);
    box-shadow: 0 14px 35px rgba(0,0,0,0.16);
}

#analysisResult { margin-top: 28px; }

.analysis-card {
    background: var(--glass-bg-strong);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.analysis-teams {
    font-size: 23px;
    font-weight: 700;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 20px;
}

.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 13px;
}

.prediction-item {
    background: rgba(4,12,19,0.5);
    border: 1px solid rgba(129,169,192,0.12);
    border-radius: 11px;
    padding: 15px;
}

.prediction-label {
    font-size: 10px;
    color: #748494;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.6px;
}

.prediction-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-green);
    margin: 5px 0;
}

.prediction-prob {
    font-size: 20px;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
}

.prob-high { color: var(--accent-green); }
.prob-medium { color: var(--accent-warning); }
.prob-low { color: #ff9966; }

.verdict-box {
    background: rgba(7, 14, 24, 0.72);
    border: 1px solid rgba(124,92,255,0.18);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.verdict-title {
    font-size: 15px;
    color: #a895ff;
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
}

.verdict-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.trainer-card {
    max-width: 520px;
    margin: 0 auto;
    background: var(--glass-bg-strong);
    border: 1px solid rgba(124,92,255,0.24);
    border-radius: 18px;
    padding: 36px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.trainer-price {
    font-size: 44px;
    font-weight: 800;
    color: #9d88ff;
    font-family: 'Orbitron', sans-serif;
}

.trainer-price span { font-size: 16px; color: var(--text-muted); }

.trainer-features { list-style: none; margin: 24px 0; text-align: left; }

.trainer-features li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.045);
    color: var(--text-muted);
    font-size: 14px;
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: linear-gradient(110deg, #7c5cff, #31bde9);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 11px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.22s ease;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(54,164,224,0.17); }

#leaderboard, #reviewsList { max-width: 820px; margin: 0 auto; }

.result-row {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 15px 18px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(12px);
}

.star-rating { font-size: 28px; cursor: pointer; opacity: 0.42; transition: 0.15s ease; }
.star-rating.active { opacity: 1; }

.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 19px;
    backdrop-filter: blur(12px);
}

.faq-item h3 { font-size: 14px; color: var(--accent-blue); margin-bottom: 8px; }
.faq-item p { color: var(--text-muted); font-size: 13px; line-height: 1.65; }

.contact-container { text-align: center; max-width: 520px; margin: 0 auto; }
.contact-container a { color: var(--accent-blue); text-decoration: none; font-size: 17px; }

.footer {
    position: relative;
    z-index: 2;
    background: rgba(4, 12, 20, 0.88);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(25,216,255,0.08);
    padding: 18px 0;
    text-align: center;
    font-size: 11px;
    color: #6f7d8b;
}

.footer a { color: #778694; text-decoration: none; margin: 0 5px; cursor: pointer; }
.footer a:hover { color: var(--accent-blue); }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(1,6,11,0.78);
    backdrop-filter: blur(7px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    background: rgba(7,18,29,0.96);
    border: 1px solid rgba(25,216,255,0.16);
    border-radius: 16px;
    padding: 28px;
    max-width: 600px;
    width: 100%;
    max-height: 82vh;
    overflow-y: auto;
    box-shadow: 0 30px 90px rgba(0,0,0,0.5);
}

.modal h2 {
    font-size: 20px;
    color: var(--accent-blue);
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
}

.modal input, .modal textarea, .modal select {
    width: 100%;
    padding: 12px;
    background: rgba(3,10,17,0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    margin-bottom: 15px;
    font-size: 14px;
}

.modal button {
    width: 100%;
    padding: 12px;
    background: var(--accent-blue);
    color: #041119;
    border: none;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.btn-close-modal {
    background: transparent !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border) !important;
}

@media (max-width: 980px) {
    .header-inner { align-items: flex-start; flex-direction: column; }
    .nav { width: 100%; justify-content: flex-start; }
    .hero { padding: 30px 24px 25px; }
}

@media (max-width: 768px) {
    body { background-attachment: scroll; background-position: center top; }
    body::after { background-size: 48px 48px; }
    .container { width: min(100% - 24px, 1220px); }
    .main-content { padding-top: 28px; }
    .home-container { padding-top: 12px; gap: 24px; }
    .hero { padding: 26px 16px 21px; border-radius: 16px; }
    .hero-title { font-size: 34px; }
    .hero-slogan { font-size: 13px; }
    .hero-sub { font-size: 13px; line-height: 1.5; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-item { padding: 16px 10px; }
    .stat-number { font-size: 25px; }
    .nav { gap: 2px; }
    .nav a { font-size: 9px; padding: 7px 7px; }
    .prediction-grid { grid-template-columns: 1fr; }
    #particles-js { opacity: 0.55; }
}

@media (max-width: 460px) {
    .logo-text { font-size: 15px; }
    .logo svg { width: 30px; height: 30px; }
    .hero-title { font-size: 29px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .btn-login, .btn-signup, .btn-cabinet { padding: 8px 11px !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
