/**
 * GameCMS UIKit Theme
 * Modern, responsive theme for game download & gift code sites
 */

/* ========== CSS Variables ========== */
:root {
    --gm-primary: #4f46e5;
    --gm-primary-light: #818cf8;
    --gm-primary-dark: #3730a3;
    --gm-accent: #06b6d4;
    --gm-success: #10b981;
    --gm-warning: #f59e0b;
    --gm-danger: #ef4444;
    --gm-bg: #f8fafc;
    --gm-bg-card: #ffffff;
    --gm-bg-hover: #f1f5f9;
    --gm-text: #1e293b;
    --gm-text-dim: #64748b;
    --gm-text-light: #94a3b8;
    --gm-border: #e2e8f0;
    --gm-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --gm-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --gm-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --gm-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --gm-radius: 12px;
    --gm-radius-sm: 8px;
    --gm-radius-lg: 16px;
    --gm-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
}

/* ========== Global ========== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background: var(--gm-bg);
    color: var(--gm-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

pre, code {
    max-width: 100%;
    overflow-x: auto;
}

/* ========== Navbar ========== */
.gm-navbar {
    background: var(--gm-bg-card) !important;
    border-bottom: 1px solid var(--gm-border);
    box-shadow: var(--gm-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.gm-navbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-logo {
    font-size: 20px !important;
    font-weight: 700;
    color: var(--gm-primary) !important;
    gap: 8px;
}

.gm-logo-icon {
    font-size: 24px;
    background: var(--gm-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gm-nav > li > a {
    font-size: 15px;
    font-weight: 500;
    color: var(--gm-text-dim) !important;
    gap: 6px;
    padding: 0 16px !important;
    min-height: 60px !important;
    transition: all 0.2s;
}

.gm-nav > li > a:hover {
    color: var(--gm-primary) !important;
}

.gm-nav > li.uk-active > a {
    color: var(--gm-primary) !important;
    font-weight: 600;
}

.gm-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gm-text-dim);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 18px;
}

.gm-icon-btn:hover {
    background: var(--gm-bg-hover);
    color: var(--gm-primary);
}

/* ========== Mobile Nav ========== */
.gm-offcanvas-bar {
    background: var(--gm-bg-card) !important;
}

.gm-offcanvas-close {
    color: var(--gm-text) !important;
}

.gm-mobile-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--gm-primary);
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--gm-border);
    margin-bottom: 16px;
}

.gm-mobile-logo i {
    font-size: 28px;
}

.gm-mobile-nav > li > a {
    font-size: 15px;
    color: var(--gm-text) !important;
    padding: 12px 0 !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gm-mobile-nav > li.uk-active > a {
    color: var(--gm-primary) !important;
    font-weight: 600;
}

.gm-mobile-nav > li > a i {
    width: 24px;
    text-align: center;
    color: var(--gm-text-light);
}

/* ========== Hero Section ========== */
.gm-hero {
    background: var(--gm-gradient);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.gm-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    pointer-events: none;
}

.gm-hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

.gm-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.gm-hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gm-hero p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.gm-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.gm-hero-stat .num {
    font-size: 32px;
    font-weight: 800;
}

.gm-hero-stat .label {
    font-size: 14px;
    opacity: 0.85;
}

/* ========== Section ========== */
.gm-section {
    padding: 40px 0;
}

.gm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.gm-section-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.gm-section-title i {
    color: var(--gm-primary);
}

.gm-section-more {
    font-size: 14px;
    color: var(--gm-text-dim);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.gm-section-more:hover {
    color: var(--gm-primary);
    gap: 8px;
}

.gm-section-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gm-section-subtitle i {
    color: var(--gm-primary);
}

/* ========== List Header ========== */
.gm-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.gm-list-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gm-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gm-list-title i {
    color: var(--gm-primary);
}

.gm-list-count {
    font-size: 14px;
    color: var(--gm-text-light);
    background: var(--gm-bg);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ========== Filter Bar ========== */
.gm-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.gm-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gm-text-dim);
    background: var(--gm-bg-card);
    border: 1px solid var(--gm-border);
    text-decoration: none;
    transition: all 0.2s;
}

.gm-filter-tag:hover {
    color: var(--gm-primary);
    border-color: var(--gm-primary-light);
}

.gm-filter-active {
    color: #fff;
    background: var(--gm-primary);
    border-color: var(--gm-primary);
}

.gm-filter-active:hover {
    color: #fff;
    background: var(--gm-primary-dark);
    border-color: var(--gm-primary-dark);
}

.gm-filter-count {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.1);
    padding: 1px 6px;
    border-radius: 10px;
    color: inherit;
}

.gm-filter-active .gm-filter-count {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 767px) {
    .gm-list-title {
        font-size: 18px;
    }
    .gm-filter-bar {
        gap: 6px;
        margin-bottom: 16px;
    }
    .gm-filter-tag {
        padding: 4px 10px;
        font-size: 12px;
    }
}

