/*
Theme Name: SEGA Codes Archive
Theme URI: https://sega-codes.ru
Author: Your Name
Author URI: https://your-site.ru
Description: Тема для архива кодов, секретов и Game Genie для игр SEGA Mega Drive / Genesis
Version: 1.0
License: GPL v2 or later
Text Domain: sega-codes
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #071018;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #d9e3ee;
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    color: #2d8cff;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 1500px;
    max-width: 95%;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== HEADER ===== */
.site-header {
    background: #0b131d;
    border-bottom: 1px solid #1a2c40;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.site-logo {
    font-family: 'Oswald', sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: #2d8cff;
    letter-spacing: 1px;
    line-height: 1;
}

.site-logo small {
    display: block;
    font-size: 11px;
    color: #9bb2c7;
    margin-top: -4px;
    letter-spacing: 1px;
    font-weight: 400;
}

.site-logo a {
    color: inherit;
}

.main-nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li a {
    font-weight: 500;
    color: #b9c9d7;
    font-size: 14px;
    transition: .2s;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a,
.main-nav ul li.current_page_item a {
    color: #2d8cff;
}

.header-search {
    background: #101b27;
    border: 1px solid #1f3550;
    padding: 8px 14px;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    width: 200px;
    font-family: 'Inter', sans-serif;
    transition: .2s;
}

.header-search:focus {
    outline: none;
    border-color: #2d8cff;
}

.header-search::placeholder {
    color: #5a738a;
}

/* ===== HERO BANNER ===== */
.hero-banner {
    margin-top: 25px;
    background: linear-gradient(135deg, #0b1a30 0%, #0d1723 100%);
    border: 1px solid #1f3550;
    border-radius: 10px;
    padding: 35px 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(45, 140, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-banner .hero-content {
    position: relative;
    z-index: 1;
}

.hero-banner h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 36px;
    margin-bottom: 8px;
    line-height: 1.15;
}

.hero-banner h1 span {
    color: #2d8cff;
}

.hero-banner p {
    font-size: 15px;
    color: #9bb2c7;
    max-width: 460px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.hero-stats {
    display: flex;
    gap: 30px;
}

.hero-stats .stat {
    display: flex;
    flex-direction: column;
}

.hero-stats .stat .number {
    font-family: 'Oswald', sans-serif;
    font-size: 26px;
    color: #2d8cff;
    line-height: 1;
}

.hero-stats .stat .label {
    font-size: 12px;
    color: #8ba2b8;
    margin-top: 2px;
}

.hero-search {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    background: #101b27;
    padding: 5px;
    border-radius: 8px;
    border: 1px solid #1f3550;
}

.hero-search input {
    background: transparent;
    border: none;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    width: 240px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.hero-search input::placeholder {
    color: #5a738a;
}

.hero-search .search-btn {
    padding: 10px 28px;
    background: #2369ff;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: .2s;
}

.hero-search .search-btn:hover {
    background: #1a52cc;
}

/* ===== MAIN GRID ===== */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
    margin-top: 28px;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 600;
}

.section-header .view-all {
    color: #2d8cff;
    font-size: 13px;
    font-weight: 500;
}

.section-header .view-all:hover {
    text-decoration: underline;
}

/* ===== GAME GRID ===== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 35px;
}

.game-card {
    background: #0d1723;
    border: 1px solid #22364d;
    border-radius: 8px;
    overflow: hidden;
    transition: .25s;
}

.game-card:hover {
    border-color: #2d8cff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 140, 255, 0.08);
}

.game-card .game-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid #22364d;
    display: block;
}

.game-card .card-body {
    padding: 13px 15px;
}

.game-card .card-body h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    margin-bottom: 3px;
    line-height: 1.2;
}

.game-card .card-body .game-meta {
    font-size: 12px;
    color: #8ba2b8;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.game-card .card-body .game-meta span {
    background: #111d2a;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: #b9c9d7;
}

/* ===== RECENT CODES ===== */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 35px;
}

.recent-item {
    background: #0d1723;
    border: 1px solid #22364d;
    border-radius: 6px;
    padding: 13px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: .2s;
}

.recent-item:hover {
    border-color: #2d8cff;
}

.recent-item .code-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recent-item .code-info .game-name {
    font-weight: 600;
    font-size: 14px;
}

.recent-item .code-info .game-name a {
    color: #d9e3ee;
}

.recent-item .code-info .code-desc {
    font-size: 13px;
    color: #8ba2b8;
}

.recent-item .code-badge {
    background: #1a2c40;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    color: #b9c9d7;
    white-space: nowrap;
}

/* ===== SIDEBAR ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-block {
    background: #0d1723;
    border: 1px solid #22364d;
    border-radius: 8px;
    padding: 18px 20px;
}

.sidebar-block h3,
.sidebar-block .widget-title {
    font-family: 'Oswald', sans-serif;
    font-size: 17px;
    margin-bottom: 12px;
    color: #2d8cff;
    letter-spacing: 0.5px;
}

.sidebar-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-block ul li {
    padding: 7px 0;
    border-bottom: 1px solid #1a2c40;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-block ul li:last-child {
    border-bottom: none;
}

.sidebar-block ul li .dot {
    color: #2d8cff;
    font-size: 14px;
    line-height: 1;
}

.sidebar-block ul li .tag,
.sidebar-block ul li .post-date {
    display: inline-block;
    background: #1a2c40;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: #b9c9d7;
    margin-left: auto;
}

.sidebar-block ul li .count {
    color: #8ba2b8;
    font-size: 12px;
    margin-left: auto;
}

.sidebar-block .featured-game {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #1a2c40;
}

.sidebar-block .featured-game:last-child {
    border-bottom: none;
}

.sidebar-block .featured-game .info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-block .featured-game .info .name {
    font-weight: 600;
    font-size: 14px;
}

.sidebar-block .featured-game .info .detail {
    font-size: 12px;
    color: #8ba2b8;
}

/* ===== SINGLE GAME PAGE ===== */
.single-game .game-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
    background: #0d1723;
    border: 1px solid #22364d;
    border-radius: 8px;
    padding: 22px 25px;
    margin-bottom: 25px;
}

.single-game .game-header .cover-wrapper img {
    width: 100%;
    border-radius: 6px;
    border: 2px solid #27496d;
}

.single-game .game-header .info h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 34px;
    margin-bottom: 12px;
    line-height: 1.1;
}

.single-game .game-header .badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.single-game .game-header .badge {
    background: #111d2a;
    padding: 5px 12px;
    border: 1px solid #22364d;
    border-radius: 5px;
    font-size: 12px;
}

.single-game .game-header .game-description {
    font-size: 14px;
    line-height: 1.7;
    color: #b8c8d8;
}

.single-game .game-tabs {
    display: flex;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.single-game .game-tab {
    padding: 12px 26px;
    background: #0d1723;
    border: 1px solid #22364d;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 17px;
    transition: .2s;
    border-bottom: none;
}

.single-game .game-tab.active {
    background: #2369ff;
    border-color: #2369ff;
}

.single-game .tab-panel {
    display: none;
    background: #0d1723;
    border: 1px solid #22364d;
    border-top: none;
    padding: 25px;
}

.single-game .tab-panel.active {
    display: block;
}

.single-game .tab-panel .notice {
    padding: 14px 18px;
    background: #0b2036;
    border: 1px solid #245589;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.single-game .code-card {
    background: #111b27;
    border: 1px solid #22364d;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.single-game .code-card h3 {
    margin-bottom: 4px;
    font-size: 16px;
}

.single-game .code-card .code-input {
    font-family: monospace;
    background: #0b131d;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #1f3550;
    margin-top: 3px;
    color: #2d8cff;
    font-size: 14px;
}

/* ===== COVER WRAPPER ===== */
.cover-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cover-container {
    position: relative;
}

/* ===== COVER SWITCHER ===== */
.cover-switcher {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    background: #111b27;
    border-radius: 6px;
    border: 1px solid #1a2c40;
}

.switcher-label {
    font-size: 12px;
    color: #8ba2b8;
    font-weight: 500;
}

.switcher-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cover-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #0d1723;
    border: 1px solid #1a2c40;
    border-radius: 4px;
    color: #8ba2b8;
    font-size: 12px;
    cursor: pointer;
    transition: .2s;
    font-family: 'Inter', sans-serif;
}

.cover-btn:hover {
    border-color: #2d8cff;
    color: #d9e3ee;
}

.cover-btn.active {
    background: #2369ff;
    border-color: #2369ff;
    color: #fff;
}

.cover-btn .flag-icon {
    width: 16px;
    height: 11px;
}

/* ===== PLATFORM SWITCH ===== */
.platform-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #0b2036;
    border: 1px solid #245589;
    border-radius: 4px;
    font-size: 13px;
}

