:root {
    --color-black: #000000;
    --color-dark: #111111;
    --color-gold: #D4AF37;
    --color-red: #AA0000;
    --color-white: #f5f5f5;
    --font-title: 'Cinzel Decorative', cursive;
    --font-body: 'Roboto', sans-serif;
    --wood-color: #4a2c1a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--color-black);
    color: var(--color-white);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* --- ♠️ ♥️ НОВЫЙ АНИМИРОВАННЫЙ ПРЕЛОАДЕР ♦️ ♣️ --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--color-black); z-index: 1000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.5s ease;
}
#preloader p {
    color: var(--color-gold); margin-top: 20px; letter-spacing: 2px;
    font-size: 0.9rem; font-weight: bold; text-shadow: 0 0 5px var(--color-gold);
}
.card-shuffler {
    position: relative;
    width: 100px;
    height: 140px;
    transform-style: preserve-3d;
}
.card {
    position: absolute;
    width: 80px;
    height: 120px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    left: 10px;
    top: 10px;
    background-image:
        radial-gradient(circle at 15px 20px, var(--color-red) 8px, transparent 8.5px),
        radial-gradient(circle at 65px 100px, var(--color-red) 8px, transparent 8.5px);
    background-repeat: no-repeat;
    animation: shuffle 1.8s ease-in-out infinite;
}
.card2 { animation-delay: 0.3s; }
.card3 { animation-delay: 0.6s; }

@keyframes shuffle {
    0%, 100% {
        transform: rotate(0deg) translate(0, 0);
        z-index: 3;
    }
    25% {
        transform: rotate(15deg) translate(80px, -20px) scale(1.1);
        z-index: 4;
    }
    50% {
        transform: rotate(-10deg) translate(-100px, 10px);
        z-index: 2;
    }
    75% {
        transform: rotate(5deg) translate(0, 0);
        z-index: 1;
    }
}


/* --- VIDEO BACKGROUND --- */
.video-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: -2; overflow: hidden;
}
#bg-video { width: 100%; height: 100%; object-fit: cover; }
.video-background::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* --- HERO SECTION --- */
.hero {
    height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; padding: 20px;
}
.main-title {
    font-family: var(--font-title); font-size: clamp(3rem, 10vw, 6rem); color: var(--color-gold);
    letter-spacing: 5px; text-shadow: 0 0 10px var(--color-gold), 0 0 20px var(--color-gold), 0 0 40px var(--color-red);
    font-weight: 900;
}
.subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem); color: var(--color-white); text-transform: uppercase;
    letter-spacing: 4px; margin-top: 10px; font-weight: 300;
}
.cta-button {
    display: inline-block; margin-top: 50px; padding: 18px 50px; background: var(--color-gold);
    border: none; color: var(--color-black); font-size: 1.1rem; font-weight: bold; text-decoration: none;
    text-transform: uppercase; letter-spacing: 2px; transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(212,175,55,0.5), inset 0 0 5px rgba(255,255,255,0.4);
}
.cta-button:hover {
    background-color: #fff; color: var(--color-black); box-shadow: 0 0 30px #fff;
    transform: scale(1.05) translateY(-5px);
}
#countdown { display: flex; justify-content: center; gap: 20px; margin-top: 40px; }
.time-block {
    background: rgba(0,0,0,0.3); padding: 15px 20px; border-radius: 5px;
    border: 1px solid rgba(212,175,55,0.3); min-width: 80px;
}
.time-block span { font-size: 2.5rem; font-weight: bold; color: var(--color-gold); }
.time-block small { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.7); }

/* --- БЕКГРАУНД ДЛЯ КОНТЕНТА --- */
main {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1541782233999-23c23f124756?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* --- CONTENT SECTIONS --- */
.content-section, .details-section, .register-section {
    padding: 120px 0;
    position: relative;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}
.content-section {
    border-top: 8px solid var(--wood-color);
    box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
}
.details-section { background-color: rgba(10, 10, 10, 0.7); }
.register-section { background-color: rgba(0, 0, 0, 0.8); }

.section-title {
    font-family: var(--font-title); font-size: clamp(2rem, 6vw, 3rem); text-align: center;
    margin-bottom: 60px; color: var(--color-white);
}
.section-title span { padding: 5px 20px; border-bottom: 3px solid var(--color-gold); }
.content-section p {
    max-width: 800px; margin: 0 auto; font-size: 1.1rem; line-height: 1.8;
    text-align: center; color: #ccc;
}

/* --- КАРТЫ: 4 В РЯД --- */
.cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    perspective: 1000px;
}
.info-card {
    height: 350px; background: #fff; color: var(--color-dark);
    border-radius: 10px; padding: 20px; text-align: center; border: 5px solid #ddd;
    position: relative; transition: transform 0.6s, box-shadow 0.6s;
    transform-style: preserve-3d; cursor: pointer;
}
.info-card:hover {
    transform: translateY(-20px) rotateY(5deg) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.info-card::before, .info-card::after { position: absolute; font-family: var(--font-title); font-size: 2.5rem; font-weight: 900; }
.info-card::before { content: attr(data-rank) " " attr(data-suit); top: 10px; left: 15px; }
.info-card::after { content: attr(data-rank) " " attr(data-suit); bottom: 10px; right: 15px; transform: rotate(180deg); }
.info-card[data-suit="♥"], .info-card[data-suit="♦"] { color: var(--color-red); }
.info-card[data-suit="♠"], .info-card[data-suit="♣"] { color: var(--color-dark); }
.info-card h4 { font-size: 1.4rem; margin-top: 80px; color: #333; }
.info-card p { font-size: 1rem; color: #555; margin-top: 15px; }

/* --- REGISTER SECTION --- */
.register-subtitle { text-align: center; margin-bottom: 40px; color: #aaa; }
#poker-form { max-width: 600px; margin: 0 auto; }
.form-group input {
    width: 100%; padding: 18px; margin-bottom: 20px; background-color: rgba(255,255,255,0.05);
    border: 1px solid #444; color: var(--color-white); font-size: 1rem;
    transition: all 0.3s ease;
}
.form-group input:focus {
    outline: none; border-color: var(--color-gold); box-shadow: 0 0 15px rgba(212,175,55,0.5);
}
#success-message { text-align: center; margin-top: 30px; }
#success-message h4 { color: var(--color-gold); font-size: 1.5rem; }
.hidden { display: none; }

/* --- FOOTER --- */
footer {
    position: relative;
    text-align: center; padding: 40px 0; background-color: rgba(0,0,0,0.85); color: #555;
    border-top: 8px solid var(--wood-color);
}

/* --- ANIMATIONS --- */
.reveal { opacity: 0; transform: translateY(50px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- СТИЛИ ДЛЯ БЛОКА "ДОСТУП ЗАПРЕЩЕН" --- */
#access-denied {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9999;
    font-family: 'Cinzel Decorative', cursive;
}

#access-denied h1 {
    font-size: 4rem;
    color: #AA0000;
    text-shadow: 0 0 10px #AA0000;
    letter-spacing: 5px;
    text-transform: uppercase;
}

#access-denied p {
    font-size: 1.2rem;
    color: #aaa;
    letter-spacing: 2px;
    margin-top: 10px;
    font-family: 'Roboto', sans-serif;
}
/* --- АДАПТИВНОСТЬ ДЛЯ КАРТ --- */
@media (max-width: 1024px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .cards-container {
        grid-template-columns: 1fr;
    }
    .info-card {
        height: 320px;
    }
    .info-card h4 {
        margin-top: 70px;
    }
}