/* ========== Cards ========== */
.gm-card {
    background: var(--gm-bg-card);
    border-radius: var(--gm-radius);
    border: 1px solid var(--gm-border);
    padding: 24px;
    transition: all 0.25s;
    margin-bottom: 20px;
}

.gm-card:hover {
    box-shadow: var(--gm-shadow-md);
}

.gm-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gm-card-title i {
    color: var(--gm-primary);
}

/* ========== Game Cards ========== */
.gm-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.gm-game-card {
    display: block;
    background: var(--gm-bg-card);
    border-radius: var(--gm-radius);
    border: 1px solid var(--gm-border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    position: relative;
}

.gm-game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--gm-shadow-lg);
    border-color: var(--gm-primary-light);
}

.gm-game-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 12px;
    background: var(--gm-bg);
}

.gm-game-card-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
}

.gm-game-card-body {
    padding: 12px;
}

.gm-game-card-name {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
    color: var(--gm-text);
}

.gm-game-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.gm-game-card-platform {
    font-size: 11px;
    color: var(--gm-text-light);
    background: var(--gm-bg);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.gm-game-card-download {
    font-size: 11px;
    color: var(--gm-text-light);
    white-space: nowrap;
}

.gm-game-card-btn {
    font-size: 11px;
    color: var(--gm-primary);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.gm-game-card-gift {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.gm-game-card-gift i {
    font-size: 18px;
    color: var(--gm-danger);
    animation: gm-pulse 2s infinite;
}

@keyframes gm-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* ========== Game Cards Flat ========== */
.gm-game-grid-flat {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.gm-game-card-flat {
    display: flex;
    flex-direction: column;
    background: var(--gm-bg-card);
    border-radius: var(--gm-radius);
    border: 1px solid var(--gm-border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
}

.gm-game-card-flat:hover {
    transform: translateY(-3px);
    box-shadow: var(--gm-shadow-md);
    border-color: var(--gm-primary-light);
}

.gm-game-card-flat-icon {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gm-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gm-game-card-flat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.gm-game-card-flat-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
}

.gm-game-card-flat-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gm-game-card-flat-name {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gm-text);
}

.gm-game-card-flat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.gm-game-card-flat-platform {
    font-size: 11px;
    color: var(--gm-text-light);
    background: var(--gm-bg);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.gm-game-card-flat-action {
    font-size: 12px;
    color: var(--gm-primary);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ========== Article List Flat ========== */
.gm-article-list-flat {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gm-article-item-flat {
    display: flex;
    background: var(--gm-bg-card);
    border-radius: var(--gm-radius);
    border: 1px solid var(--gm-border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
}

.gm-article-item-flat:hover {
    transform: translateY(-2px);
    box-shadow: var(--gm-shadow-md);
    border-color: var(--gm-primary-light);
}

.gm-article-item-flat-cover {
    width: 200px;
    min-height: 140px;
    flex-shrink: 0;
    overflow: hidden;
}

.gm-article-item-flat-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gm-article-item-flat:hover .gm-article-item-flat-cover img {
    transform: scale(1.05);
}

.gm-article-item-flat-noimg {
    background: var(--gm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
}

.gm-article-item-flat-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.gm-article-item-flat-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--gm-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.gm-article-item-flat-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gm-text-light);
}

.gm-article-item-flat-summary {
    font-size: 14px;
    color: var(--gm-text-dim);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .gm-game-grid-flat {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .gm-game-card-flat-body {
        padding: 10px;
    }
    .gm-game-card-flat-name {
        font-size: 12px;
    }
    .gm-game-card-flat-platform {
        font-size: 10px;
        padding: 1px 5px;
        max-width: 50px;
    }
    .gm-game-card-flat-action {
        font-size: 11px;
    }
    .gm-article-item-flat {
        flex-direction: column;
    }
    .gm-article-item-flat-cover {
        width: 100%;
        height: 180px;
    }
    .gm-article-item-flat-body {
        padding: 12px;
    }
    .gm-article-item-flat-title {
        font-size: 15px;
    }
    .gm-article-item-flat-summary {
        font-size: 13px;
    }
}

@media (max-width: 375px) {
    .gm-game-grid-flat {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* ========== Article Cards ========== */
.gm-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gm-article-card {
    display: block;
    background: var(--gm-bg-card);
    border-radius: var(--gm-radius);
    border: 1px solid var(--gm-border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
}

.gm-article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--gm-shadow-md);
    border-color: var(--gm-primary-light);
}

.gm-article-card .gm-mobile-only {
    display: block;
}

.gm-article-card .gm-desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .gm-article-card .gm-mobile-only {
        display: none !important;
    }
    .gm-article-card .gm-desktop-only {
        display: flex !important;
    }
}

.gm-article-card-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.gm-article-card-body {
    padding: 16px;
}

.gm-article-card-title {
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
    color: var(--gm-text);
}

.gm-article-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gm-text-light);
}

/* ========== Post Cards (List) ========== */
.gm-post-card {
    display: flex;
    background: var(--gm-bg-card);
    border-radius: var(--gm-radius);
    border: 1px solid var(--gm-border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    margin-bottom: 16px;
}

.gm-post-card:hover {
    box-shadow: var(--gm-shadow-md);
    border-color: var(--gm-primary-light);
}

.gm-post-cover {
    width: 240px;
    min-height: 160px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.gm-post-content {
    padding: 20px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gm-post-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gm-text);
}

.gm-post-title a {
    color: inherit;
    text-decoration: none;
}

.gm-post-title a:hover {
    color: var(--gm-primary);
}

.gm-post-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gm-text-light);
    margin-bottom: 10px;
}

.gm-post-summary {
    font-size: 14px;
    color: var(--gm-text-dim);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ========== Tags ========== */
.gm-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow: hidden;
}

.gm-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--gm-bg);
    border: 1px solid var(--gm-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--gm-text-dim);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gm-tag:hover {
    background: var(--gm-primary);
    color: #fff;
    border-color: var(--gm-primary);
}

.gm-tag-primary {
    background: var(--gm-primary);
    color: #fff;
    border-color: var(--gm-primary);
}

.gm-tag-primary:hover {
    background: var(--gm-primary-dark);
    border-color: var(--gm-primary-dark);
}

@media (max-width: 480px) {
    .gm-tag-list {
        gap: 6px;
    }
    .gm-tag {
        padding: 4px 10px;
        font-size: 12px;
    }
}

/* ========== Breadcrumb ========== */
.gm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--gm-text-light);
    margin-bottom: 20px;
    flex-wrap: wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
}

.gm-breadcrumb a {
    color: var(--gm-text-dim);
    text-decoration: none;
    white-space: nowrap;
}

.gm-breadcrumb a:hover {
    color: var(--gm-primary);
}

.gm-breadcrumb .sep {
    color: var(--gm-text-light);
    flex-shrink: 0;
    user-select: none;
}

.gm-breadcrumb span:not(.sep) {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .gm-breadcrumb {
        font-size: 13px;
        gap: 4px;
        margin-bottom: 16px;
    }
    .gm-breadcrumb span:not(.sep) {
        max-width: 140px;
    }
}

/* ========== Article Detail ========== */
.gm-article-detail-header {
    padding: 32px;
    border-bottom: 1px solid var(--gm-border);
}

.gm-article-detail-cover {
    margin-bottom: 20px;
    border-radius: var(--gm-radius-sm);
    overflow: hidden;
}

.gm-article-detail-cover img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.gm-article-detail-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--gm-text);
    line-height: 1.4;
    margin: 0 0 16px;
}

