/* ===== MODERN VARIABLES ===== */
:root {
    --primary: #8a2be2;
    --primary-dark: #6a1cb8;
    --primary-light: #a855f7;
    --secondary: #ff6b6b;
    --secondary-light: #ff8787;
    --dark: #0a0a0f;
    --darker: #050508;
    --light: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #1a1a24;
    --gradient: linear-gradient(135deg, #8a2be2 0%, #ff6b6b 100%);
    --gradient-hover: linear-gradient(135deg, #a855f7 0%, #ff8787 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(255, 107, 107, 0.1) 100%);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(138, 43, 226, 0.5);
    --border-radius: 16px;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--darker);
    background-image: 
        radial-gradient(at 0% 0%, rgba(138, 43, 226, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 107, 107, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(138, 43, 226, 0.1) 0%, 
        rgba(255, 107, 107, 0.1) 50%, 
        rgba(138, 43, 226, 0.1) 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

section {
    padding: 120px 0;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    width: 100%;
}

section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.section__title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin: 0 0 80px 0;
    position: relative;
    display: block;
    width: 100%;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::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: left 0.5s ease;
    z-index: -1;
}

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

.btn--primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
}

.btn--primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(138, 43, 226, 0.6);
    background: var(--gradient-hover);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-left: 15px;
}

.btn--outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.5);
    border-color: var(--primary-light);
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 25px 0;
    transition: var(--transition);
    backdrop-filter: blur(0px);
    background: transparent;
}

.header.scrolled {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    padding: 15px 0;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--glass-border);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    position: relative;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo__text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nav {
    display: flex;
    gap: 40px;
}

.nav__link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 5px 0;
    font-size: 1rem;
}

.nav__link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.8);
}

.nav__link:hover::before,
.nav__link.active::before {
    width: 100%;
}

.nav__link:hover {
    color: var(--primary-light);
    transform: translateY(-2px);
}

.burger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    gap: 5px;
}

.burger span {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== HERO ===== */
.hero {
    min-height: 900px;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 150px;
    padding-bottom: 100px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.2) 0%, transparent 70%);
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 10, 15, 0.7), rgba(10, 10, 15, 0.9));
    z-index: 1;
    transform: none !important;
    will-change: auto;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px 40px;
    animation: fadeInUp 1s ease;
    width: 100%;
}

.hero__title {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 40px;
    margin-top: 0;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    animation: fadeInUp 1s ease 0.2s both, float 6s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(138, 43, 226, 0.5);
}

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

.hero__subtitle {
    font-size: 1.6rem;
    margin-bottom: 60px;
    margin-top: 0;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 1s ease 0.4s both;
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1.6;
}

.hero__buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 20px;
    animation: fadeInUp 1s ease 0.6s both;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Fallback for when particles.js is not loaded */
body.no-particles .hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* ===== ABOUT ===== */
.about {
    background: transparent;
    position: relative;
    overflow: hidden;
}


.about::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

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

.about__content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about__text {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about__text.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.about__text p {
    margin-bottom: 25px;
    font-size: 1.15rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.85);
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about__stats.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.stat {
    text-align: center;
    padding: 35px 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-subtle);
    transition: left 0.5s ease;
    z-index: -1;
}

.stat:hover::before {
    left: 0;
}

.stat:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(138, 43, 226, 0.3);
}

.stat__number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    display: block;
    animation: countUp 1s ease;
}

.stat__label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* ===== GAMES ===== */
.games {
    background: transparent;
    position: relative;
}


.games__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.game-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    position: relative;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    animation: cardFadeIn 0.8s ease forwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-subtle);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 60px rgba(138, 43, 226, 0.4);
    border-color: var(--primary);
}

.game-card__image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.game-card__image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.game-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.game-card:hover .game-card__image img {
    transform: scale(1.15) rotate(2deg);
}

.game-card__content {
    padding: 30px;
    position: relative;
    z-index: 1;
}

.game-card__title {
    font-size: 1.7rem;
    margin-bottom: 15px;
    color: white;
    font-weight: 700;
}

.game-card__description {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.7;
}

/* Widget card styling in Games */
.widget-card .game-card__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.widget-card .widget-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
}
.widget-card .widget-wrapper iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: 320px !important;
    border: none;
    border-radius: 8px;
}

/* Countdown widget styling */
.countdown-card .countdown-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
}
.countdown-card .countdown {
    font-family: 'Minecraft', monospace;
    font-size: 1.05rem;
    color: #fff;
    text-align: center;
    letter-spacing: 0.5px;
}
.countdown-card .countdown strong {
    color: var(--primary);
}

/* Center countdown in its card */
.countdown-card .game-card__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
}
.countdown-card .game-card__title {
    width: 100%;
    text-align: center;
}
.countdown-card .countdown-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    width: 100%;
}
.countdown-card .countdown {
    text-align: center;
}

