:root {
    --matrix-green: #00ff41;
    --matrix-dark-green: #003b00;
    --matrix-light: #a3ffb8;
    --bg-color: #020502;
    --glow: 0 0 12px rgba(0, 255, 65, 0.6), 0 0 25px rgba(0, 255, 65, 0.2);
    --panel-border: 1px solid rgba(0, 255, 65, 0.3);
}

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

body {
    background-color: var(--bg-color);
    /* Добавляем радиальный градиент для глубины и сетку для кибер-стиля */
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(0, 80, 0, 0.15) 0%, transparent 60%),
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 30px 30px, 30px 30px;
    background-attachment: fixed;
    color: var(--matrix-green);
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    text-shadow: 0 0 2px rgba(0, 255, 65, 0.4);
}

/* Header */
.header {
    margin-bottom: 40px;
    font-weight: bold;
}

.header-desktop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 15px;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--matrix-green), transparent) 1;
}

.header-mobile {
    display: none;
}

.header-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    gap: 30px;
}

.header-actions a {
    color: var(--matrix-light);
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

.header-actions a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--matrix-green);
    transition: width 0.3s ease;
    box-shadow: var(--glow);
}

.header-actions a:hover::after {
    width: 100%;
}

.header-actions a:hover {
    text-shadow: var(--glow);
    color: #fff;
}

/* Panels */
.panels-container {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
    align-items: stretch;
}

.panel {
    flex: 1;
    border: var(--panel-border);
    /* Линейный градиент для фона панелей */
    background: linear-gradient(145deg, rgba(0, 30, 0, 0.6) 0%, rgba(0, 5, 0, 0.8) 100%);
    padding: 25px;
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.05), 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--matrix-green); /* Акцентная верхняя линия */
    border-radius: 4px; /* Легкое скругление */
    position: relative;
    overflow: hidden;
}

/* Блик на панелях */
.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.05), transparent);
    transform: skewX(-20deg);
    animation: shine 8s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.panel h2 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    font-weight: bold;
    /* Градиентный текст для заголовков */
    background: linear-gradient(90deg, #fff, var(--matrix-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.panel-content p {
    margin-bottom: 15px;
    color: var(--matrix-light);
}

/* Center Panel (Timer) */
.center-panel {
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative; /* Для абсолютного позиционирования инфо о ставке */
    min-height: 350px; /* Задаем минимальную высоту, чтобы элементы не выпадали */
}

.hash-container {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    color: var(--matrix-green);
    opacity: 0.8;
    text-align: left;
    margin: 0 auto 20px auto;
    width: 98%; /* Делаем блок еще шире, чтобы хэш точно помещался */
    line-height: 1.6;
    height: 95px; /* УВЕЛИЧИЛ ВЫСОТУ БЛОКА, ЧТОБЫ 4 СТРОКИ ПОМЕЩАЛИСЬ С ЗАПАСОМ */
    overflow: hidden;
    background: rgba(0, 20, 0, 0.6);
    padding: 10px 15px;
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 4px;
    box-shadow: inset 0 0 15px rgba(0, 255, 65, 0.1);
}

.hash-container div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bet-info {
    position: absolute;
    bottom: 15px;
    left: 20px;
    text-align: left;
    font-size: 0.85rem;
    color: var(--matrix-light);
    line-height: 1.5;
    opacity: 0.9;
    background: rgba(0, 5, 0, 0.8);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(0, 255, 65, 0.2);
    z-index: 10;
}

.attempt-timer {
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--matrix-green);
    text-shadow: none;
    font-family: 'Courier New', Courier, monospace;
    background: none;
    padding: 0;
    border-radius: 0;
    border: none;
    z-index: 10;
    text-align: right;
}

.participants-count {
    position: absolute;
    bottom: 4px;
    left: 4px;
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--matrix-green);
    font-family: 'Courier New', Courier, monospace;
    z-index: 10;
    text-align: left;
}

.timer-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Поднимаем содержимое наверх */
    padding-top: 20px; /* Добавляем отступ от верхнего края */
    align-items: center;
    flex-grow: 1;
}

.timer-section p {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

#timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: var(--glow);
}

.progress-bar-container {
    width: 85%;
    margin: 0 auto;
    height: 35px;
    border: 1px solid rgba(0, 255, 65, 0.5);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 10, 0, 0.8);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,1);
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    /* Красивый градиент для прогресс-бара */
    background: linear-gradient(90deg, var(--matrix-dark-green) 0%, var(--matrix-green) 100%);
    box-shadow: 0 0 15px var(--matrix-green);
    z-index: 1;
    transition: width 1s linear;
}