.gm-article-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--gm-text-light);
}

.gm-article-detail-meta .gm-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gm-article-detail-meta .gm-meta-item i {
    color: var(--gm-primary);
    font-size: 12px;
}

.gm-article-detail-tags {
    padding: 20px 32px;
    border-top: 1px solid var(--gm-border);
}

.gm-related-articles {
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gm-related-article-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gm-border);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    align-items: flex-start;
}

.gm-related-article-item:last-child {
    border-bottom: none;
}

.gm-related-article-item:hover {
    background: var(--gm-bg-hover);
    border-radius: var(--gm-radius-sm);
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -12px;
    margin-right: -12px;
}

.gm-related-article-cover {
    width: 100px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    object-fit: cover;
}

.gm-related-article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gm-related-article-noimg {
    background: var(--gm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.gm-related-article-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gm-related-article-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gm-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gm-related-article-item:hover .gm-related-article-title {
    color: var(--gm-primary);
}

.gm-related-article-summary {
    font-size: 13px;
    color: var(--gm-text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.gm-related-article-date {
    font-size: 12px;
    color: var(--gm-text-light);
}

@media (max-width: 767px) {
    .gm-article-detail-header {
        padding: 20px;
    }
    .gm-article-detail-title {
        font-size: 20px;
    }
    .gm-article-detail-cover img {
        max-height: 240px;
    }
    .gm-article-detail-tags {
        padding: 16px 20px;
    }
    .article-content {
        padding: 20px;
    }
    .gm-related-article-item {
        flex-direction: column;
        gap: 10px;
    }
    .gm-related-article-cover {
        width: 100%;
        height: 160px;
    }
}

/* ========== Article Content ========== */
.article-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--gm-text-dim);
    word-break: break-word;
    padding: 28px 32px;
}

.article-content p {
    margin-bottom: 16px;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--gm-text);
    margin: 24px 0 12px;
    font-weight: 700;
}

.article-content h2 {
    font-size: 22px;
}

.article-content h3 {
    font-size: 18px;
}

.article-content h4 {
    font-size: 16px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--gm-radius-sm);
    margin: 16px 0;
}

