/* Общие стили */
body {
    background-color: #000000; /* Чёрный фон */
    color: #ffffff; /* Белый текст */
    font-family: 'Roboto', sans-serif;
    margin: 0;
    line-height: 1.6;
}

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

/* Хедер и Навигация */
header {
    background-color: #111111; /* Тёмно-серый фон хедера */
    padding: 20px 0;
    border-bottom: 1px solid #333333;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.search-bar input {
    background-color: #222222;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 20px;
    width: 350px;
    font-size: 14px;
}

.search-bar input::placeholder {
    color: #aaaaaa;
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-primary { background-color: #ffffff; color: #000000; }
.btn-primary:hover { background-color: #cccccc; }

.btn-google { background-color: #4285F4; color: #ffffff; }
.btn-google:hover { background-color: #357ae8; }

.btn-play { background-color: #27ae60; color: #ffffff; width: 100%; margin-top: 10px; }
.btn-play:hover { background-color: #219150; }

.btn-danger { background-color: #c0392b; color: #ffffff; }
.btn-danger:hover { background-color: #a93226; }

.btn-promo { background-color: #f39c12; color: #ffffff; }
.btn-promo:hover { background-color: #e67e22; }

.btn-creator { background-color: #8e44ad; color: #ffffff; }
.btn-creator:hover { background-color: #9b59b6; }

/* Основной контент */
main {
    padding: 40px 0;
}

section {
    margin-bottom: 50px;
}

h2 {
    font-size: 28px;
    margin-bottom: 20px;
    border-left: 5px solid #ffffff;
    padding-left: 15px;
}

h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

/* Панель Creator */
.creator-panel {
    background-color: #111111;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #222222;
}

.upload-zone {
    margin-bottom: 20px;
    border: 2px dashed #333333;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
}

.upload-zone input {
    display: block;
    margin: 15px auto;
    color: #ffffff;
}

.limit-info {
    color: #aaaaaa;
    font-size: 14px;
    margin-top: 5px;
}

.game-list-admin li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a1a1a;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
}

/* Монетизация */
.monetization .cards {
    display: flex;
    gap: 20px;
}

.monetization .card {
    background-color: #111111;
    padding: 25px;
    border-radius: 10px;
    width: calc(50% - 10px);
    border: 1px solid #222222;
    text-align: center;
}

.monetization .card p {
    color: #aaaaaa;
    margin-bottom: 20px;
}

/* Каталог игр */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.game-card {
    background-color: #111111;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #222222;
}

.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.game-card-content {
    padding: 15px;
}

.game-card-content h3 {
    margin-bottom: 5px;
}

.game-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.btn-icon {
    background: none;
    border: none;
    color: #aaaaaa;
    cursor: pointer;
    margin-left: 10px;
}

.btn-icon:hover {
    color: #ffffff;
}

/* Футер */
footer {
    background-color: #111111;
    padding: 30px 0;
    border-top: 1px solid #333333;
    text-align: center;
    font-size: 14px;
    color: #aaaaaa;
}

footer p {
    margin: 5px 0;
}
/* =========================================================
   ADDED: page navigation, animation, avatars, wizard, toasts
   ========================================================= */

/* Page transitions */
.page {
    display: none;
    opacity: 0;
    transform: translateY(12px);
}
.page.active {
    display: block;
}
.page.page-in {
    animation: pageIn 0.35s ease forwards;
}
@keyframes pageIn {
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .page.page-in { animation: none; opacity: 1; transform: none; }
}

.btn-ghost {
    background: transparent;
    color: #ffffff;
    border: 1px solid #333333;
}
.btn-ghost:hover { border-color: #ffffff; }

.btn-secondary { background-color: #333333; color: #ffffff; }
.btn-secondary:hover { background-color: #444444; }

.back-btn { margin-bottom: 20px; }

/* User box in header */
.main-nav { display: flex; align-items: center; gap: 12px; }
.user-box { display: flex; align-items: center; gap: 10px; }
.avatar-mini {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover; border: 1px solid #333333;
}

/* Toasts */
.toast-host {
    position: fixed; top: 20px; right: 20px; z-index: 999;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: #1a1a1a; border: 1px solid #333333;
    padding: 12px 18px; border-radius: 8px; color: #fff;
    opacity: 0; transform: translateX(20px);
    transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-warn { border-color: #f39c12; }
.toast-error { border-color: #c0392b; }

/* Profile page */
.profile-card {
    background: #111111; border: 1px solid #222222;
    border-radius: 10px; padding: 30px;
    display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 30px;
}
.avatar-upload { text-align: center; }
.avatar-large {
    width: 120px; height: 120px; border-radius: 50%;
    object-fit: cover; border: 2px solid #333333; display: block;
    margin: 0 auto 15px;
}
.hint { color: #aaaaaa; font-size: 13px; margin-top: 8px; }
.hint.error { color: #e74c3c; }
.hint.ok { color: #2ecc71; }

.name-edit { display: flex; flex-direction: column; gap: 8px; min-width: 240px; }
.name-edit label { color: #aaaaaa; font-size: 14px; }
.name-edit input {
    background: #1a1a1a; border: 1px solid #333333; color: #fff;
    padding: 10px 14px; border-radius: 6px; font-size: 15px;
}
.save-status { font-size: 12px; color: #2ecc71; min-height: 16px; }

/* Wizard */
.wizard { background: #111111; border: 1px solid #222222; border-radius: 10px; padding: 30px; max-width: 640px; }
.wizard-steps { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0 0 25px; color: #555; font-size: 14px; }
.wizard-steps li.active { color: #ffffff; font-weight: 700; }
.wizard-step { display: none; flex-direction: column; gap: 10px; }
.wizard-step.active { display: flex; animation: pageIn 0.3s ease; }
.wizard-step label { color: #aaaaaa; font-size: 14px; margin-top: 10px; }
.wizard-step input[type="text"], .wizard-step textarea, .wizard-step input[type="file"] {
    background: #1a1a1a; border: 1px solid #333333; color: #fff;
    padding: 10px 14px; border-radius: 6px; font-size: 15px;
}
.wizard-step textarea { resize: vertical; min-height: 70px; font-family: inherit; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 20px; }

.rating-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 10px; margin: 15px 0; }
.rating-option {
    background: #1a1a1a; border: 1px solid #333333; border-radius: 8px;
    padding: 12px; text-align: center; cursor: pointer; display: block;
}
.rating-option input { display: none; }
.rating-option span { display: block; font-size: 18px; font-weight: 700; }
.rating-option small { color: #aaaaaa; font-size: 11px; }
.rating-option:has(input:checked) { border-color: #ffffff; background: #222222; }

.age-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 12px; font-weight: 700; margin-left: 8px; background: #333;
}
.age-18 { background: #c0392b; }
.age-16 { background: #e67e22; }
.age-12 { background: #f1c40f; color: #000; }
.age-6  { background: #27ae60; }
.age-0  { background: #2980b9; }

.card-top-row { display: flex; justify-content: space-between; align-items: center; }
.card-desc { color: #aaaaaa; font-size: 13px; margin: 6px 0; }

.preview-card-wrap { display: flex; justify-content: center; margin: 20px 0; }
.preview-card { max-width: 260px; }

.paywall-note { color: #777; font-size: 12px; margin-top: 10px; }

/* Game detail page */
.game-hero-img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; margin-bottom: 20px; }

/* Comments */
.comments { margin-top: 30px; }
.comment-form { display: flex; gap: 10px; margin-bottom: 20px; }
.comment-form textarea {
    flex: 1; background: #1a1a1a; border: 1px solid #333333; color: #fff;
    padding: 10px 14px; border-radius: 6px; resize: vertical; min-height: 44px; font-family: inherit;
}
.comment { background: #111111; border: 1px solid #222222; border-radius: 8px; padding: 12px 16px; margin-bottom: 8px; }
.comment strong { display: block; font-size: 13px; color: #aaaaaa; margin-bottom: 4px; }

.empty-state { color: #777; text-align: center; padding: 30px 0; }

.no-poster {
    width: 100%; height: 150px; display: flex; align-items: center; justify-content: center;
    background: #1a1a1a; color: #555; font-size: 13px; border-bottom: 1px solid #222;
}