.platform-label {
    color: #8ba2b8;
}

.platform-name {
    color: #2d8cff;
    font-weight: 600;
}

/* ===== VERSION ITEMS IN SIDEBAR ===== */
.version-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #111b27;
    border-radius: 6px;
    border: 1px solid #1a2c40;
    transition: .2s;
}

.version-item.has-data {
    border-color: #2d8cff;
}

.version-item .version-flag {
    display: flex;
    align-items: center;
    gap: 10px;
}

.version-item .version-label {
    font-size: 13px;
    font-weight: 500;
    color: #b9c9d7;
}

.version-item .version-code .code-number {
    font-family: monospace;
    font-size: 14px;
    color: #2d8cff;
    font-weight: 600;
}

.version-item .version-code .no-data {
    font-size: 12px;
    color: #5a738a;
}

/* ===== FLAGS ===== */
.flag-icon {
    display: inline-block;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    flex-shrink: 0;
    border: 1px solid #1a2c40;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.flag-us {
    background-image: url('/wp-content/uploads/2026/06/us.svg');
}

.flag-eu {
    background-image: url('/wp-content/uploads/2026/06/eu.svg');
}

.flag-jp {
    background-image: url('/wp-content/uploads/2026/06/jp.svg');
}

/* Размеры для флагов в сайдбаре */
.version-item .flag-icon {
    width: 20px;
    height: 14px;
}