.article-content blockquote {
    border-left: 4px solid var(--gm-primary);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--gm-bg);
    border-radius: 0 var(--gm-radius-sm) var(--gm-radius-sm) 0;
}

.article-content ul,
.article-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content a {
    color: var(--gm-primary);
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content code {
    background: var(--gm-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.article-content pre {
    background: var(--gm-bg);
    padding: 16px;
    border-radius: var(--gm-radius-sm);
    overflow-x: auto;
    margin: 16px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.article-content th,
.article-content td {
    border: 1px solid var(--gm-border);
    padding: 10px 14px;
    text-align: left;
}

.article-content th {
    background: var(--gm-bg);
    font-weight: 600;
    color: var(--gm-text);
}

/* ========== Pagination ========== */
.gm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.gm-pagination a,
.gm-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--gm-radius-sm);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.gm-pagination a {
    color: var(--gm-text);
    background: var(--gm-bg-card);
    border: 1px solid var(--gm-border);
}

.gm-pagination a:hover {
    border-color: var(--gm-primary);
    color: var(--gm-primary);
}

.gm-pagination span {
    color: var(--gm-text-dim);
    font-weight: 400;
    cursor: default;
}

.gm-pagination span.current {
    background: var(--gm-primary);
    color: #fff;
    font-weight: 600;
}

/* ========== Forms ========== */
.gm-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gm-border);
    border-radius: var(--gm-radius-sm);
    background: var(--gm-bg);
    color: var(--gm-text);
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
}

.gm-input:focus {
    border-color: var(--gm-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.gm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 28px;
    border-radius: var(--gm-radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.gm-btn-primary {
    background: var(--gm-gradient);
    color: #fff;
}

.gm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    color: #fff;
}

.gm-btn-secondary {
    background: var(--gm-bg);
    color: var(--gm-text-dim);
    border: 1.5px solid var(--gm-border);
}

.gm-btn-secondary:hover {
    border-color: var(--gm-primary);
    color: var(--gm-primary);
}

.gm-btn-success {
    background: var(--gm-success);
    color: #fff;
}

.gm-btn-danger {
    background: var(--gm-danger);
    color: #fff;
}

.gm-btn-download {
    padding: 12px 24px;
    border-radius: var(--gm-radius-sm);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.gm-btn-android {
    background: #3ddc84;
    color: #fff;
}

.gm-btn-android:hover {
    background: #2fc46f;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 220, 132, 0.3);
}

.gm-btn-ios {
    background: #007aff;
    color: #fff;
}

.gm-btn-ios:hover {
    background: #0066d6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* ========== Comments ========== */
.gm-comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gm-comment-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--gm-bg);
    border-radius: var(--gm-radius-sm);
}

.gm-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.gm-comment-body {
    flex: 1;
    min-width: 0;
}

.gm-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.gm-comment-nick {
    font-weight: 600;
    font-size: 14px;
}

.gm-comment-time {
    font-size: 12px;
    color: var(--gm-text-light);
}

.gm-comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gm-text-dim);
    word-break: break-word;
}

.gm-comment-reply-btn {
    background: none;
    border: none;
    color: var(--gm-primary);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 8px;
    margin-left: auto;
}

/* ========== Footer ========== */
.gm-footer {
    background: var(--gm-text);
    color: #94a3b8;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.gm-footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.gm-footer-col {
    flex: 1 1 200px;
    min-width: 200px;
}

.gm-footer-brand {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.gm-footer-brand i {
    color: var(--gm-primary-light);
}

.gm-footer-desc {
    font-size: 14px;
    line-height: 1.6;
    max-width: 300px;
}

.gm-footer-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.gm-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gm-footer-links li {
    margin-bottom: 10px;
}

.gm-footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.gm-footer-links a:hover {
    color: #fff;
}

.gm-footer-bottom {
    border-top: 1px solid #334155;
    margin-top: 24px;
    padding-top: 16px;
    text-align: center;
}

.gm-footer-copy {
    font-size: 13px;
    margin-bottom: 8px;
}

.gm-footer-powered {
    font-size: 12px;
    color: #94a3b8;
}

.gm-footer-powered a {
    color: #818cf8;
    text-decoration: none;
    transition: color 0.2s;
}

.gm-footer-powered a:hover {
    color: #6366f1;
    text-decoration: underline;
}

.gm-footer-icp {
    font-size: 12px;
}

.gm-footer-icp a {
    color: #94a3b8;
    text-decoration: none;
}

.gm-footer-extra {
    font-size: 12px;
    margin-top: 8px;
}

/* ========== Friend Links ========== */
.gm-friendlinks-section {
    background: var(--gm-bg-card);
    border-top: 1px solid var(--gm-border);
}

.gm-friendlinks {
    gap: 12px;
}

.gm-friendlink {
    font-size: 13px;
    color: var(--gm-text-dim);
    text-decoration: none;
    padding: 6px 14px;
    background: var(--gm-bg);
    border-radius: 20px;
    transition: all 0.2s;
}

.gm-friendlink:hover {
    background: var(--gm-primary);
    color: #fff;
}

/* ========== Empty State ========== */
.gm-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--gm-text-light);
}

