:root {
    --bg-color: #17072b;
    --panel-bg: #2d1055;
    --gold: #f2d152;
    --gold-hover: #ffdf60;
    --green: #2ab85c;
    --green-hover: #32d66a;
    --text-main: #ffffff;
    --text-muted: #bda8d9;
}

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

body {
    font-family: 'Press Start 2P', cursive;
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 2px, transparent 2px);
    background-size: 40px 40px;
    background-position: 0 0;
    animation: bgScroll 4s steps(10) infinite;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: auto; /* Убрана плавная прокрутка для резкости */
}

@keyframes bgScroll {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 5px;
}

/* Входная анимация */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* Убрано затухание для мгновенного исчезновения */
}

#intro-animation-img {
    width: 60vw;
    max-width: 800px; /* Более адекватный размер */
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(10px 10px 0 rgba(0, 0, 0, 0.8));
}

.pixel-text-anim {
    font-size: 4rem;
    color: var(--gold);
    text-shadow: 6px 6px 0 #000;
    opacity: 0;
    animation: pixelReveal 2s steps(10) forwards;
}

@keyframes pixelReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    25% {
        opacity: 0.25;
        transform: translateY(30px);
    }
    50% {
        opacity: 0.5;
        transform: translateY(20px);
    }
    75% {
        opacity: 0.75;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Основной контент (скрыт до конца анимации) */
#main-content {
    opacity: 0;
    transition: opacity 1s ease-in;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--panel-bg);
    padding: 15px 30px;
    border: 3px solid var(--panel-bg); 
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
    image-rendering: pixelated;
}

.logo-text {
    font-size: 1.5rem;
    color: var(--gold);
    text-shadow: 3px 3px 0px #000;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.8rem;
    text-shadow: 1px 1px 0 #000;
}

.nav-links a:hover {
    color: #fff;
    transform: translateY(-4px);
}

/* Панели */
.panel {
    background-color: var(--panel-bg);
    background-image: 
        conic-gradient(rgba(0,0,0,0.15) 90deg, transparent 90deg 180deg, rgba(0,0,0,0.15) 180deg 270deg, transparent 270deg),
        linear-gradient(
            to bottom,
            #3b1773 0%,
            #3b1773 20%,
            #331463 20%,
            #331463 40%,
            #2b1055 40%,
            #2b1055 60%,
            #220d44 60%,
            #220d44 80%,
            #190a33 80%,
            #190a33 100%
        );
    background-size: 8px 8px, 100% 100%;
    background-position: 0 0, 0 0;
    border: 3px solid var(--gold);
    padding: 40px;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.6);
    margin-bottom: 30px;
}

.text-center {
    text-align: center;
}

/* Кнопки */
.btn {
    font-family: 'Press Start 2P', cursive;
    padding: 15px 20px;
    border: 3px solid #000;
    cursor: pointer;
    font-size: 0.8rem;
    box-shadow: 4px 4px 0 #000;
}

.btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0 #000;
}

.btn-yellow {
    background-color: var(--gold);
    color: #000;
}

.btn-yellow:hover {
    background-color: var(--gold-hover);
}

.btn-green {
    background-color: var(--green);
    color: #000;
}

.btn-green:hover {
    background-color: var(--green-hover);
}

.btn-pay {
    display: inline-block;
    background-color: var(--gold);
    color: #000;
    text-decoration: none;
    margin-top: 20px;
    font-size: 1rem;
    padding: 20px 30px;
    border: 3px solid #000;
    box-shadow: 5px 5px 0 #000;
    position: relative;
}

.btn-pay:hover {
    color: #fff;
    animation: btnGlitch 0.4s steps(4) infinite;
}

.btn-pay:active {
    transform: translate(5px, 5px);
    box-shadow: 0px 0px 0 #000;
    animation: none;
    background-color: var(--gold);
    color: #000;
}

@keyframes btnGlitch {
    0% { background-color: var(--gold); transform: translate(0); box-shadow: 5px 5px 0 #000; text-shadow: none; }
    25% { background-color: #ff3366; transform: translate(-3px, 2px); box-shadow: 8px 3px 0 #00ffff; text-shadow: 2px 2px 0 #000; }
    50% { background-color: #2ab85c; transform: translate(3px, -2px); box-shadow: 2px 7px 0 #ff00ff; text-shadow: -2px -2px 0 #000; }
    75% { background-color: #2AABEE; transform: translate(-2px, -3px); box-shadow: 7px 2px 0 var(--gold); text-shadow: 2px -2px 0 #000; }
    100% { background-color: var(--gold); transform: translate(0); box-shadow: 5px 5px 0 #000; text-shadow: none; }
}

.highlight {
    color: var(--gold);
}

/* Герой секция */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 1.8rem;
    line-height: 1.5;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0 #000;
}

.blinking-cursor {
    animation: blinkCursor 1s steps(2, end) infinite;
}

@keyframes blinkCursor {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--green);
    background: rgba(0,0,0,0.4);
    padding: 10px 15px;
    width: fit-content;
    border-radius: 5px;
    border: 2px solid #000;
}

.status-dot {
    width: 12px;
    height: 12px;
    background-color: var(--green);
    border-radius: 50%;
    animation: pulse 1s steps(2, end) infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(42, 184, 92, 0.7); }
    50% { box-shadow: 0 0 0 6px rgba(42, 184, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(42, 184, 92, 0); }
}

.tetris-container {
    padding: 0;
    background: #05010a;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#tetris-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#tetris-score-container {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
    color: var(--gold);
    z-index: 5;
    text-shadow: 3px 3px 0 #000;
}

#tetris-canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    display: block;
}

/* About Section */
.price-text {
    font-size: 1.4rem;
    margin: 25px 0;
    line-height: 1.5;
}
.desc {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Правила */
.section-title {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 40px;
    text-shadow: 3px 3px 0 #000;
}

.rules-category {
    margin-bottom: 35px;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 5px;
    border: 2px solid rgba(242, 209, 82, 0.3);
}

.rules-category h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 2px dashed rgba(242, 209, 82, 0.5);
    padding-bottom: 10px;
    text-shadow: 2px 2px 0 #000;
}

.rules-category ul {
    list-style-type: none;
}

.rules-category li {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    margin-bottom: 15px;
    color: #e0e0e0;
    position: relative;
    padding-left: 25px;
}

.rules-category li::before {
    content: '►';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.8rem;
    top: 3px;
}

/* Контакты / Футер */
.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    border: 3px solid #000;
    text-decoration: none;
    font-size: 1rem;
    color: #fff;
    box-shadow: 4px 4px 0 #000;
}

.social-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0 #000;
}

.tg-btn {
    background-color: #2AABEE;
}
.tg-btn:hover {
    background-color: #3bb6f7;
}

.ds-btn {
    background-color: #5865F2;
}
.ds-btn:hover {
    background-color: #6a76f5;
}

.social-icon {
    width: 28px;
    height: 28px;
}

.footer-copy {
    text-align: center;
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Анимации при скролле */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
}

.fade-in-section.is-visible {
    animation: pixelReveal 0.4s steps(4) forwards;
}

/* Адаптивность */
@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
    }
    .navbar {
        flex-direction: column;
        gap: 20px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .pixel-text-anim {
        font-size: 2.5rem;
    }
    .hero-title {
        font-size: 1.4rem;
    }
}
