/**
 * ============================================
 * FILE: games.css
 * FUNGSI: Styling untuk halaman games library
 * DESIGN: Selaras dengan food_menu.css — poster clean,
 *         filter compact, warna dari var index.css
 * ============================================
 */

 @import url('index.css');

 /* ============================================
    ADDITIONAL VARIABLES
    ============================================ */
 :root {
     /* Genre badge — satu warna saja, konsisten dengan tema neon */
     --badge-bg:     rgba(255,0,255,.12);
     --badge-border: rgba(255,0,255,.30);
     --badge-color:  var(--primary-color);
 
     --card-radius:  14px;
     --price-color:  #f5a623; /* amber — sama dengan food_menu */
 }
 
 /* ============================================
    BASE
    ============================================ */
 body {
     background: var(--bg-dark);
     color: var(--text-primary);
     overflow-x: hidden;
 }
 
 /* ============================================
    HERO
    ============================================ */
 .games-hero {
     background: var(--gradient-dark);
     border-bottom: 3px solid var(--primary-color);
     padding: 3rem 0;
     position: relative;
     overflow: hidden;
 }
 
 /* Animated grid background */
 .games-hero::before {
     content: '';
     position: absolute;
     inset: 0;
     background-image:
         linear-gradient(rgba(255,0,255,.04) 1px, transparent 1px),
         linear-gradient(90deg, rgba(0,255,255,.04) 1px, transparent 1px);
     background-size: 30px 30px;
     will-change: transform;
     animation: gridMove 20s linear infinite;
     pointer-events: none;
 }
 
 @keyframes gridMove {
     0%   { transform: translateY(0); }
     100% { transform: translateY(30px); }
 }
 
 .hero-content-games {
     position: relative;
     z-index: 1;
 }
 
 /* Back Button */
 .btn-back-gaming {
     display: inline-flex;
     align-items: center;
     gap: .75rem;
     background: var(--bg-card);
     border: 2px solid var(--primary-color);
     border-radius: var(--radius-sm);
     padding: .75rem 1.5rem;
     color: var(--text-primary);
     font-family: var(--font-game);
     font-size: .9rem;
     text-decoration: none;
     text-transform: uppercase;
     transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
     margin-bottom: 2rem;
 }
 
 .btn-back-gaming:hover {
     background: var(--gradient-neon);
     color: var(--bg-dark);
     border-color: transparent;
     transform: translateX(-5px);
 }
 
 /* Library Header */
 .library-header {
     display: flex;
     align-items: center;
     gap: 2rem;
     margin-bottom: 2rem;
 }
 
 .header-icon {
     width: 100px;
     height: 100px;
     background: var(--gradient-neon);
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 3rem;
     color: var(--bg-dark);
     flex-shrink: 0;
     will-change: transform;
     animation: iconFloat 3s ease-in-out infinite;
 }
 
 @keyframes iconFloat {
     0%, 100% { transform: translateY(0); }
     50%       { transform: translateY(-10px); }
 }
 
 .header-content { flex: 1; }
 
 .library-title {
     font-family: var(--font-game);
     font-size: clamp(2rem, 6vw, 3.5rem);
     color: var(--text-glow);
     margin: 0 0 .5rem 0;
     text-shadow: 0 0 20px rgba(0,255,255,.5);
     animation: titleGlow 2s ease-in-out infinite;
 }
 
 @keyframes titleGlow {
     0%, 100% { text-shadow: 0 0 20px rgba(0,255,255,.5); }
     50%       { text-shadow: 0 0 35px rgba(0,255,255,.85), 0 0 60px rgba(255,0,255,.3); }
 }
 
 .library-subtitle {
     font-size: 1.1rem;
     color: var(--text-secondary);
     margin: 0;
 }
 
 /* Stats Bar */
 .stats-bar {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
     gap: 1.5rem;
 }
 
 .stat-item {
     display: flex;
     align-items: center;
     gap: 1rem;
     background: var(--bg-card);
     border: 2px solid var(--primary-color);
     border-radius: var(--radius-md);
     padding: 1.5rem;
     transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
 }
 
 .stat-item:hover {
     border-color: var(--secondary-color);
     transform: translateY(-5px);
     box-shadow: 0 10px 30px rgba(0,255,255,.3);
 }
 
 .stat-icon {
     width: 60px;
     height: 60px;
     background: var(--gradient-neon);
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1.8rem;
     color: var(--bg-dark);
     flex-shrink: 0;
 }
 
 .stat-content { flex: 1; }
 
 .stat-number {
     font-family: var(--font-game);
     font-size: 1.8rem;
     color: var(--text-glow);
     line-height: 1;
     margin-bottom: .5rem;
 }
 
 .stat-label {
     font-size: .85rem;
     color: var(--text-secondary);
     text-transform: uppercase;
 }
 
 /* ============================================
    MAIN CONTAINER
    ============================================ */
 .games-container {
     padding: 2.5rem 1rem 4rem;
     max-width: 1400px;
 }
 
 /* ============================================
    FILTER SECTION — selaras food_menu
    ============================================ */
 .filter-section {
     background: var(--bg-card);
     border: 2px solid var(--primary-color);
     border-radius: var(--radius-lg);
     padding: 1.5rem 1.75rem;
     margin-bottom: 1.5rem;
     box-shadow: var(--shadow-md);
 }
 
 /* Baris atas: judul + search */
 .filter-top-row {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 1rem;
     margin-bottom: 1.1rem;
     flex-wrap: wrap;
 }
 
 .filter-title {
     font-family: var(--font-game);
     font-size: 1.1rem;
     color: var(--text-glow);
     margin: 0;
     display: flex;
     align-items: center;
     gap: .6rem;
     white-space: nowrap;
 }
 
 /* Search */
 .search-box {
     position: relative;
     flex: 1;
     min-width: 200px;
     max-width: 380px;
 }
 
 .search-icon {
     position: absolute;
     left: 14px;
     top: 50%;
     transform: translateY(-50%);
     color: var(--primary-color);
     font-size: .85rem;
     pointer-events: none;
 }
 
 .search-input {
     width: 100%;
     background: var(--bg-dark);
     border: 1.5px solid var(--primary-color);
     border-radius: 40px;
     padding: 9px 16px 9px 38px;
     color: var(--text-primary);
     font-family: var(--font-display);
     font-size: .88rem;
     transition: border-color .2s, box-shadow .2s;
 }
 
 .search-input::placeholder { color: var(--text-secondary); }
 
 .search-input:focus {
     outline: none;
     border-color: var(--secondary-color);
     box-shadow: 0 0 16px rgba(0,255,255,.2);
 }
 
 /* Baris bawah: genre select + counter */
 .filter-bottom-row {
     display: flex;
     align-items: center;
     gap: 14px;
     flex-wrap: wrap;
 }
 
 /* Genre select */
 .genre-filter-wrap {
     position: relative;
     display: flex;
     align-items: center;
 }
 
 .genre-select-icon {
     position: absolute;
     left: 14px;
     color: var(--secondary-color);
     font-size: .78rem;
     pointer-events: none;
     z-index: 1;
 }
 
 .genre-select {
     background: var(--bg-dark);
     border: 1.5px solid rgba(255,255,255,.12);
     border-radius: 40px;
     padding: 7px 36px 7px 34px;
     color: var(--text-secondary);
     font-family: var(--font-display);
     font-size: .82rem;
     cursor: pointer;
     appearance: none;
     background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2300d4ff'/%3E%3C/svg%3E");
     background-repeat: no-repeat;
     background-position: right 14px center;
     transition: border-color .2s;
     min-width: 180px;
 }
 
 .genre-select:focus {
     outline: none;
     border-color: var(--secondary-color);
     color: var(--text-primary);
 }
 
 /* Counter */
 .game-count-info {
     margin-left: auto;
     display: flex;
     align-items: center;
     gap: 7px;
     font-size: .8rem;
     color: var(--text-secondary);
     font-family: var(--font-display);
 }
 
 .game-count-info i {
     color: var(--secondary-color);
     font-size: .75rem;
 }
 
 /* ============================================
    INFO BANNER — selaras food_menu
    ============================================ */
 .info-banner {
     display: flex;
     align-items: center;
     gap: 12px;
     background: rgba(0,255,255,.04);
     border: 1px solid rgba(0,255,255,.2);
     border-radius: var(--radius-md);
     padding: 13px 18px;
     margin-bottom: 2rem;
 }
 
 .banner-icon {
     width: 40px;
     height: 40px;
     background: var(--secondary-color);
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1rem;
     color: var(--bg-dark);
     flex-shrink: 0;
 }
 
 .banner-content {
     flex: 1;
     font-size: .84rem;
     color: var(--text-secondary);
     line-height: 1.5;
 }
 
 .banner-content strong {
     color: var(--text-primary);
     display: block;
     margin-bottom: 2px;
 }
 
 /* ============================================
    GAMES GRID
    ============================================ */
 .games-grid {
     display: grid;
     grid-template-columns: repeat(6, 1fr);
     gap: 16px;
     margin-bottom: 3rem;
 }
 
 /* Empty state */
 .games-empty {
     grid-column: 1 / -1;
     text-align: center;
     padding: 60px 20px;
     color: var(--text-secondary);
 }
 
 .games-empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
 
 /* ============================================
    GAME CARD — poster 2:3, clean, no overlay
    ============================================ */
 .game-card {
     background: var(--bg-card);
     border: 1.5px solid rgba(255,255,255,.07);
     border-radius: var(--card-radius);
     overflow: hidden;
     transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
     cursor: default;
 }
 
 .game-card:hover {
     transform: translateY(-4px);
     border-color: rgba(0,255,255,.35);
     box-shadow: 0 12px 32px rgba(0,255,255,.1);
 }
 
 /* Cover — rasio 2:3 standar poster game */
 .game-cover-container {
     position: relative;
     width: 100%;
     aspect-ratio: 2 / 3;
     overflow: hidden;
     background: var(--bg-dark);
 }
 
 .game-cover {
     width: 100%;
     height: 100%;
     object-fit: cover;
     object-position: center;
     display: block;
     transition: transform .35s ease;
 }
 
 .game-card:hover .game-cover {
     transform: scale(1.04);
 }
 
 /* Gradient scrim bawah untuk keterbacaan badge */
 .game-cover-container::after {
     content: '';
     position: absolute;
     inset: 0;
     background: linear-gradient(
         to bottom,
         rgba(0,0,0,.45) 0%,
         transparent 35%,
         transparent 60%,
         rgba(0,0,0,.55) 100%
     );
     pointer-events: none;
 }
 
 /* ── Genre badge — kanan atas ── */
 .genre-badge {
     position: absolute;
     top: 8px;
     right: 8px;
     z-index: 2;
     display: inline-flex;
     align-items: center;
     gap: 4px;
     padding: 3px 9px;
     border-radius: 30px;
     background: var(--badge-bg);
     border: 1px solid var(--badge-border);
     color: var(--badge-color);
     font-family: var(--font-pixel, var(--font-display));
     font-size: .6rem;
     font-weight: 700;
     letter-spacing: .4px;
     text-transform: uppercase;
     max-width: calc(100% - 16px);
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }
 
 .genre-badge i { font-size: .55rem; flex-shrink: 0; }
 
 /* ── Game info bawah card ── */
 .game-info {
     padding: 9px 11px 11px;
     background: var(--bg-card);
 }
 
 .game-title {
     font-family: 'Syne', var(--font-game);
     font-weight: 700;
     font-size: .82rem;
     color: var(--text-primary);
     margin: 0;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
     line-height: 1.35;
     min-height: 2.2em;
 }
 
 /* ============================================
    NO RESULTS
    ============================================ */
 .no-results {
     text-align: center;
     padding: 5rem 2rem;
 }
 
 .no-results-icon {
     font-size: 3rem;
     color: var(--secondary-color);
     opacity: .4;
     margin-bottom: 1rem;
 }
 
 .no-results h3 {
     font-family: var(--font-game);
     font-size: 1.5rem;
     color: var(--text-primary);
     margin-bottom: .5rem;
 }
 
 .no-results p {
     color: var(--text-secondary);
     font-size: .9rem;
 }
 
 /* ============================================
    FOOTER
    ============================================ */
 .games-footer {
     background: var(--gradient-dark);
     border-top: 3px solid var(--primary-color);
     padding: 4rem 0;
     margin-top: 0;
 }
 
 .footer-content { text-align: center; }
 
 .footer-info h4 {
     font-family: var(--font-game);
     font-size: 1.5rem;
     color: var(--text-glow);
     margin-bottom: 1rem;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: .75rem;
 }
 
 .footer-info h4 i { color: var(--primary-color); }
 
 .footer-info p {
     color: var(--text-secondary);
     font-size: 1.1rem;
     margin-bottom: 2rem;
 }
 
 .footer-actions {
     display: flex;
     justify-content: center;
     gap: 1rem;
     flex-wrap: wrap;
 }
 
 .btn-footer-action {
     display: inline-flex;
     align-items: center;
     gap: .75rem;
     background: var(--gradient-neon);
     padding: 1rem 2rem;
     border-radius: var(--radius-md);
     color: var(--bg-dark);
     font-family: var(--font-game);
     font-size: .95rem;
     text-decoration: none;
     text-transform: uppercase;
     transition: transform .2s ease, box-shadow .2s ease;
     box-shadow: 0 4px 0 var(--primary-color);
 }
 
 .btn-footer-action:hover {
     color: var(--bg-dark);
     transform: translateY(-2px);
     box-shadow: 0 6px 0 var(--primary-color), 0 10px 20px rgba(255,0,255,.4);
 }
 
 .btn-footer-action.secondary {
     background: var(--bg-card);
     color: var(--text-primary);
     border: 2px solid var(--primary-color);
     box-shadow: none;
 }
 
 .btn-footer-action.secondary:hover {
     background: var(--primary-color);
     color: var(--bg-dark);
 }
 
 /* ============================================
    RESPONSIVE BREAKPOINTS
    ============================================ */
 
 /* Large desktop 1400px+ */
 @media (min-width: 1400px) {
     .games-grid { grid-template-columns: repeat(7, 1fr); }
 }
 
 /* Desktop 1200–1399 */
 @media (min-width: 1200px) and (max-width: 1399px) {
     .games-grid { grid-template-columns: repeat(6, 1fr); }
 }
 
 /* Desktop small 992–1199 */
 @media (min-width: 992px) and (max-width: 1199px) {
     .games-grid { grid-template-columns: repeat(5, 1fr); }
 }
 
 /* Tablet 768–991 */
 @media (min-width: 768px) and (max-width: 991px) {
     .games-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
     .filter-top-row { flex-wrap: wrap; }
     .search-box { max-width: 100%; width: 100%; }
 }
 
 /* Mobile — max 767px */
 @media (max-width: 767px) {
 
     /* Hero */
     .games-hero { padding: 1.25rem 0; }
     .games-hero::before { animation: none; }
 
     .header-icon {
         width: 52px; height: 52px;
         font-size: 1.6rem;
         animation: none;
     }
 
     .library-header { gap: .85rem; margin-bottom: 1rem; }
     .library-title  { font-size: 1.3rem; animation: none; }
     .library-subtitle { font-size: .78rem; }
 
     /* Stats — 3 kolom compact */
     .stats-bar { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
 
     .stat-item {
         flex-direction: column;
         align-items: center;
         text-align: center;
         padding: .65rem .4rem;
         gap: .35rem;
         border-radius: var(--radius-sm);
     }
     .stat-item:hover { transform: none; }
     .stat-icon  { width: 34px; height: 34px; font-size: 1rem; }
     .stat-number { font-size: 1.05rem; margin-bottom: .1rem; }
     .stat-label  { font-size: .58rem; }
 
     /* Container */
     .games-container { padding: 1rem .75rem 2rem; }
 
     /* Filter */
     .filter-section {
         padding: 1rem;
         border-radius: var(--radius-md);
         margin-bottom: 1rem;
     }
 
     .filter-top-row   { margin-bottom: .85rem; flex-wrap: wrap; }
     .filter-title     { font-size: .95rem; }
     .search-box       { max-width: 100%; width: 100%; }
     .search-input     { font-size: .85rem; }
 
     .filter-bottom-row { gap: 8px; }
 
     .genre-select     { min-width: 0; width: 100%; font-size: .8rem; }
     .genre-filter-wrap { flex: 1; }
 
     .game-count-info {
         margin-left: 0;
         font-size: .75rem;
         width: 100%;
     }
 
     /* Banner */
     .info-banner {
         padding: .85rem 1rem;
         gap: .75rem;
         margin-bottom: 1rem;
     }
 
     .banner-icon    { width: 34px; height: 34px; font-size: .9rem; }
     .banner-content { font-size: .78rem; }
 
     /* Grid — hard 3 kolom di HP */
     .games-grid {
         grid-template-columns: repeat(3, 1fr);
         gap: 9px;
         margin-bottom: 1.5rem;
     }
 
     /* Card compact */
     .game-card { border-radius: 10px; }
     .game-card:hover { transform: none; box-shadow: none; }
     .game-card:hover .game-cover { transform: none; }
 
     .genre-badge {
         top: 5px; right: 5px;
         font-size: .5rem;
         padding: 2px 6px;
         gap: 2px;
         border-radius: 8px;
     }
 
     .game-info  { padding: 6px 8px 8px; }
     .game-title { font-size: .65rem; min-height: unset; }
 
     /* No results */
     .no-results    { padding: 3rem 1.5rem; }
     .no-results-icon { font-size: 2.5rem; }
     .no-results h3 { font-size: 1.2rem; }
 
     /* Footer */
     .games-footer       { padding: 2rem 0; }
     .footer-info h4     { font-size: 1.1rem; }
     .footer-info p      { font-size: .88rem; margin-bottom: 1.25rem; }
     .footer-actions     { flex-direction: column; gap: .65rem; padding: 0 1rem; }
     .btn-footer-action  { width: 100%; justify-content: center; font-size: .85rem; }
 }
 
 /* Extra small — max 480px */
 @media (max-width: 480px) {
     .games-grid { gap: 7px; }
 
     .genre-badge    { display: none; }
     .game-info      { padding: 5px 7px 7px; }
     .game-title     { font-size: .6rem; }
 
     .library-title  { font-size: 1.1rem; }
     .header-icon    { width: 42px; height: 42px; font-size: 1.3rem; }
 }
 
 /* ============================================
    ACCESSIBILITY
    ============================================ */
 @media (prefers-reduced-motion: reduce) {
     *, *::before, *::after {
         animation-duration: .01ms !important;
         animation-iteration-count: 1 !important;
         transition-duration: .01ms !important;
     }
 }
 
 /* ============================================
    PRINT
    ============================================ */
 @media print {
     .games-hero,
     .filter-section,
     .info-banner,
     .games-footer { display: none; }
 
     .games-grid { grid-template-columns: repeat(5, 1fr); }
 }