.gm-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.gm-empty p {
    font-size: 15px;
}

/* ========== Alert ========== */
.gm-alert {
    padding: 12px 16px;
    border-radius: var(--gm-radius-sm);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.gm-alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.gm-alert-error {
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.12);
}

/* ========== Game Detail ========== */
.gm-game-detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.gm-game-detail-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--gm-radius);
    object-fit: cover;
    flex-shrink: 0;
}

.gm-game-detail-info {
    flex: 1;
    min-width: 0;
}

.gm-game-detail-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.gm-game-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--gm-text-dim);
}

.gm-detail-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: 24px;
}

.gm-detail-hero {
    position: relative;
    padding: 32px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.gm-detail-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gm-gradient);
    opacity: 0.05;
    pointer-events: none;
}

.gm-detail-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
}

.gm-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--gm-radius);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--gm-shadow-md);
}

.gm-detail-icon-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--gm-radius);
    background: var(--gm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    flex-shrink: 0;
    box-shadow: var(--gm-shadow-md);
}

.gm-detail-info {
    flex: 1;
    min-width: 0;
}

.gm-detail-name {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 10px;
    color: var(--gm-text);
}

.gm-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--gm-text-dim);
}

.gm-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gm-detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 16px;
}

.gm-detail-actions .gm-btn {
    flex: 0 1 auto;
    min-width: 140px;
    max-width: 200px;
}

.gm-detail-body {
    padding: 24px 32px 32px;
}

.gm-detail-section {
    margin-bottom: 24px;
}

.gm-detail-section:last-child {
    margin-bottom: 0;
}

.gm-detail-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gm-text);
}

.gm-detail-section-title i {
    color: var(--gm-primary);
}

.gm-detail-section-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--gm-text-dim);
    word-break: break-word;
}

.gm-gift-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--gm-text-light);
    background: var(--gm-bg);
    padding: 2px 8px;
    border-radius: 10px;
}

.gm-gift-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 24px 24px;
}

.gm-gift-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--gm-bg);
    border-radius: var(--gm-radius);
    transition: all 0.2s;
    border: 1px solid var(--gm-border);
    position: relative;
}

.gm-gift-item:hover {
    border-color: var(--gm-primary-light);
    background: var(--gm-bg-hover);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.gm-gift-item-left {
    flex: 1;
    min-width: 0;
}

.gm-gift-item-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gm-gift-type {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.gm-type-universal {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.gm-type-exclusive {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
}

.gm-gift-item-desc {
    font-size: 13px;
    color: var(--gm-text-dim);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}

.gm-gift-item-time {
    font-size: 12px;
    color: var(--gm-text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.gm-gift-item-time::before {
    content: '\f017';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
}

.gm-gift-item-right {
    flex-shrink: 0;
}

.gm-gift-exhausted {
    font-size: 13px;
    color: var(--gm-text-light);
    padding: 8px 16px;
    background: var(--gm-bg);
    border-radius: var(--gm-radius-sm);
    border: 1px dashed var(--gm-border);
}

.gm-btn-claim {
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-primary-dark));
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--gm-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gm-btn-claim:hover {
    background: linear-gradient(135deg, var(--gm-primary-dark), var(--gm-primary));
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
    transform: translateY(-1px);
}

.gm-btn-claimed {
    background: var(--gm-success) !important;
    color: #fff !important;
}

.gm-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    padding: 20px 24px 24px;
}

.gm-related-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 12px;
    border-radius: var(--gm-radius-sm);
    transition: all 0.2s;
    text-align: center;
}

.gm-related-item:hover {
    background: var(--gm-bg-hover);
}

.gm-related-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--gm-radius-sm);
    object-fit: cover;
    margin-bottom: 8px;
}