/* Анимация полосок на прогресс-баре */
.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        -45deg, 
        rgba(255, 255, 255, 0.15) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.15) 75%, 
        transparent 75%, 
        transparent
    );
    background-size: 30px 30px;
    animation: moveStripes 2s linear infinite;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 30px 30px; }
}

.progress-text {
    position: relative;
    z-index: 2;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

/* Log Panel */
.log-content {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: 300px;
    padding-right: 10px;
}

/* Стилизация скроллбара */
.log-content::-webkit-scrollbar {
    width: 6px;
}
.log-content::-webkit-scrollbar-track {
    background: rgba(0, 20, 0, 0.5);
    border-radius: 3px;
}
.log-content::-webkit-scrollbar-thumb {
    background: var(--matrix-green);
    border-radius: 3px;
}

.log-entry {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(0, 255, 65, 0.2);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry .time {
    white-space: nowrap;
    color: #fff;
    opacity: 0.9;
    text-shadow: var(--glow);
}

/* Controls */
.modal-overlay {
    display: none;
}
.modal-header {
    display: none;
}
.btn-settings-mobile {
    display: none;
}
.bet-summary {
    display: flex;
    align-items: center;
    gap: 20px;
}

.controls-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
    background: linear-gradient(90deg, rgba(0, 30, 0, 0.4) 0%, transparent 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--matrix-green);
}

.bet-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quick-bet-label {
    font-size: 0.8rem;
    color: var(--matrix-light);
    opacity: 0.85;
    padding-left: 2px;
}

.quick-bet-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 0;
}

.btn-quick {
    background: rgba(0, 20, 0, 0.8);
    color: var(--matrix-green);
    border: 1px solid rgba(0, 255, 65, 0.5);
    padding: 8px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.25s;
    box-shadow: inset 0 0 8px rgba(0, 255, 65, 0.1);
    min-width: 70px;
}

.btn-quick:hover {
    background: rgba(0, 255, 65, 0.15);
    color: #fff;
    box-shadow: var(--glow);
    border-color: var(--matrix-green);
    transform: translateY(-1px);
}

.btn-quick:active {
    transform: translateY(0);
}

.btn-quick-step.active {
    background: rgba(0, 255, 65, 0.2);
    color: #fff;
    border-color: var(--matrix-green);
    box-shadow: var(--glow);
}

.btn-quick-min,
.btn-quick-max {
    background: linear-gradient(45deg, rgba(0, 40, 0, 0.9) 0%, rgba(0, 80, 0, 0.7) 100%);
    color: #fff;
    border-color: var(--matrix-green);
    letter-spacing: 1px;
}

.btn-quick-min:hover,
.btn-quick-max:hover {
    background: linear-gradient(45deg, rgba(0, 80, 0, 0.9) 0%, var(--matrix-green) 100%);
    color: #000;
}

.btn-quick:disabled,
.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.control-group label {
    font-size: 0.9rem;
    text-align: left;
    color: var(--matrix-light);
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 255, 65, 0.4);
    padding: 5px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.1);
}

.btn-icon {
    background: transparent;
    color: var(--matrix-green);
    border: none;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    transition: all 0.2s;
    border-radius: 3px;
}

.btn-icon:hover {
    background: rgba(0, 255, 65, 0.2);
    color: #fff;
    box-shadow: var(--glow);
}

.input-wrapper input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    width: 80px;
    text-align: center;
    outline: none;
    font-weight: bold;
    text-shadow: var(--glow);
}

.total-price {
    display: flex;
    align-items: center;
    gap: 20px;
}

.total-price span:first-child {
    font-size: 0.9rem;
    text-align: right;
    color: var(--matrix-light);
}

.price-value {
    font-size: 1.3rem;
    color: #fff;
    text-shadow: var(--glow);
}

.btn-submit {
    /* Градиентная кнопка */
    background: linear-gradient(45deg, rgba(0, 40, 0, 0.8) 0%, rgba(0, 100, 0, 0.8) 100%);
    color: #fff;
    border: 1px solid var(--matrix-green);
    padding: 15px 50px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    position: relative;
    overflow: hidden;
}

