@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&family=Syncopate:wght@400;700&display=swap');

:root {
    --neon-green: #00FF88;
    --neon-pink: #FF0080;
    --neon-blue: #00D1FF;
    --neon-gold: #FFD700;
    --bg-black: #020202;
    --glass: rgba(10, 10, 10, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.lang-selector {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.2rem;
    margin-right: 1.5rem;
    transition: 0.3s;
}

.lang-btn {
    background: none;
    border: none;
    color: #555;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 6px;
}

.lang-btn:hover {
    color: #fff;
}

.lang-btn.active {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 209, 255, 0.3);
}

.lang-divider {
    width: 1px;
    height: 15px;
    background: var(--glass-border);
    margin: 0 0.2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: crosshair;
}

body {
    background-color: var(--bg-black);
    color: #f0f0f0;
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    transform: rotate(15deg);
    animation: gridMove 60s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translateY(0) rotate(15deg);
    }

    100% {
        transform: translateY(-300px) rotate(15deg);
    }
}

header {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    header {
        padding: 1rem 5%;
        justify-content: center;
    }

    .logo {
        font-size: 1.4rem;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#referral-link-input::selection {
    background: var(--neon-blue);
    color: #000;
}

.logo {
    font-family: 'Syncopate', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -2px;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-blue));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.5));
}

.logo span {
    font-family: 'Outfit', sans-serif;
    text-transform: lowercase;
    font-size: 1.4rem;
    margin: 0 5px;
}

.main-hero-area {
    width: 100%;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

#live-activity-strip .activity-items {
    display: none;
}

.hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem 10% 2rem 10%;
    background: transparent !important;
    /* Unified wrapper handles background */
}

.hero h1 {
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    text-transform: uppercase;
    margin-bottom: 1rem;
    line-height: 1;
}

.hero p {
    font-size: 1.2rem;
    color: #888;
    max-width: 800px;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.glow-btn {
    padding: 1.5rem 4rem;
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--neon-green);
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
    text-decoration: none;
    display: inline-block;
}

.glow-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background: #fff;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.8);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1rem 5%;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 900px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    transition: 0.5s;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
    }
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.1);
    transform: translateY(-10px);
}

.glass-card h3 {
    font-family: 'Syncopate', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--neon-green);
}

.calc-wrapper {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 3rem 4rem;
    border-radius: 40px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    max-width: 850px;
    margin: 0 auto 8rem auto;
}

@media (max-width: 768px) {
    .calc-wrapper {
        padding: 2rem 1.5rem;
        border-radius: 25px;
        margin-bottom: 4rem;
    }
}

.result-display {
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}


.profit-text {
    font-size: 1.2rem;
    letter-spacing: 4px;
    color: #888;
    text-transform: uppercase;
    font-family: 'Syncopate', sans-serif;
}

.profit-value {
    font-size: 5rem;
    font-weight: 700;
    font-family: 'Syncopate', sans-serif;
    color: #fff;
    margin: 1rem 0;
    display: block;
}

@media (max-width: 768px) {
    .profit-value {
        font-size: 2.5rem;
    }

    .profit-text {
        font-size: 0.9rem;
    }
}

.profit-subtext {
    font-size: 0.9rem;
    color: #555;
    letter-spacing: 2px;
}

.custom-select {
    flex: 1;
    min-width: 300px;
    position: relative;
    background: #080808;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: 0.3s;
    z-index: 1;
    /* Базовый слой */
}

.custom-select.active {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    z-index: 100;
    /* Поднимаем активный список над всем остальным */
}

.search-input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    padding: 1.5rem !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    border-radius: 12px !important;
    outline: none !important;
    cursor: pointer;
}

.options-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: #0a0a0a;
    border: 1px solid var(--neon-green);
    z-index: 10000 !important;
    display: none;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 1);
}

.option-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.option-item:hover {
    background: rgba(0, 255, 136, 0.1);
    color: var(--neon-green);
}

.option-item.selected {
    background: var(--neon-green);
    color: #000;
}