.gm-related-icon-placeholder {
    width: 60px;
    height: 60px;
    border-radius: var(--gm-radius-sm);
    background: var(--gm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    margin-bottom: 8px;
}

.gm-related-name {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.gm-related-platform {
    font-size: 11px;
    color: var(--gm-text-light);
    margin-top: 2px;
}

@media (max-width: 767.98px) {
    .gm-detail-hero {
        padding: 20px;
        gap: 16px;
    }
    .gm-detail-hero-content {
        gap: 16px;
    }
    .gm-detail-icon,
    .gm-detail-icon-placeholder {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
    .gm-detail-name {
        font-size: 20px;
    }
    .gm-detail-actions {
        width: 100%;
    }
    .gm-detail-actions .gm-btn {
        flex: 1;
        min-width: 0;
        max-width: none;
    }
    .gm-detail-body {
        padding: 16px 20px 20px;
    }
    .gm-related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 16px 20px 20px;
    }
}

@media (min-width: 768px) and (max-width: 959px) {
    .gm-detail-actions .gm-btn {
        min-width: 160px;
        max-width: 220px;
    }
}

/* ========== Gift Row ========== */
.gm-gift-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    background: var(--gm-bg-card);
    margin-bottom: 10px;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
}

.gm-gift-row:hover {
    border-color: var(--gm-primary-light);
    box-shadow: var(--gm-shadow-sm);
}

.gm-gift-row-info {
    flex: 1;
    min-width: 0;
}

.gm-gift-row-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gm-gift-tag {
    font-size: 10px;
    background: var(--gm-warning);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
}

.gm-gift-tag-blue {
    background: var(--gm-accent);
}

.gm-gift-row-desc {
    font-size: 13px;
    color: var(--gm-text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gm-gift-count {
    font-size: 12px;
    color: var(--gm-text-light);
    background: var(--gm-bg);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.gm-gift-captcha {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gm-gift-captcha input {
    width: 90px;
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
    border: 1.5px solid var(--gm-border);
    border-radius: 6px;
    outline: none;
}

.gm-gift-captcha input:focus {
    border-color: var(--gm-primary);
}

.gm-gift-captcha img {
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--gm-border);
}

.gm-gift-result {
    width: 100%;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}

.gm-gift-result-success {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.gm-gift-result-error {
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.12);
}

.gm-gift-code {
    margin-top: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    border-radius: 8px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    word-break: break-all;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: all;
}

/* ========== Screenshot ========== */
.gm-screenshot-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gm-screenshot-scroll::-webkit-scrollbar {
    display: none;
}

.gm-screenshot-img {
    max-height: 280px;
    border-radius: var(--gm-radius);
    flex-shrink: 0;
    box-shadow: var(--gm-shadow);
}

/* ========== Sidebar Widgets ========== */
.gm-sidebar-widget {
    background: var(--gm-bg-card);
    border-radius: var(--gm-radius);
    border: 1px solid var(--gm-border);
    padding: 20px;
    margin-bottom: 20px;
}

.gm-sidebar-widget-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gm-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gm-sidebar-widget-title i {
    color: var(--gm-primary);
}

.gm-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--gm-border);
    transition: all 0.2s;
}

.gm-sidebar-item:last-child {
    border-bottom: none;
}

.gm-sidebar-item:hover {
    color: var(--gm-primary);
}

.gm-sidebar-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.gm-sidebar-item-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--gm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.gm-sidebar-item-info {
    flex: 1;
    min-width: 0;
}

.gm-sidebar-item-name {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gm-sidebar-item-meta {
    font-size: 11px;
    color: var(--gm-text-light);
    margin-top: 2px;
}

/* ========== User Center ========== */
.gm-uc-header {
    background: var(--gm-gradient);
    border-radius: var(--gm-radius-lg);
    padding: 32px;
    color: #fff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.gm-uc-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.gm-uc-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
    background: #fff;
}

.gm-uc-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
}

.gm-uc-email {
    font-size: 13px;
    opacity: 0.85;
    margin: 0 0 8px;
}

.gm-uc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.gm-uc-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: var(--gm-bg-card);
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    padding: 8px;
}

.gm-uc-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--gm-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--gm-text-dim);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
}

.gm-uc-nav-item:hover {
    background: var(--gm-bg-hover);
    color: var(--gm-text);
}

.gm-uc-nav-item.active {
    background: var(--gm-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}

.gm-uc-nav-badge {
    background: var(--gm-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ========== Table ========== */
.gm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--gm-radius-sm);
    border: 1px solid var(--gm-border);
}

.gm-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
    min-width: 500px;
}

.gm-table thead th {
    text-align: left;
    padding: 12px 14px;
    font-weight: 600;
    color: var(--gm-text);
    background: var(--gm-bg);
    border-bottom: 2px solid var(--gm-border);
    white-space: nowrap;
}

.gm-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--gm-border);
    color: var(--gm-text-dim);
}

.gm-table tbody tr:last-child td {
    border-bottom: none;
}

.gm-table tbody tr:hover td {
    background: var(--gm-bg-hover);
}

/* ========== Download Buttons ========== */
.gm-download-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.gm-download-btns .gm-btn {
    flex: 0 1 auto;
    min-width: 140px;
    max-width: 240px;
    width: auto;
}