/* ===== TEAM ===== */
.team {
    background: transparent;
    position: relative;
    overflow: hidden;
}


.team::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
    animation: rotate 25s linear infinite reverse;
    z-index: 0;
}

.team__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 35px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.team-member {
    text-align: center;
    padding: 35px 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: memberFadeIn 0.6s ease forwards;
}

.team-member:nth-child(1) { animation-delay: 0.1s; }
.team-member:nth-child(2) { animation-delay: 0.2s; }
.team-member:nth-child(3) { animation-delay: 0.3s; }
.team-member:nth-child(4) { animation-delay: 0.4s; }
.team-member:nth-child(5) { animation-delay: 0.5s; }

@keyframes memberFadeIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.team-member::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gradient-subtle);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
    z-index: 0;
}

.team-member:hover::before {
    width: 300px;
    height: 300px;
}

.team-member:hover {
    transform: translateY(-12px) scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(138, 43, 226, 0.4);
}

.team-member__image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto 25px;
    overflow: hidden;
    border: 4px solid var(--primary);
    position: relative;
    z-index: 1;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
}

.team-member:hover .team-member__image {
    border-color: var(--secondary);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.5);
}

.team-member__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.team-member:hover .team-member__image img {
    transform: scale(1.1);
}

.team-member__name {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: white;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.team-member__role {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.team-member:hover .team-member__role {
    color: var(--secondary);
}

/* ===== CONTACT ===== */
.contact {
    background: transparent;
    position: relative;
    text-align: center;
}


.contact__content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact__info {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    padding: 50px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.contact__info:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 25px 70px rgba(138, 43, 226, 0.4);
}

.contact__info h3 {
    font-size: 2rem;
    margin-bottom: 25px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.contact__info p {
    margin-bottom: 40px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.contact__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact__list li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.contact__list li:hover {
    background: var(--gradient-subtle);
    border-color: var(--primary);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.2);
}

.contact__list i {
    color: var(--primary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.contact__list li:hover i {
    color: var(--secondary);
    transform: scale(1.2) rotate(10deg);
}

.contact__list a {
    color: white;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 500;
    transition: var(--transition);
}

.contact__list a:hover {
    color: var(--primary-light);
}

/* ===== FOOTER ===== */
.footer {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    padding: 80px 0 30px;
    position: relative;
    border-top: 1px solid var(--glass-border);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6);
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer__logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer__links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer__links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

.footer__links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.footer__links a:hover {
    color: white;
}

.footer__links a:hover::after {
    width: 100%;
}

.footer__social {
    display: flex;
    gap: 15px;
}

.footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1.3rem;
    transition: var(--transition);
    text-decoration: none;
}

.footer__social a:hover {
    background: var(--gradient);
    border-color: transparent;
    transform: translateY(-5px) scale(1.1) rotate(10deg);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.5);
}

.footer__bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

.footer__legal {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer__legal-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer__legal-link:hover {
    color: var(--primary-light);
}

.footer__divider {
    color: rgba(255, 255, 255, 0.3);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .about__content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about__stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .games__grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 1000;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
        border-left: 1px solid var(--glass-border);
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav__link {
        font-size: 1.3rem;
        margin: 15px 0;
    }
    
    .burger {
        display: flex;
    }
    
    .hero {
        padding-top: 120px;
        min-height: 700px;
        height: auto;
    }
    
    .hero__content {
        padding: 40px 20px 30px;
    }
    
    .hero__title {
        font-size: 3.5rem;
        margin-bottom: 30px;
    }
    
    .hero__subtitle {
        font-size: 1.3rem;
        margin-bottom: 50px;
    }
    
    .section__title {
        font-size: 2.5rem;
    }
    
    .games__grid {
        grid-template-columns: 1fr;
    }
    
    .team__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about__stats {
        grid-template-columns: 1fr;
    }
    
    .btn--outline {
        margin-left: 0;
        margin-top: 15px;
    }
    
    .hero__buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact__info {
        padding: 35px 25px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding-top: 100px;
        min-height: 600px;
    }
    
    .hero__content {
        padding: 30px 20px 20px;
    }
    
    .hero__title {
        font-size: 2.8rem;
        margin-bottom: 25px;
    }
    
    .hero__subtitle {
        font-size: 1.2rem;
        margin-bottom: 40px;
    }
    
    .section__title {
        font-size: 2rem;
    }
    
    .team__grid {
        grid-template-columns: 1fr;
    }
    
    .footer__content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer__links {
        justify-content: center;
    }
    
    .about__stats {
        gap: 20px;
    }
    
    .stat {
        padding: 25px 20px;
    }
}

/* Smooth scroll animation for sections */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Additional modern effects */
.game-card,
.team-member,
.stat {
    will-change: transform;
}

/* Performance optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== CHARACTER POPUP ===== */
.character-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    /* Убеждаемся что элемент виден */
    width: auto;
    height: auto;
}

.character-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Диалоговое окно в стиле Minecraft */
.character-popup__dialog {
    background: #8B8B8B;
    border: 4px solid #373737;
    border-top-color: #FFFFFF;
    border-left-color: #FFFFFF;
    border-right-color: #000000;
    border-bottom-color: #000000;
    padding: 20px 25px;
    position: relative;
    font-family: 'Minecraft', monospace;
    box-shadow: 
        inset -2px -2px 0 #000000,
        inset 2px 2px 0 #FFFFFF,
        0 0 20px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    max-width: 400px;
    transform: translateX(500px);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.character-popup.show .character-popup__dialog {
    transform: translateX(0) !important;
}

.character-popup.show .character-popup__character {
    transform: translateY(0) !important;
}

.character-popup__close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #8B8B8B;
    border: 2px solid #373737;
    border-top-color: #FFFFFF;
    border-left-color: #FFFFFF;
    border-right-color: #000000;
    border-bottom-color: #000000;
    color: #000000;
    font-size: 20px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Minecraft', monospace;
    font-weight: bold;
    line-height: 1;
    transition: all 0.1s;
    image-rendering: pixelated;
}

.character-popup__close:hover {
    background: #FF6B6B;
    color: #FFFFFF;
}

.character-popup__close:active {
    border-top-color: #000000;
    border-left-color: #000000;
    border-right-color: #FFFFFF;
    border-bottom-color: #FFFFFF;
}

.character-popup__dialog-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.character-popup__text {
    color: #000000;
    font-size: 18px;
    line-height: 1.5;
    text-align: left;
    font-family: 'Minecraft', monospace;
    margin: 0;
    word-spacing: 2px;
    letter-spacing: 0.5px;
    image-rendering: pixelated;
}

#character-name {
    color: #8a2be2;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000000;
}

/* Кнопка в стиле Minecraft */
.character-popup__button {
    background: #8B8B8B;
    border: 3px solid #373737;
    border-top-color: #FFFFFF;
    border-left-color: #FFFFFF;
    border-right-color: #000000;
    border-bottom-color: #000000;
    color: #000000;
    text-decoration: none;
    padding: 10px 20px;
    font-family: 'Minecraft', monospace;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.1s;
    display: inline-block;
    box-shadow: 
        inset -1px -1px 0 #000000,
        inset 1px 1px 0 #FFFFFF;
    image-rendering: pixelated;
    font-weight: bold;
}

.character-popup__button:hover {
    background: #9B9B9B;
    transform: translateY(-1px);
}

.character-popup__button:active {
    background: #7B7B7B;
    border-top-color: #000000;
    border-left-color: #000000;
    border-right-color: #FFFFFF;
    border-bottom-color: #FFFFFF;
    box-shadow: 
        inset 1px 1px 0 #000000,
        inset -1px -1px 0 #FFFFFF;
    transform: translateY(0);
}

/* Персонаж выезжает снизу */
.character-popup__character {
    background: #8B8B8B;
    border: 4px solid #373737;
    border-top-color: #FFFFFF;
    border-left-color: #FFFFFF;
    border-right-color: #000000;
    border-bottom-color: #000000;
    box-shadow: inset -2px -2px 0 #000000, inset 2px 2px 0 #FFFFFF, 0 0 15px rgba(0,0,0,0.4);
    margin-top: 12px;
    padding: 24px 24px 8px 24px;
    border-radius: 15px;
    min-width: 140px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(260px);
    transition: transform 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    image-rendering: pixelated;
}

.character-popup.show .character-popup__character {
    transform: translateY(0);
}

.character-popup__image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid #373737;
    border-top-color: #FFFFFF;
    border-left-color: #FFFFFF;
    border-right-color: #000000;
    border-bottom-color: #000000;
    box-shadow: inset -2px -2px 0 #000000, inset 2px 2px 0 #FFFFFF, 0 5px 15px rgba(0,0,0,0.5);
    border-radius: 50%;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    animation: characterBounce 2s ease-in-out infinite;
    margin: 0 auto;
    display: block;
}

@keyframes characterBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Hide on mobile devices */
@media (max-width: 768px) {
    .character-popup {
        display: none !important;
    }
}

/* Apps page specific tuning for app icons */
#apps .game-card__image {
    height: 140px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
}
#apps .game-card__image img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    image-rendering: -webkit-optimize-contrast;
}

#apps .btn-row {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
#apps .btn-row .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.countdown-section {
    padding-top: 40px;
    padding-bottom: 40px;
}
.countdown-container {
    display: flex;
    justify-content: center;
}
.countdown-section .countdown-card {
    max-width: 360px;
    width: 100%;
}
.countdown-section .game-card__content {
    width: 100%;
    min-height: auto;
}