/* Эффект свечения при наведении */
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.4s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: linear-gradient(45deg, rgba(0, 80, 0, 0.9) 0%, var(--matrix-green) 100%);
    color: #000;
    box-shadow: var(--glow);
    text-shadow: none;
}

/* Stages (5 квадратов) */
.stages-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    height: 35px;
    margin-bottom: 25px; /* Добавляем отступ снизу */
    position: relative;
}

.stage-square {
    width: 35px;
    height: 35px;
    border: 1px solid var(--matrix-green);
    background: rgba(0, 20, 0, 0.8);
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.2);
    border-radius: 4px;
    position: relative;
    animation: pulseSquare 2s infinite alternate;
}

@keyframes pulseSquare {
    0% { box-shadow: inset 0 0 5px rgba(0, 255, 65, 0.1); }
    100% { box-shadow: inset 0 0 15px rgba(0, 255, 65, 0.5), 0 0 10px rgba(0, 255, 65, 0.3); }
}

.stage-square.active {
    background: var(--matrix-green);
    box-shadow: 0 0 20px var(--matrix-green);
    animation: none;
}

.stage-square.missed {
    background: rgba(0, 20, 0, 0.8); /* Темный фон, как у пустых квадратов */
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.2);
    border-color: #ffd700; /* Желтая окантовка */
    animation: none;
}

.stage-square.success {
    background: #fff;
    box-shadow: 0 0 25px #fff;
    border-color: #fff;
    animation: none;
}

.stage-square.fail {
    background: #8b0000;
    box-shadow: 0 0 15px red;
    border-color: red;
    animation: none;
}

/* Disabled states */
.btn-submit:disabled {
    background: rgba(0, 40, 0, 0.4);
    color: var(--matrix-green);
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.btn-submit:disabled::before {
    display: none;
}

.btn-icon:disabled:hover,
.btn-quick:disabled:hover {
    background: rgba(0, 20, 0, 0.8);
    color: var(--matrix-green);
    box-shadow: none;
    transform: none;
}

/* Background Decorations */
.decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.decor {
    position: absolute;
    color: var(--matrix-green);
    opacity: 0.04; /* Очень низкая непрозрачность, чтобы не мешать тексту */
    filter: drop-shadow(0 0 8px var(--matrix-green));
}

.cooler {
    width: 350px;
    height: 350px;
    animation: spin 30s linear infinite;
}

.cooler-1 {
    top: -80px;
    right: -80px;
}

.cooler-2 {
    bottom: -120px;
    left: -80px;
    animation-direction: reverse;
    width: 450px;
    height: 450px;
}

.gpu {
    width: 600px;
    height: 300px;
    animation: float 12s ease-in-out infinite;
}

.gpu-1 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    opacity: 0.02; /* Видеокарта по центру еще более прозрачная */
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(-15deg) translateY(0px); }
    50% { transform: translate(-50%, -50%) rotate(-15deg) translateY(-20px); }
    100% { transform: translate(-50%, -50%) rotate(-15deg) translateY(0px); }
}

/* Lightning Loader */
.lightning-loader {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    color: var(--matrix-green);
    animation: lightningFlash 0.3s infinite alternate;
    filter: drop-shadow(0 0 8px var(--matrix-green));
}

@keyframes lightningFlash {
    0% { opacity: 0.3; transform: scale(0.9) rotate(-5deg); filter: drop-shadow(0 0 2px var(--matrix-green)); }
    100% { opacity: 1; transform: scale(1.1) rotate(5deg); filter: drop-shadow(0 0 15px var(--matrix-green)); }
}

/* Forms & Auth */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}
.auth-panel {
    width: 100%;
    max-width: 450px;
    text-align: center;
    z-index: 10;
}
.form-group {
    margin-bottom: 20px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--matrix-light);
}
.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 65, 0.4);
    color: #fff;
    padding: 12px;
    font-family: 'Courier New', Courier, monospace;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s;
}
.form-input:focus {
    border-color: var(--matrix-green);
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.2), 0 0 10px rgba(0, 255, 65, 0.2);
}
.auth-links {
    margin-top: 20px;
    font-size: 0.9rem;
}
.auth-links a {
    color: var(--matrix-green);
    text-decoration: none;
}
.auth-links a:hover {
    text-decoration: underline;
    text-shadow: var(--glow);
}