@media (max-width: 767px) {
    .gm-download-btns {
        flex-wrap: nowrap;
        padding: 0 12px;
    }
    .gm-download-btns .gm-btn {
        flex: 1;
        min-width: 0;
        width: auto;
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (min-width: 768px) and (max-width: 959px) {
    .gm-download-btns {
        flex-wrap: wrap;
        gap: 10px;
    }
    .gm-download-btns .gm-btn {
        min-width: 160px;
        max-width: 220px;
        width: auto;
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (min-width: 960px) {
    .gm-download-btns .gm-btn {
        min-width: 140px;
        max-width: 200px;
        width: 100%;
    }
}

.gm-mobile-only {
    display: block;
}

.gm-desktop-only {
    display: none;
}

/* ========== Responsive ========== */
@media (max-width: 959.98px) {
    .gm-mobile-only {
        display: block !important;
    }
    .gm-desktop-only {
        display: none !important;
    }
    
    .gm-game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
    .gm-article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gm-post-card {
        flex-direction: column;
    }
    .gm-post-cover {
        width: 100%;
        height: 200px;
    }
    
    .gm-gift-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}

@media (min-width: 960px) {
    .gm-mobile-only {
        display: none !important;
    }
    .gm-desktop-only {
        display: block !important;
    }
    
    .gm-gift-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (max-width: 767.98px) {
    .gm-hero {
        padding: 40px 0;
    }
    .gm-hero::before {
        width: 150px;
        height: 150px;
        top: -15%;
        right: -3%;
    }
    .gm-hero::after {
        width: 100px;
        height: 100px;
        bottom: -10%;
        left: -3%;
    }
    .gm-hero-stats {
        gap: 24px;
    }
    .gm-hero-stat .num {
        font-size: 24px;
    }
    .gm-section {
        padding: 24px 0;
    }
    .gm-game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .gm-game-card-body {
        padding: 10px;
    }
    .gm-game-card-name {
        font-size: 12px;
    }
    .gm-article-grid {
        grid-template-columns: 1fr;
    }
    .gm-footer-grid {
        text-align: center;
    }
    .gm-footer-desc {
        margin: 0 auto 24px;
    }
    .gm-game-detail-header {
        gap: 14px;
    }
    .gm-game-detail-icon {
        width: 80px;
        height: 80px;
    }
    .gm-game-detail-name {
        font-size: 20px;
    }
    .gm-gift-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .gm-gift-captcha {
        justify-content: center;
    }
    .gm-download-btns .gm-btn {
        max-width: none;
        width: 100%;
    }
    .gm-screenshot-img {
        max-height: 200px;
    }
    #gift-codes-section {
        padding: 16px !important;
    }
    .gm-gift-list {
        padding: 12px 16px 16px;
        gap: 10px;
    }
    .gm-gift-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }
    .gm-gift-item-right {
        display: flex;
        justify-content: flex-end;
    }
    .gm-gift-row {
        padding: 10px !important;
    }
    .gm-card {
        padding: 16px !important;
    }
}

@media (max-width: 480px) {
    .gm-game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .gm-game-card-img {
        padding: 8px;
    }
    .gm-game-card-body {
        padding: 8px;
    }
    .gm-game-card-name {
        font-size: 11px;
    }
    .gm-game-card-platform {
        font-size: 10px;
        padding: 1px 5px;
        max-width: 50px;
    }
    .gm-section-title {
        font-size: 17px;
    }
    .gm-post-content {
        padding: 14px;
    }
    .gm-post-title {
        font-size: 15px;
    }
    .gm-uc-header {
        padding: 20px;
    }
    .gm-uc-avatar {
        width: 60px;
        height: 60px;
        border-width: 3px;
    }
    .gm-uc-name {
        font-size: 18px;
    }
    .gm-uc-nav-item {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1;
        justify-content: center;
    }
    .gm-search-form {
        padding: 4px 4px 4px 14px;
    }
    .gm-search-input {
        font-size: 14px;
        padding: 10px 0;
    }
    .gm-search-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* ========== Search Page ========== */
.gm-search-page-section {
    min-height: 70vh;
}

.gm-search-header {
    text-align: center;
    padding: 24px 20px 32px;
}

.gm-search-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gm-text);
    margin: 0 0 8px;
}

.gm-search-title i {
    color: var(--gm-primary);
    margin-right: 8px;
}

.gm-search-desc {
    font-size: 14px;
    color: var(--gm-text-dim);
    margin: 0;
}

.gm-search-form-wrapper {
    max-width: 640px;
    margin: 0 auto 32px;
    padding: 0 20px;
}

.gm-search-form-container {
    display: flex;
    align-items: center;
    background: var(--gm-bg-card);
    border: 1.5px solid var(--gm-border);
    border-radius: 16px;
    padding: 6px 6px 6px 20px;
    transition: all .3s;
    box-shadow: var(--gm-shadow);
}

.gm-search-form-container:focus-within {
    border-color: var(--gm-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .08);
}

.gm-search-input-field {
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 16px;
    color: var(--gm-text);
    outline: none;
    flex: 1;
    min-width: 0;
}

.gm-search-quick-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.gm-search-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--gm-text-dim);
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--gm-bg-card);
    border: 1px solid var(--gm-border);
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
}

