﻿html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    font-size: 20px;
    color: #f5f5f5;
    background: linear-gradient(135deg, #1e1e2f, #2b2b45);
}
/* 🧊 ОБЩИЙ СТИЛЬ ДЛЯ ВСЕХ INPUT / SELECT */
input,
select {
    background: rgba(255,255,255,0.08);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

option {
    background: #1e1e2f;
    color: white;
}

    /* hover эффект */
    input:hover,
    select:hover {
        background: rgba(255,255,255,0.12);
    }

    /* focus эффект */
    input:focus,
    select:focus {
        background: rgba(255,255,255,0.18);
        box-shadow: 0 0 0 2px rgba(13,110,253,0.4);
    }

    /* placeholder */
    input::placeholder {
        color: rgba(255,255,255,0.5);
    }
.page-center {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Общий стиль кнопок */
.btn-game {
    display: inline-block;
    padding: 18px 40px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(#1f7cff, #0057c8);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    transition: all .2s ease;
}

    .btn-game:hover {
        transform: translateY(-2px);
        background: linear-gradient(#3388ff, #0066e0);
        color: #fff;
    }

    .btn-game:active {
        transform: scale(.97);
    }

.home {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
button,
.btn,
input[type="submit"],
input[type="button"],
a.btn-game {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
}

    button:hover,
    .btn:hover,
    input[type="submit"]:hover,
    input[type="button"]:hover,
    a.btn-game:hover {
        background-color: #0b5ed7;
        color: white;
    }

    button:active,
    .btn:active,
    input[type="submit"]:active,
    input[type="button"]:active,
    a.btn-game:active {
        transform: scale(0.98);
    }
.menu {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

    .menu .btn-game {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
.nav-buttons {
    position: fixed;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 10px;
    z-index: 9999;
}

.nav-btn {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    text-decoration: none;
    color: white;
    background: rgba(20, 20, 40, 0.6);
    border-radius: 10px; /* квадрат с закруглением */
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    transition: 0.2s;
}

    .nav-btn:hover {
        transform: scale(1.1);
        background: rgba(50, 50, 90, 0.8);
    }


/* КОНТЕЙНЕР */
.categories-wrapper {
    width: 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* СПИСОК */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ОБЩИЙ ВИД КАРТОЧКИ */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    color: white;
    transition: 0.2s;
}

    .category-item:hover {
        background: rgba(255,255,255,0.15);
    }

/* ТЕКСТ */
.category-name {
    font-size: 18px;
    font-weight: 600;
}

/* УДАЛИТЬ */
.delete-btn {
    background: #ff3b3b;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

    .delete-btn:hover {
        background: #ff1f1f;
        transform: scale(1.05);
    }

/* ➕ ФОРМА ДОБАВЛЕНИЯ (ТО ЖЕ ОФОРМЛЕНИЕ) */
.add-form {
    gap: 10px;
}

    /* ИНПУТ */
    .add-form input {
        flex: 1;
        background: transparent;
        border: none;
        outline: none;
        color: white;
        font-size: 18px;
        font-weight: 600;
    }

        /* PLACEHOLDER */
        .add-form input::placeholder {
            color: rgba(255,255,255,0.5);
        }

/* КНОПКА ДОБАВИТЬ */
.add-btn {
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

    .add-btn:hover {
        background: #0b5ed7;
        transform: scale(1.05);
    }
/* ОБЩИЙ КОНТЕЙНЕР */
.words-wrapper {
    width: 520px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 📦 КАРТОЧКИ (СЛОВА) */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    color: white;
    transition: 0.2s;
}

    .category-item:hover {
        background: rgba(255,255,255,0.15);
    }

/* ❌ УДАЛИТЬ */
.delete-btn {
    background: #ff3b3b;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* ➕ ДОБАВИТЬ */
.add-btn {
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
}

/* 🐤 ФИЛЬТР БЛОК */
.filter-box {
    padding: 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

/* СПИСОК ЧЕКБОКСОВ */
.filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* 📦 КНОПКА-КАТЕГОРИЯ */
.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

    /* скрываем стандартный чекбокс */
    .check-item input {
        display: none;
    }

    /* 🟦 АКТИВНОЕ СОСТОЯНИЕ */
    .check-item:has(input:checked) {
        background: #0d6efd;
        color: white;
    }

    /* hover */
    .check-item:hover {
        background: rgba(255,255,255,0.15);
    }
.dropdown {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 10px;
    color: white;
}

.dropdown-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
}

    .dropdown-item input {
        accent-color: #0d6efd;
    }
/* 🎮 ИГРОВОЙ SELECT */
.game-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.08);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

    /* hover */
    .game-select:hover {
        background: rgba(255,255,255,0.12);
    }

    /* focus */
    .game-select:focus {
        background: rgba(255,255,255,0.18);
        box-shadow: 0 0 0 2px rgba(13,110,253,0.4);
    }

    /* option (частично работает) */
    .game-select option {
        background: #1e1e2f;
        color: white;
    }
/* 📦 ФОРМА ДОБАВЛЕНИЯ */
.add-word-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 🧠 РЯД: input + select */
.add-row {
    display: flex;
    gap: 10px;
}

    /* input и select одинаковой ширины */
    .add-row input,
    .add-row select {
        flex: 1;
    }
.role-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}
.session-box {
    max-width: 420px;
    margin: 40px auto;
    padding: 20px;
    background: #1e1e1e;
    border-radius: 14px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

    .session-box h2 {
        text-align: center;
        margin-bottom: 10px;
    }

    .session-box label {
        font-size: 14px;
        opacity: 0.9;
    }

    .session-box input[type="number"] {
        width: 100%;
        padding: 10px;
        border-radius: 10px;
        border: none;
        background: #2b2b2b;
        color: white;
        outline: none;
    }
    .session-box form {
        display: flex;
        flex-direction: column;
        gap: 10px; /* 👈 равномерное расстояние */
    }

        .session-box input[type="number"]:focus {
            background: #333;
        }
#rulesBox {
    display: flex;
    flex-direction: column;
    gap: 12px; /* 👈 расстояние между чекбоксами */
    margin-left: 5px;
}
.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}
.card {
    width: 340px;
    height: 440px;
    perspective: 1400px;
    cursor: pointer;
    position: relative;
    /* ВАЖНО */
    transform: translateZ(0);
    background: transparent;
}
.card {
    box-shadow: 0 15px 40px rgba(0,0,0,0.45);
    border-radius: 16px;
}
.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 16px;
    background-color: transparent;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

    /* переворот */
    .card-inner.flipped {
        transform: rotateY(180deg);
    }

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #1e1e1e;
    color: white;
    /* ВАЖНО: убираем “черную рамку” */
    box-shadow: none;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

/* задняя сторона */
.card-back {
    transform: rotateY(180deg);
    background-clip: padding-box;
}