/* Landing Page */
.hero {
    text-align: center;
    padding: 100px 20px 60px 20px; /* Увеличен отступ сверху для Telegram WebApp */
    position: relative;
    z-index: 10;
}
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: var(--glow);
    text-transform: uppercase;
}
.hero p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--matrix-light);
    line-height: 1.8;
}
.features {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 10;
}
.feature-card {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 30px;
    border-radius: 5px;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.05);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.1), 0 5px 20px rgba(0, 255, 65, 0.2);
    border-color: var(--matrix-green);
}
.feature-card h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-shadow: var(--glow);
}
.feature-card p {
    font-size: 0.95rem;
    color: var(--matrix-light);
}

/* Info Blocks on Landing Page */
.info-blocks {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}
.info-block {
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 8px;
    padding: 30px;
    text-align: left;
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.05);
}
.info-block h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-shadow: var(--glow);
}
.info-block .video-container {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--matrix-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    aspect-ratio: 16/9;
    background-color: #050a05;
    position: relative;
}
.info-block video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.info-block p {
    font-size: 1.05rem;
    color: var(--matrix-light);
    line-height: 1.6;
    text-align: left;
}
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}
.action-buttons .btn-submit {
    text-decoration: none;
    display: inline-block;
}

/* Toast notifications (mobile) */
.toast-container {
    position: fixed;
    left: 12px;
    bottom: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100% - 24px);
    pointer-events: none;
}

.toast-item {
    background: rgba(0, 10, 0, 0.92);
    border: 1px solid rgba(0, 255, 65, 0.5);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.25);
    transform: translateX(-120%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    max-width: 320px;
}

.toast-item.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-item.hide {
    transform: translateX(-120%);
    opacity: 0;
}

.toast-time {
    display: block;
    font-size: 0.75rem;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: var(--glow);
}