/* Размеры для флагов в кнопках переключения обложек */
.cover-btn .flag-icon {
    width: 16px;
    height: 11px;
}

/* ===== SUBSCRIPTION FORM ===== */
.subscribe-form {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.subscribe-form input {
    flex: 1;
    padding: 10px 14px;
    background: #101b27;
    border: 1px solid #1f3550;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.subscribe-form input::placeholder {
    color: #5a738a;
}

.subscribe-form button {
    padding: 10px 20px;
    background: #2369ff;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: .2s;
    white-space: nowrap;
}

.subscribe-form button:hover {
    background: #1a52cc;
}

/* ===== INFO ROWS ===== */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
    border-bottom: 1px solid #162433;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: #8ba2b8;
}

.info-row .value {
    color: #d9e3ee;
    font-weight: 500;
}

/* ===== FOOTER ===== */
.site-footer {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid #21364d;
    text-align: center;
    color: #8ba2b8;
    font-size: 13px;
}

.site-footer .footer-menu {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 12px;
    list-style: none;
    padding: 0;
}

.site-footer .footer-menu li a {
    font-size: 13px;
    color: #b9c9d7;
}

.site-footer .footer-menu li a:hover {
    color: #2d8cff;
}

/* ============================================================
   НОВЫЕ СТИЛИ ДЛЯ GAME GENIE ТАБЛИЦЫ
   ============================================================ */
.subversions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.subversions button {
    flex: 1;
    padding: 12px 20px;
    background: #101c28;
    border: 1px solid #28435f;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: .2s;
    min-width: 80px;
}

.subversions button:hover {
    border-color: #2d8cff;
    color: #d9e3ee;
}

.subversions button.active {
    background: #2369ff;
    border-color: #2369ff;
}

/* ===== GAME GENIE TABLE ===== */
.gg-table table {
    width: 100%;
    border-collapse: collapse;
}

.gg-table th {
    background: #121d29;
    padding: 12px 16px;
    font-size: 14px;
    text-align: left;
    font-weight: 600;
    color: #b9c9d7;
}

.gg-table td {
    padding: 12px 16px;
    border-top: 1px solid #1a2c40;
    font-size: 14px;
}

.gg-table tr:hover td {
    background: #111b27;
}

.gg-table tr td:first-child {
    font-family: monospace;
    color: #2d8cff;
}

/* ============================================================
   НОВЫЕ СТИЛИ ДЛЯ ПЕРЕКЛЮЧАТЕЛЯ ПЛАТФОРМ
   ============================================================ */
.version-box .version-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.version-box .version-buttons button {
    padding: 11px 16px;
    background: #121f2d;
    border: 1px solid #28425e;
    color: #fff;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: .2s;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: left;
}

.version-box .version-buttons button:hover {
    border-color: #2d8cff;
}

.version-box .version-buttons button.active {
    background: #2369ff;
    border-color: #2369ff;
}

/* ============================================================
   НОВЫЕ СТИЛИ ДЛЯ ВЕРСИЙ ОБЛОЖЕК (КОРОТКИЕ НАЗВАНИЯ)
   ============================================================ */
.cover-btn .short-label {
    display: none;
}

