/* ==========================================
   RESET
========================================== */
      * {
        box-sizing: border-box;
      }
      :root {
          --ink: #14171c;
          --ink-soft: #363b42;
          --muted: #7b818a;
          --line: #e5e7ea;
          --cream: #f8f9fa;
          --paper: #ffffff;
          --accent: #4a5568;
          --accent-deep: #2d3748;
          --slate: #64748b;
          --slate-deep: #475569;
          --sky: #3b82c4;
          --sky-deep: #2a6aa8;
          --sky-soft: #ebf3fa;
      }
/* ==========================================
   FONTS
========================================== */
      @font-face {
        font-family: heavy;
        src: url(https://www.sudokuki.org/assets/fonts/heavy.otf);
        font-display: swap;
      }

      @font-face {
        font-family: black;
        src: url(https://www.sudokuki.org/assets/fonts/black.otf);
        font-display: swap;
      }

      @font-face {
        font-family: bold;
        src: url(https://www.sudokuki.org/assets/fonts/bold.otf);
        font-display: swap;
      }

      @font-face {
        font-family: semibold;
        src: url(https://www.sudokuki.org/assets/fonts/semibold.otf);
        font-display: swap;
      }

      @font-face {
        font-family: regular;
        src: url(https://www.sudokuki.org/assets/fonts/regular.otf);
        font-display: swap;
      }

/* ==========================================
   BODY
========================================== */
      body {
        margin: 0;
        background: #f5f5f5;
        display: flex;
        flex-direction: column;
        align-items: center;
      }

      .container {
        max-width: 720px;
        padding: 0 20px;
      }

      /* ══════════ MASTHEAD ══════════ */
	.masthead {
		padding: 0.5rem 0.5rem 0.5rem;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom : 1px solid #eee;
	}
	
	.masthead-brand {
		font-family: 'heavy';
		font-size: 1.1rem;
		letter-spacing: -0.015em;
		color: var(--ink);
	}
	
	.masthead-brand span {
		color: var(--accent);
		font-style: italic;
		font-weight: 600;
	}
	
	.masthead-tag {
		font-family: 'heavy';
		font-size: 0.6rem;
		letter-spacing: 0.2em;
		text-transform: uppercase;
		color: var(--muted);
		margin-left: 7px;
		text-decoration: none;
	}

/* ==========================================
   NEWS TICKER
========================================== */
      .category-menu {
        width: 100%;
        background: #fff;
        position: relative;
        z-index: 100;
        margin: 0 0 15px 0;
        isolation: isolate;
      }

/* ==========================================
   TICKER BAR
========================================== */
      .ticker-bar {
        width: 100%;
        height: 42px;
        display: flex;
        align-items: stretch;
        overflow: hidden;
        position: relative;
      }

/* ==========================================
   LATEST LABEL
========================================== */
      .ticker-label {
        width: 95px;
        min-width: 95px;
        height: 42px;
        flex: 0 0 95px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0 20px 0 14px;
        background: #e00000;
        color: #fff;
        font-family: "black";
        font-size: 12px;
        letter-spacing: .5px;
        position: relative;
        z-index: 10;
        clip-path: polygon(0 0,
            82% 0,
            100% 50%,
            82% 100%,
            0 100%);
      }

/* ==========================================
   TICKER WINDOW
========================================== */
      .ticker-window {
        flex: 1 1 auto;
        min-width: 0;
        height: 42px;
        overflow: hidden;
        position: relative;
        z-index: 1;
      }

/* ==========================================
   MOVING TRACK
========================================== */
      .ticker-track {
        display: flex;
        align-items: center;
        width: max-content;
        animation: newsTicker 35s linear infinite;
        will-change: transform;
      }

/* ==========================================
   NEWS ITEM
========================================== */
      .ticker-item {
        display: flex;
        align-items: center;
        height: 42px;
        padding: 0 25px;
        color: #111;
        text-decoration: none;
        font-family: "semibold";
        font-size: 13px;
        white-space: nowrap;
        position: relative;
      }

      /* Separator */
      .ticker-item::after {
        content: "•";
        position: absolute;
        right: 0;
        color: #e00000;
        font-size: 16px;
      }

/* ==========================================
   ANIMATION
========================================== */
      @keyframes newsTicker {
        from {
          transform: translateX(0);
        }

        to {
          transform: translateX(-50%);
        }
      }

      /* Pause when mouse is over ticker */
      .ticker-window:hover .ticker-track {
        animation-play-state: paused;
      }

/* ==========================================
   HAMBURGER
========================================== */
      .menu-toggle {
        width: 48px;
        min-width: 48px;
        height: 42px;
        flex: 0 0 48px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 0;
        border-left: 1px solid #e5e5e5;
        background: #fff;
        cursor: pointer;
        padding: 0;
        position: relative;
        z-index: 20;
      }

      .menu-toggle span {
        width: 20px;
        height: 2px;
        background: #111;
        border-radius: 2px;
        transition:
          transform .3s ease,
          opacity .2s ease,
          width .3s ease;
      }

/* ==========================================
   HAMBURGER → X
========================================== */
      .menu-toggle.open span:nth-child(1) {
        transform:
          translateY(7px) rotate(45deg);
      }

      .menu-toggle.open span:nth-child(2) {
        opacity: 0;
        width: 0;
      }

      .menu-toggle.open span:nth-child(3) {
        transform:
          translateY(-7px) rotate(-45deg);
      }

/* ==========================================
   DROPDOWN MENU
========================================== */
      .category-dropdown {
        display: grid;
        grid-template-rows: 0fr;
        opacity: 0;
        overflow: hidden;
        transition:
          grid-template-rows .35s ease,
          opacity .25s ease;
      }

      .category-dropdown.open {
        grid-template-rows: 1fr;
        opacity: 1;
      }

      .dropdown-inner {
        min-height: 0;
        overflow: hidden;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        border-top: 1px solid #eee;
      }

      .dropdown-item {
        min-height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #111;
        text-decoration: none;
        font-family: "bold";
        font-size: 14px;
        border-right: 1px solid #eee;
        border-bottom: 1px solid #eee;
        transition:
          background .2s ease,
          color .2s ease;
      }

      .dropdown-item:hover {
        background: #f5f5f5;
        color: #e00000;
      }

      @media (max-width: 600px) {
        .ticker-bar {
          height: 40px;
        }

        .ticker-label {
          padding: 0 10px;
          font-size: 10px;
        }

        .ticker-item {
          height: 40px;
          padding: 0 18px;
          font-size: 12px;
        }

        .menu-toggle {
          width: 44px;
          height: 40px;
        }

        .dropdown-inner {
          grid-template-columns: repeat(2, 1fr);
        }
      }

/* ==========================================
   MAIN CONTAINER
========================================== */
      .games-container {
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
        padding: 20px;
      }

/* ==========================================
   HEADER
========================================== */
      .games-header {
        padding: 20px 0 15px;
      }

      .games-header h1 {
        margin: 0;
        font-family: black;
        font-size: 42px;
        line-height: 1;
        text-transform: uppercase;
      }

      .games-header p {
        margin: 10px 0 0;
        font-family: regular;
        font-size: 15px;
        color: #666;
      }

/* ==========================================
   GAMES CATEGORY FILTER
========================================== */
      .category-filter {
        position: relative;
        z-index: 1;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 18px 0;
        margin: 0;
        scrollbar-width: none;
        isolation: isolate;
      }

      .category-filter::-webkit-scrollbar {
        display: none;
      }

      .category-filter a {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 0 15px;
        border: 1px solid #111;
        border-radius: 3px;
        text-decoration: none;
        color: #111;
        background: #fff;
        font-family: semibold;
        font-size: 12px;
        text-transform: uppercase;
        white-space: nowrap;
        transition:
          background .2s ease,
          color .2s ease;
      }

      .category-filter a:hover {
        background: #111;
        color: #fff;
      }

      .category-filter a.active {
        background: #111;
        color: #fff;
      }

/* ==========================================
   GAME COUNT
========================================== */
      .games-count {
        margin-bottom: 15px;
        font-family: semibold;
        font-size: 13px;
        color: #666;
      }

/* ==========================================
   GAME GRID
========================================== */
      .games-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
      }

/* ==========================================
   GAME CARD
========================================== */
      .game-card {
        display: block;
        background: #fff;
        text-decoration: none;
        color: #111;
        border: 1px solid #e2e2e2;
        border-radius: 5px;
        overflow: hidden;
        transition:
          transform .2s ease,
          box-shadow .2s ease;
      }

      .game-card:hover {
        transform: translateY(-3px);
        box-shadow:
          0 5px 15px rgba(0, 0, 0, .10);
      }

/* ==========================================
   GAME IMAGE
========================================== */
      .game-image-wrap {
        width: 100%;
        aspect-ratio: 1 / 1;
        background: #eee;
        overflow: hidden;
      }

      .game-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .3s ease;
      }

      .game-card:hover .game-image {
        transform: scale(1.04);
      }

/* ==========================================
   GAME CONTENT
========================================== */
      .game-content {
        padding: 12px;
      }

      .game-title {
        margin: 0;
        font-family: semibold;
        font-size: 17px;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
      }

      .game-description {
        margin: 7px 0 0;
        font-family: regular;
        font-size: 13px;
        line-height: 1.35;
        color: #666;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
      }

/* ==========================================
   CATEGORY BADGE
========================================== */
      .game-category {
        display: inline-block;
        margin-top: 10px;
        padding: 4px 7px;
        background: #f1f1f1;
        color: #555;
        border-radius: 3px;
        font-family: semibold;
        font-size: 10px;
        text-transform: uppercase;
      }

/* ==========================================
   EMPTY
========================================== */
      .no-games {
        width: 100%;
        padding: 50px 20px;
        text-align: center;
        background: #fff;
        border: 1px solid #ddd;
      }

      .no-games h2 {
        margin: 0;
        font-family: black;
        font-size: 25px;
      }

      .no-games p {
        font-family: regular;
        color: #666;
      }

/* ==========================================
   PAGINATION
========================================== */
      .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 7px;
        margin-top: 30px;
        flex-wrap: wrap;
      }

      .pagination a {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        border: 1px solid #ccc;
        color: #111;
        text-decoration: none;
        font-family: semibold;
        font-size: 13px;
        border-radius: 3px;
      }

      .pagination a:hover {
        background: #111;
        color: #fff;
      }

      .pagination a.active {
        background: #111;
        color: #fff;
        border-color: #111;
      }

/* ==========================================
   MOBILE
========================================== */
      @media (max-width: 710px) {
          .container{width:100vw;}
      }
      @media (max-width: 600px) {
        .category-menu {
          margin-bottom: 12px;
        }

        .ticker-bar {
          height: 40px;
        }

        .ticker-label {
          width: 78px;
          min-width: 78px;
          height: 40px;
          flex: 0 0 78px;
          padding-left: 10px;
          padding-right: 15px;
          font-size: 10px;
        }

        .ticker-window {
          height: 40px;
        }

        .ticker-track {
          height: 40px;
        }

        .ticker-item {
          height: 40px;
          padding: 0 18px;
          font-size: 12px;
        }

        .menu-toggle {
          width: 44px;
          min-width: 44px;
          height: 40px;
          flex: 0 0 44px;
        }

        .category-filter {
          padding-bottom: 15px;
        }
      }