.toast-text {
    font-size: 0.85rem;
    color: var(--matrix-light);
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 1200px) {
    .panels-container {
        flex-direction: column;
    }
    
    .panel {
        min-height: 250px;
    }
    
    .controls-container {
        justify-content: center;
    }
    
    .total-price {
        margin-left: 0;
    }
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    padding: 30px 20px;
    margin-top: 40px;
    background: rgba(0, 5, 0, 0.8);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright {
    color: var(--matrix-light);
    font-size: 0.9rem;
    font-family: 'Courier New', Courier, monospace;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--matrix-green);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.support-link:hover {
    color: #fff;
    text-shadow: var(--glow);
}

.support-link svg {
    transition: transform 0.3s ease;
}

.support-link:hover svg {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5rem;
        word-wrap: break-word;
        padding: 0 10px;
    }

    body {
        padding-top: 170px;
    }

    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        margin-bottom: 0;
        background: rgba(2, 5, 2, 0.96);
        border-bottom: 1px solid rgba(0, 255, 65, 0.3);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
        padding: 110px 16px 12px 16px; /* Увеличен верхний отступ, чтобы был зазор от картинки */
    }

    .header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 90px;
        background: url('img/topbg.png') top center / cover no-repeat;
        pointer-events: none;
    }

    .header-desktop {
        display: none;
    }

    .header-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
        position: relative;
        width: 100%;
    }

    .mobile-balance {
        font-size: 0.95rem;
        color: var(--matrix-light);
        white-space: nowrap;
    }

    .mobile-balance span {
        color: #fff;
        text-shadow: var(--glow);
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-icon-btn {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(0, 255, 65, 0.5);
        border-radius: 6px;
        background: rgba(0, 20, 0, 0.8);
        color: var(--matrix-green);
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        padding: 0;
    }

    .mobile-icon-btn:hover {
        box-shadow: var(--glow);
        color: #fff;
    }

    .mobile-menu-toggle {
        flex-direction: column;
        gap: 4px;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        background: var(--matrix-green);
        transition: all 0.25s;
    }

    .mobile-menu-toggle.open span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.open span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .mobile-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(0, 255, 65, 0.2);
    }

    .mobile-menu.open {
        display: flex;
    }

    .mobile-menu a {
        color: var(--matrix-light);
        text-decoration: none;
        padding: 10px 12px;
        border: 1px solid rgba(0, 255, 65, 0.2);
        border-radius: 4px;
        background: rgba(0, 20, 0, 0.6);
        text-transform: uppercase;
        font-size: 0.85rem;
    }

    .mobile-menu a:hover {
        color: #fff;
        box-shadow: var(--glow);
    }

    .panel-log {
        display: none !important;
    }

    .main-content {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    .panels-container {
        display: contents;
    }

    .panel:nth-child(2) { order: 1; height: 420px; } /* Fixed height to prevent jumping */
    .controls-container { order: 2; margin-top: 0; margin-bottom: 0; }
    .panel:nth-child(1) { order: 3; }
    
    .controls-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        border-left: none;
        border-top: 3px solid var(--matrix-green);
        padding: 15px 10px;
    }

    .modal-overlay.show {
        display: block;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.85);
        z-index: 999;
    }

    .bet-controls {
        display: none;
        position: fixed;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        background: #020502;
        border: 1px solid var(--matrix-green);
        padding: 20px;
        z-index: 1000;
        border-radius: 8px;
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
        width: 90%;
        max-width: 400px;
        flex-direction: column;
    }
    
    .bet-controls.show {
        display: flex;
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(0, 255, 65, 0.3);
        padding-bottom: 10px;
    }

    .modal-title {
        color: #fff;
        font-size: 1.1rem;
        margin: 0;
    }

    .close-modal-btn {
        background: none;
        border: none;
        color: var(--matrix-green);
        cursor: pointer;
        padding: 0;
        display: flex;
    }

    .bet-summary {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
    }

    .btn-settings-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 20, 0, 0.8);
        border: 1px solid rgba(0, 255, 65, 0.5);
        color: var(--matrix-green);
        border-radius: 6px;
        width: 45px;
        height: 45px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .btn-settings-mobile:hover {
        box-shadow: var(--glow);
        color: #fff;
    }

    .total-price {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0;
    }

    .total-price span:first-child {
        font-size: 0.75rem;
        text-align: left;
    }

    .price-value {
        font-size: 1.1rem;
    }

    .btn-submit {
        width: auto;
        flex: 1;
        padding: 12px 10px;
        font-size: 1rem;
        white-space: nowrap;
    }

    .quick-bet-buttons {
        justify-content: space-between;
    }

    .btn-quick {
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
        text-align: center;
    }

    .control-group {
        justify-content: space-between;
    }
    
    .bottom-info-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 20px;
        z-index: 10;
        position: relative;
        width: 100%;
    }
    
    .bet-info {
        position: static;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .attempt-timer {
        position: absolute;
        bottom: 4px;
        right: 4px;
        margin: 0;
        padding: 0;
    }
    
    .participants-count {
        position: absolute;
        bottom: 4px;
        left: 4px;
        margin: 0;
        padding: 0;
        font-size: 0.8rem;
    }
    
    .hash-container {
        width: 100%;
        font-size: 0.65rem;
    }

    /* Мобильные стили для инфо-блоков на главной */
    .info-blocks {
        padding: 0;
        margin-top: 40px;
        margin-left: -20px;
        margin-right: -20px;
        gap: 0;
    }
    
    .info-block {
        padding: 20px 15px 50px 15px;
        border: none;
        border-radius: 0;
    }
    
    .info-block:last-child {
        padding-bottom: 20px;
    }
    
    .info-block .video-container {
        border-left: none;
        border-right: none;
        border-radius: 0;
        margin-left: -15px; /* компенсируем padding родителя .info-block */
        margin-right: -15px;
        width: calc(100% + 30px);
        max-width: none;
    }
}

/* Nav Start Link */
.nav-start {
    color: #00bfff !important;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.6) !important;
}

.header-actions a.nav-start::after {
    background: #00bfff !important;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.6) !important;
}

.mobile-menu a.nav-start {
    border-color: rgba(0, 191, 255, 0.5) !important;
    background: rgba(0, 30, 50, 0.6) !important;
    box-shadow: inset 0 0 10px rgba(0, 191, 255, 0.1) !important;
}

/* FAQ Styles */
.faq-container {
    max-width: 800px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.faq-item {
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active {
    border-color: var(--matrix-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: var(--glow);
    background: rgba(0, 30, 0, 0.5);
    user-select: none;
    transition: background 0.3s;
}

.faq-question:hover {
    background: rgba(0, 50, 0, 0.6);
}

.faq-icon {
    color: var(--matrix-green);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--matrix-light);
    line-height: 1.6;
    font-size: 1rem;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
    border-top: 1px solid rgba(0, 255, 65, 0.1);
}

/* Firework Stars */
.firework-star {
    position: absolute;
    width: 30px;
    height: 30px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffd700"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    animation: explode 2.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(0.5) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(2.5) rotate(var(--rot));
        opacity: 0;
    }
}