/* Показываем короткие названия на мобильных */
@media (max-width: 480px) {
    .cover-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
    .cover-btn .full-label {
        display: none;
    }
    .cover-btn .short-label {
        display: inline;
    }
}

/* ============================================================
   НОВЫЕ СТИЛИ ДЛЯ ВЕРСИЙ В САЙДБАРЕ
   ============================================================ */
.version-item .version-platform {
    font-size: 11px;
    color: #5a738a;
    margin-left: 6px;
}

.version-item.has-data .version-platform {
    color: #8ba2b8;
}

/* ============================================================
   СТИЛИ ДЛЯ ФЛАГОВ В КНОПКАХ ОБЛОЖЕК
   ============================================================ */
.cover-btn .flag-icon {
    width: 16px;
    height: 11px;
    flex-shrink: 0;
}

/* ============================================================
   АНИМАЦИЯ ПРИ ПЕРЕКЛЮЧЕНИИ ОБЛОЖЕК
   ============================================================ */
#game-cover {
    transition: opacity 0.3s ease;
}

#game-cover.fade {
    opacity: 0;
}

/* ============================================================
   RESPONSIVE ДОПОЛНЕНИЯ
   ============================================================ */
@media (max-width: 1100px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .hero-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px 25px;
        gap: 20px;
    }
    .hero-banner p {
        max-width: 100%;
    }
    .hero-banner .hero-stats {
        justify-content: center;
    }
    .hero-banner .hero-search {
        width: 100%;
        flex-wrap: wrap;
    }
    .hero-banner .hero-search input {
        width: 100%;
    }
    .hero-banner .hero-search .search-btn {
        width: 100%;
    }
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .single-game .game-header {
        grid-template-columns: 1fr;
    }
    .single-game .game-header .cover-wrapper img {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 14px 0;
        gap: 10px;
    }
    .main-nav ul {
        flex-wrap: wrap;
        gap: 14px;
    }
    .main-nav ul li a {
        font-size: 13px;
    }
    .header-search {
        width: 100%;
    }
    .site-logo {
        font-size: 28px;
    }
    .hero-banner h1 {
        font-size: 28px;
    }
    .hero-banner .hero-stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .recent-item {
        flex-wrap: wrap;
        gap: 6px;
    }
    .site-footer .footer-menu {
        flex-wrap: wrap;
        gap: 14px;
    }
    .single-game .game-header .info h1 {
        font-size: 26px;
    }
    .single-game .game-tab {
        padding: 10px 16px;
        font-size: 15px;
        flex: 1;
        text-align: center;
    }
    .single-game .game-tabs {
        flex-wrap: wrap;
    }
    .single-game .game-header {
        padding: 16px 18px;
    }
    .single-game .tab-panel {
        padding: 18px;
    }
    .cover-switcher {
        padding: 8px 10px;
    }
    .cover-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
    .switcher-buttons {
        gap: 4px;
    }
    .version-item {
        padding: 6px 10px;
    }
    .version-item .version-label {
        font-size: 12px;
    }
    .version-item .version-code .code-number {
        font-size: 12px;
    }
    .subversions {
        flex-wrap: wrap;
    }
    .subversions button {
        flex: 1 0 auto;
        min-width: 60px;
        padding: 10px 14px;
        font-size: 13px;
    }
    .gg-table th,
    .gg-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    .gg-table td:first-child {
        font-size: 12px;
    }
}

/* ===== ОБЫЧНЫЕ КОДЫ ТАБЛИЦА ===== */
.codes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

.codes-table thead th {
    background: #121d29;
    padding: 10px 16px;
    font-size: 13px;
    text-align: left;
    font-weight: 600;
    color: #b9c9d7;
    border-bottom: 2px solid #1a2c40;
}

.codes-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #1a2c40;
    font-size: 14px;
    vertical-align: middle;
}

.codes-table tbody tr:hover td {
    background: #111b27;
}

.codes-table tbody td:first-child {
    font-weight: 600;
    color: #d9e3ee;
}

.codes-table .code-combo {
    font-family: monospace;
    background: #0b131d;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #1f3550;
    color: #2d8cff;
    font-size: 13px;
    display: inline-block;
}

.table-wrapper {
    margin-bottom: 5px;
}

/* Адаптив для мобильных */
@media (max-width: 600px) {
    .codes-table thead th,
    .codes-table tbody td {
        padding: 8px 10px;
        font-size: 13px;
    }
    .codes-table .code-combo {
        font-size: 12px;
        padding: 3px 8px;
    }
}