/* Глобальні налаштування */
:root {
    --primary: #38bdf8;
    --bg-dark: #020617;
    --card-bg: #0f172a;
    --text-light: #e2e8f0;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top, #0f172a, #020617);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* HERO SECTION */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 5rem); /* Адаптивний розмір шрифту */
    margin: 0;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
}

/* GRID / CARDS */
.hub-grid, .games-grid {
    display: grid;
    /* Створює колонки, які автоматично підлаштовуються під ширину */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto; /* Центрує сітку */
}

.hub-card {
    background: var(--card-bg);
    border: 2px solid #1e293b;
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hub-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.15);
}

.card-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.hub-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: var(--primary);
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: 12px;
    font-weight: bold;
    transition: 0.2s;
}

.hub-link:hover {
    background: #7dd3fc;
}

/* HEADER BASE */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

/* LOGO & LOL EFFECT */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.lol-accent {
    color: #38bdf8;
    text-transform: uppercase;
    transition: 0.3s;
    display: inline-block;
}

.logo-link:hover .lol-accent {
    transform: rotate(10deg) scale(1.2);
    text-shadow: 0 0 15px #38bdf8;
}

.rocket {
    margin-right: 10px;
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-link:hover .rocket {
    transform: translateY(-5px) translateX(5px);
}

/* MENU */
.menu {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    color: #cbd5f1;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.95rem;
}

.nav-item:hover {
    color: #38bdf8;
}

/* CONTROLS & LANG */
.controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-select {
    background: #1e293b;
    color: #38bdf8;
    border: 1px solid #334155;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    outline: none;
}

/* AUTH BUTTONS */
.login-link {
    color: #020617;
    background: #38bdf8;
    padding: 8px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.login-link:hover {
    background: #7dd3fc;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.logout-btn {
    background: none;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 10px;
    transition: 0.3s;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
}

/* RESPONSIVE (MOBILE) */
@media (max-width: 900px) {
    .menu {
        display: none; /* Тут можна додати JS для випадаючого меню */
    }

    .user-welcome {
        display: none; /* Ховаємо привітання на маленьких екранах */
    }
}

/* FOOTER STYLES */
.footer {
    background: #020617; /* Твій базовий колір */
    border-top: 1px solid #1e293b;
    padding: 60px 20px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap; /* Дозволяє блокам переноситись на новий рядок */
    justify-content: space-between;
    gap: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px; /* Мінімальна ширина блоку до переносу */
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    color: #38bdf8;
    margin-bottom: 15px;
}

.footer-section h4 {
    color: #38bdf8;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 10px;
    transition: 0.3s;
}

.footer-section a:hover {
    color: #38bdf8;
    padding-left: 5px;
}

/* ДОНАТ КНОПКА */
.donate-btn {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    color: #020617;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.donate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

/* НИЖНЯ ПАНЕЛЬ */
.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
    color: #475569;
}

/* АДАПТИВНІСТЬ ДЛЯ МОБІЛЬНИХ */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        min-width: 100%;
    }

    .donate-wrapper {
        display: flex;
        justify-content: center;
    }
}

/* Логотип з грою слів */
.main-logo {
    font-size: clamp(4rem, 15vw, 7rem);
    font-weight: 900;
    margin-bottom: 0;
    letter-spacing: -2px;
}

.lol-text {
    color: var(--primary);
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #38bdf8, 0 0 20px #38bdf8; }
    to { text-shadow: 0 0 20px #38bdf8, 0 0 40px #0ea5e9; }
}

/* Розшифровка LOL */
.dynamic-slogan {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    color: #94a3b8;
    margin-top: -10px;
    margin-bottom: 30px;
}

.dynamic-slogan span {
    color: var(--primary);
    font-weight: bold;
}

/* Адаптивність */
@media (max-width: 600px) {
    .dynamic-slogan {
        font-size: 1rem;
    }
}

/* Декор: "Помилка як фішка" */
.hero-desc {
    background: rgba(56, 189, 248, 0.1);
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px dashed var(--primary);
    font-weight: 500;
}

CSS
/* Контейнер для центрування */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    min-height: 60vh;
}

/* Картка Kamil.lol */
.child-login-card {
    background: #1e293b;
    border: 4px solid #38bdf8;
    border-radius: 30px;
    padding: 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 15px 0px rgba(56, 189, 248, 0.1);
    text-align: center;
    color: #e2e8f0;
}

.card-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.child-login-card h2 {
    color: #38bdf8;
    font-size: 28px;
    margin-bottom: 25px;
}

/* Стилізація стандартної форми Django (form.as_p) */
.form-group-wrapper p {
    text-align: left;
    margin-bottom: 20px;
}

.form-group-wrapper label {
    display: block;
    margin-bottom: 8px;
    color: #94a3b8;
    font-weight: bold;
}

.form-group-wrapper input {
    width: 100%;
    padding: 12px;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 15px;
    color: white;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group-wrapper input:focus {
    border-color: #38bdf8;
    outline: none;
}

/* Кнопка "Поїхали" */
.child-submit-btn {
    width: 100%;
    padding: 15px;
    background: #38bdf8;
    color: #020617;
    border: none;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
    box-shadow: 0 5px 0 #0ea5e9;
}

.child-submit-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #0ea5e9;
}

/* Ефект блискавки для карток при наведенні */
.cube-theme:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
    border-color: #0ff;
}

.game-preview-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px var(--primary));
}

/* Анімація для Clicker-картки */
.clicker-theme:hover .game-preview-icon {
    animation: shake 0.2s ease-in-out infinite;
}


@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

.game-item {
    background: rgba(30, 41, 59, 0.5); /* Напівпрозорий синій */
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрує іконку та текст всередині картки */
    transition: 0.3s ease;
}



.play-btn {
    display: inline-block;
    background: #38bdf8;
    color: #020617;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
}

/* Контейнер, що тримає всі картки */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Картки стануть у ряд */
    gap: 25px;
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto; /* Центруємо всю сітку на сторінці */
}

/* Сама картка */
.game-card {
    background: rgba(15, 23, 42, 0.6); /* Темніший, глибший фон */
    border: 2px solid rgba(56, 189, 248, 0.2);
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: #38bdf8;
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.15);
}

/* Стиль для технологій (теги) */
.tech-stack {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tech-tag {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    border: 1px solid rgba(56, 189, 248, 0.3);
}