.custom-select:focus-within {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.custom-select:focus-within .options-list {
    display: block;
}

.table-container {
    overflow-x: auto;
    margin-top: 3rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

th {
    padding: 1.5rem;
    text-align: left;
    color: #555;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

td {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

td:first-child {
    border-left: 1px solid var(--glass-border);
    border-radius: 15px 0 0 15px;
}

td:last-child {
    border-right: 1px solid var(--glass-border);
    border-radius: 0 15px 15px 0;
}

.status-glow {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    margin-right: 10px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--neon-green), var(--neon-blue));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pink-glow {
    color: var(--neon-pink);
    text-shadow: 0 0 15px rgba(255, 0, 128, 0.5);
}

@media (max-width: 768px) {
    .container {
        padding: 3rem 5%;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .calc-wrapper {
        padding: 2rem;
    }

    .result-display .amount {
        font-size: 3rem;
    }
}

/* SECURITY & FAQ PREMIUM STYLES */
.glass-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.15);
}

/* Disable hover transform for modal cards to prevent blur glitches */
.modal-content.glass-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.toast {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--neon-green);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: toast-in 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.toast.error {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.faq-item {
    cursor: pointer;
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 0;
}

.faq-item h4 {
    color: var(--neon-blue);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item h4::after {
    content: '+';
    font-size: 1.2rem;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    color: #888;
    font-size: 0.9rem;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-item.active h4::after {
    content: '-';
}

/* Contest Banner & Timer */
#contest-banner .glass-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#contest-banner:hover .glass-card {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(255, 183, 0, 0.2);
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 12px;
    min-width: 80px;
    border: 1px solid rgba(0, 243, 255, 0.1);
}

.timer-unit span {
    font-family: 'Syncopate', sans-serif;
    font-size: 2rem;
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    font-weight: bold;
}

.timer-unit small {
    font-size: 0.6rem;
    color: #666;
    margin-top: 0.5rem;
    letter-spacing: 2px;
}

#contest-mini-leaderboard .contest-row,
#contest-modal-leaderboard .contest-row {
    display: grid;
    grid-template-columns: 30px 1fr 80px;
    gap: 10px;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
    align-items: center;
    text-align: left;
}

#contest-mini-leaderboard .contest-row:last-child,
#contest-modal-leaderboard .contest-row:last-child {
    border-bottom: none;
}

.contest-row .rank {
    font-weight: bold;
    color: var(--neon-gold);
}

.contest-row .user {
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contest-row .score {
    color: var(--neon-green);
    text-align: right;
    font-weight: bold;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    padding: 60px 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-blue) transparent;
}

body.modal-open {
    overflow: hidden;
    padding-right: 0px;
    /* Optional: adjust for scrollbar shift if needed */
}

.modal-content {
    background: var(--bg-black);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #fff;
}

/* === RESPONSIVE DESIGN === */

@media (max-width: 1024px) {
    .container {
        padding: 1rem 3%;
    }

    .hero h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem 3% !important;
        gap: 1rem;
        height: auto;
        text-align: center;
    }

    .logo {
        font-size: 1.3rem;
    }

    .lang-selector {
        margin-right: 0;
    }

    #auth-nav,
    #user-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem !important;
    }

    .glow-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }

    .hero {
        padding: 4rem 5%;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .calc-wrapper {
        padding: 1.5rem;
        border-radius: 20px;
        margin-top: 1rem;
    }

    .calc-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profit-value {
        font-size: 3rem !important;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .container {
        padding: 2rem 5%;
    }

    table th {
        font-size: 0.65rem;
        padding: 0.8rem 0.5rem;
    }

    table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.8rem;
    }

    #live-price-wrapper {
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .profit-value {
        font-size: 2.2rem !important;
    }

    #auth-nav .glow-btn,
    #user-nav .glow-btn {
        width: 100%;
        text-align: center;
    }

    .calc-wrapper {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.2rem;
        width: 95%;
    }
}