.gm-search-quick-link:hover {
    color: var(--gm-primary);
    border-color: var(--gm-primary-light);
}

.gm-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.gm-search-tag {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--gm-bg-card);
    border: 1px solid var(--gm-border);
    font-size: 13px;
    color: var(--gm-text-dim);
    text-decoration: none;
    transition: all .2s;
}

.gm-search-tag:hover {
    border-color: var(--gm-primary);
    color: var(--gm-primary);
}

.gm-search-results-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gm-border);
    flex-wrap: wrap;
}

.gm-search-results-count {
    font-size: 14px;
    color: var(--gm-text-dim);
}

.gm-search-results-count strong {
    color: var(--gm-primary);
}

.gm-search-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gm-text);
}

.gm-search-section-title i {
    color: var(--gm-primary);
}

.gm-search-count-badge {
    font-size: 13px;
    font-weight: 500;
    color: var(--gm-text-light);
    background: var(--gm-bg);
    padding: 2px 8px;
    border-radius: 10px;
}

.gm-search-results-section {
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .gm-search-title {
        font-size: 24px;
    }
    .gm-search-input-field {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gm-search-header {
        padding: 20px 16px 24px;
    }
    .gm-search-title {
        font-size: 20px;
    }
    .gm-search-desc {
        font-size: 13px;
    }
    .gm-search-form-wrapper {
        padding: 0 16px;
    }
    .gm-search-form-container {
        padding: 4px 4px 4px 14px;
    }
    .gm-search-input-field {
        font-size: 13px;
        padding: 10px 0;
    }
    .gm-search-quick-links {
        gap: 8px;
        margin-bottom: 24px;
    }
    .gm-search-quick-link {
        padding: 6px 12px;
        font-size: 13px;
    }
    .gm-search-tags {
        gap: 6px;
        margin-bottom: 24px;
    }
    .gm-search-tag {
        padding: 4px 10px;
        font-size: 12px;
    }
}

/* ========== 404 Page ========== */
.gm-404-section {
    min-height: 60vh;
}

.gm-404-content {
    text-align: center;
    padding: 80px 20px;
}

.gm-404-title {
    font-size: 80px;
    color: var(--gm-primary);
    margin: 0 0 20px 0;
    font-weight: 800;
    line-height: 1;
}

.gm-404-subtitle {
    font-size: 24px;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.gm-404-desc {
    font-size: 16px;
    color: var(--gm-text-dim);
    margin: 0 0 30px 0;
}

.gm-404-btn {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    display: inline-block;
    text-decoration: none;
}

@media (max-width: 768px) {
    .gm-404-content {
        padding: 60px 20px;
    }
    .gm-404-title {
        font-size: 60px;
    }
    .gm-404-subtitle {
        font-size: 20px;
    }
    .gm-404-desc {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gm-404-content {
        padding: 40px 16px;
    }
    .gm-404-title {
        font-size: 48px;
        margin-bottom: 16px;
    }
    .gm-404-subtitle {
        font-size: 18px;
        margin-bottom: 16px;
    }
    .gm-404-desc {
        font-size: 13px;
        margin-bottom: 24px;
    }
    .gm-404-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    .gm-404-title {
        font-size: 40px;
    }
    .gm-404-subtitle {
        font-size: 16px;
    }
    .gm-404-desc {
        font-size: 12px;
    }
}

@media (max-width: 375px) {
    .gm-game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== Utility ========== */
.gm-text-primary { color: var(--gm-primary) !important; }
.gm-text-success { color: var(--gm-success) !important; }
.gm-text-danger { color: var(--gm-danger) !important; }
.gm-text-warning { color: var(--gm-warning) !important; }
.gm-text-dim { color: var(--gm-text-dim) !important; }
.gm-text-light { color: var(--gm-text-light) !important; }
.gm-bg-card { background: var(--gm-bg-card) !important; }

img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img.gm-lazy-loaded {
    opacity: 1;
}

/* ========== Gift Card ========== */
.gm-gift-card:hover {
    border-color: var(--gm-primary-light);
    box-shadow: var(--gm-shadow-sm);
    transform: translateY(-2px);
}

/* ========== Gift Modal ========== */
#giftModal {
    transition: opacity 0.3s ease;
    opacity: 0;
}

#giftModal.show {
    opacity: 1;
}

.gift-modal-content {
    transition: transform 0.3s ease;
    transform: translateY(20px);
}

#giftModal .gift-modal-content {
    transform: translateY(0);
}

#giftModal .gm-gift-code {
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: all;
}

#giftModal .gm-gift-code:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ========== Toast ========== */
.gm-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.gm-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.gm-toast-success {
    background: #10b981;
    color: #fff;
}

.gm-toast-error {
    background: #ef4444;
    color: #fff;
}

.gm-toast-info {
    background: var(--gm-bg-card);
    color: var(--gm-text);
    border: 1px solid var(--gm-border);
}