*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #0b0c10;
    color: #f5f5f5;
}

a {
    color: #ffcc33;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px;
}

.site-header {
    background: linear-gradient(135deg, #111827, #020617);
    border-bottom: 1px solid #1f2937;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 10px;
}

.logo a {
    font-weight: 800;
    font-size: 20px;
    color: #ffffff;
}

.logo span {
    color: #ffcc33;
}

.header-search form {
    display: flex;
    gap: 6px;
}

.header-search input {
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid #374151;
    background: #020617;
    color: #f9fafb;
    min-width: 160px;
}

.header-search button {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    background: #ffcc33;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
}

.main-nav a {
    font-size: 14px;
    color: #d1d5db;
}

.cat-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.cat-nav a {
    font-size: 12px;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #1f2937;
    background: #020617;
}

.ads-bar {
    padding: 8px 0 10px;
}

.site-main {
    padding: 14px 0 40px;
}

.page-title {
    font-size: 20px;
    margin: 0 0 6px;
}

.lead {
    font-size: 14px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.game-card {
    background: #020617;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
}

.game-card:hover {
    border-color: #ffcc33;
}

.game-icon {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-icon {
    font-weight: 700;
    color: #9ca3af;
}

.placeholder-icon.large {
    font-size: 26px;
}

.game-name {
    font-size: 14px;
    margin: 6px 0 0;
    color: #f9fafb;
}

.game-rating {
    font-size: 12px;
    color: #facc15;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.game-rating .count {
    color: #9ca3af;
    font-size: 11px;
}

.game-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-small {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    border: none;
    cursor: pointer;
}

.btn-small.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #f9fafb;
    font-weight: 600;
}

.btn-small.secondary {
    background: #111827;
    color: #e5e7eb;
}

.pagination {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination a,
.pagination span {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid #374151;
}

.pagination .current {
    background: #ffcc33;
    color: #111827;
    border-color: #ffcc33;
}

.game-detail-header {
    display: flex;
    gap: 14px;
    background: #020617;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #1f2937;
    margin-bottom: 14px;
}

.icon-large img {
    width: 90px;
    height: 90px;
    border-radius: 18px;
    object-fit: cover;
}

.game-meta h1 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 6px;
}

.rating-summary .avg {
    font-weight: 700;
}

.rating-summary .stars {
    color: #facc15;
}

.rating-breakdown {
    font-size: 11px;
    color: #9ca3af;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.rating-row .bar {
    flex: 1;
    background: #111827;
    border-radius: 999px;
    overflow: hidden;
}

.rating-row .bar span {
    display: block;
    height: 6px;
    background: #facc15;
}

.rating-row .num {
    width: 24px;
    text-align: right;
}

.rating-form {
    margin-top: 8px;
}

.rating-form label {
    font-size: 13px;
    display: block;
    margin-bottom: 4px;
}

.stars-input {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.stars-input input {
    display: none;
}

.stars-input span {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 999px;
    background: #111827;
    border: 1px solid #1f2937;
    font-size: 12px;
}

.rating-form button {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 999px;
    border: none;
    background: #ffcc33;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
}

.game-heading {
    font-size: 18px;
    margin: 10px 0;
}

.download-section {
    margin: 10px 0;
}

.btn-download {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #f9fafb;
    font-weight: 700;
    font-size: 14px;
}

.screenshots {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin: 8px 0;
}

.screenshots figure {
    min-width: 160px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1f2937;
}

.screenshots img {
    width: 100%;
    display: block;
}

.game-content {
    font-size: 14px;
    line-height: 1.6;
    color: #e5e7eb;
}

.comments {
    margin-top: 18px;
    padding-top: 8px;
    border-top: 1px solid #1f2937;
}

.comment-form .field {
    margin-bottom: 8px;
}

.comment-form label {
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #374151;
    background: #020617;
    color: #f9fafb;
    font-size: 13px;
}

.comment-form button {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    background: #ffcc33;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.comment-list li {
    padding: 8px 0;
    border-bottom: 1px solid #1f2937;
}

.comment-list .author {
    font-weight: 600;
    font-size: 13px;
}

.comment-list .date {
    font-size: 11px;
    color: #9ca3af;
}

.comment-list .text {
    font-size: 13px;
    margin-top: 2px;
}

.related-games {
    margin-top: 18px;
}

.site-footer {
    border-top: 1px solid #1f2937;
    background: #020617;
    padding: 14px 0 20px;
    font-size: 12px;
}

.footer-inner {
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.footer-links a {
    color: #9ca3af;
}

@media (min-width: 768px) {
    .header-search input {
        min-width: 220px;
    }
}

