* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body { 
      font-family: 'Inter', sans-serif; 
      background: linear-gradient(135deg, #181c24 0%, #222633 50%, #232946 100%);
      color: #e8eaf0; 
      margin: 0; 
      min-height: 100vh; 
      overflow-x: hidden;
      max-width: 100vw;
    }

    html {
      overflow-x: hidden;
      max-width: 100vw;
    }

    /* Navigation Bar */
    .navbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      background: rgba(24, 28, 36, 0.95);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      padding: 1rem 2rem;
    }

    .nav-container {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .nav-brand {
      font-size: 1.5rem;
      font-weight: 700;
      background: linear-gradient(135deg, #ff6b35, #90caf9);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-decoration: none;
    }

    header { 
      background: rgba(34, 38, 51, 0.95); 
      backdrop-filter: blur(10px);
      padding: 1.2rem 2vw; 
      display: flex; 
      align-items: center; 
      justify-content: space-between; 
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
    }

    .app-title { 
      font-size: 2rem; 
      font-weight: 700; 
      background: linear-gradient(135deg, #ff6b35, #f7931e, #ffd600, #90caf9, #1976d2);
      background-size: 300% 300%;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      letter-spacing: 1.5px; 
      animation: gradientShift 4s ease-in-out infinite;
    }

    @keyframes gradientShift {
      0%, 100% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
    }

    .user-info { 
      display: flex; 
      align-items: center; 
      gap: 1rem; 
    }

    .user-info img { 
      border-radius: 50%; 
      width: 38px; 
      height: 38px; 
      object-fit: cover; 
      box-shadow: 0 4px 12px rgba(144, 202, 249, 0.3);
    }

    .toolbar { 
      background: linear-gradient(135deg, rgba(35, 41, 70, 0.9), rgba(34, 38, 51, 0.9)); 
      backdrop-filter: blur(10px);
      padding: 1.5rem 2vw; 
      display: flex; 
      align-items: center; 
      gap: 1.5rem; 
      max-width: 970px; 
      margin: 8rem auto 2rem auto; 
      border-radius: 15px; 
      flex-wrap: wrap;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    .search-wrap { 
      position: relative; 
    }

    .search-input { 
      width: 250px; 
      padding: 0.75rem 2.5rem 0.75rem 1.2rem; 
      font-size: 1rem; 
      border-radius: 12px; 
      border: 2px solid transparent;
      background: linear-gradient(135deg, rgba(24, 28, 36, 0.8), rgba(35, 41, 70, 0.8)); 
      color: #e8eaf0; 
      outline: none;
      transition: all 0.3s ease;
    }

    .search-input:focus { 
      border-color: #90caf9; 
      box-shadow: 0 0 20px rgba(144, 202, 249, 0.3);
      background: rgba(24, 28, 36, 0.9);
    }

    .search-icon { 
      position: absolute; 
      right: 1rem; 
      top: 50%; 
      transform: translateY(-50%); 
      color: #90caf9; 
      font-size: 1.2em; 
    }

    .category-select { 
      font-size: 1rem; 
      padding: 0.75rem 1.2rem; 
      border-radius: 12px; 
      border: 2px solid transparent; 
      background: linear-gradient(135deg, rgba(24, 28, 36, 0.8), rgba(35, 41, 70, 0.8)); 
      color: #e8eaf0; 
      transition: all 0.3s ease;
      cursor: pointer;
    }

    .category-select:focus { 
      border-color: #90caf9; 
      box-shadow: 0 0 20px rgba(144, 202, 249, 0.3);
    }

    .search-history { 
      position: absolute; 
      z-index: 100; 
      top: 3.2rem; 
      left: 0; 
      right: 0; 
      background: linear-gradient(135deg, rgba(35, 41, 70, 0.95), rgba(32, 37, 56, 0.95)); 
      backdrop-filter: blur(10px);
      border: 1px solid rgba(144, 202, 249, 0.3); 
      border-radius: 12px; 
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); 
      max-height: 200px; 
      overflow-y: auto; 
    }

    .search-history-entry { 
      padding: 0.75rem 1.2rem; 
      cursor: pointer; 
      color: #b0b7c3; 
      transition: all 0.3s ease;
    }

    .search-history-entry:hover { 
      background: rgba(144, 202, 249, 0.1); 
      color: #90caf9; 
    }

    .clear-history-btn { 
      background: linear-gradient(135deg, #ff6b35, #f7931e); 
      border: none; 
      color: #fff; 
      font-size: 0.9rem; 
      cursor: pointer; 
      padding: 0.5rem 1rem; 
      margin: 0.5rem;
      border-radius: 8px;
      transition: all 0.3s ease;
    }

    .clear-history-btn:hover {
      background: linear-gradient(135deg, #f7931e, #e65100);
      transform: translateY(-1px);
    }

    .games-section, .history-section, .favorites-section, .liked-section { 
      max-width: 970px; 
      margin: 2rem auto; 
      background: linear-gradient(135deg, rgba(32, 37, 56, 0.9), rgba(35, 41, 70, 0.9)); 
      backdrop-filter: blur(10px);
      border-radius: 20px; 
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); 
      padding: 2.5rem; 
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .games-list { 
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 2rem; 
      justify-content: center;
    }

    .game-card { 
      background: linear-gradient(135deg, rgba(35, 41, 70, 0.8), rgba(32, 37, 56, 0.8)); 
      backdrop-filter: blur(10px);
      border-radius: 16px; 
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); 
      display: flex; 
      flex-direction: column; 
      overflow: hidden; 
      transition: all 0.3s ease; 
      position: relative; 
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .game-card:hover { 
      transform: translateY(-8px) scale(1.02); 
      box-shadow: 0 12px 40px rgba(144, 202, 249, 0.3); 
      border-color: rgba(144, 202, 249, 0.5);
    }

    .game-thumb { 
      width: 100%; 
      aspect-ratio: 16/9; 
      object-fit: cover; 
      background: linear-gradient(135deg, #111, #222); 
    }

    .game-details { 
      padding: 1.5rem; 
      display: flex; 
      flex-direction: column; 
      gap: 0.8rem; 
    }

    .game-title { 
      font-size: 1.2rem; 
      font-weight: 600; 
      color: #fff; 
      line-height: 1.3;
    }

    .game-meta { 
      font-size: 0.9rem; 
      color: #90caf9; 
      margin-bottom: 0.5rem; 
    }

    .game-categories { 
      margin-bottom: 1rem; 
    }

    .game-chip { 
      display: inline-block; 
      background: linear-gradient(135deg, rgba(144, 202, 249, 0.2), rgba(25, 118, 210, 0.2)); 
      color: #90caf9; 
      border: 1px solid rgba(144, 202, 249, 0.3); 
      border-radius: 20px; 
      padding: 0.3rem 0.8rem; 
      font-size: 0.8rem; 
      margin-right: 0.5rem; 
      margin-bottom: 0.3rem; 
      transition: all 0.3s ease;
    }

    .game-chip:hover {
      background: linear-gradient(135deg, rgba(144, 202, 249, 0.3), rgba(25, 118, 210, 0.3));
      transform: translateY(-1px);
    }

    .game-actions { 
      display: flex; 
      gap: 0.8rem; 
      margin-top: auto; 
      align-items: center; 
    }

    .fav-btn { 
      background: none; 
      border: none; 
      color: #ffd600; 
      font-size: 1.5rem; 
      cursor: pointer; 
      transition: all 0.3s ease; 
      padding: 0.5rem;
      border-radius: 8px;
    }

    .fav-btn.favorited { 
      color: #ffd600; 
      text-shadow: 0 0 10px rgba(255, 214, 0, 0.6); 
      background: rgba(255, 214, 0, 0.1);
    }

    .fav-btn:hover {
      background: rgba(255, 214, 0, 0.2);
      transform: scale(1.1);
    }

    .play-btn { 
      background: linear-gradient(135deg, #90caf9, #1976d2); 
      color: #fff; 
      border: none; 
      border-radius: 12px; 
      font-weight: 600; 
      font-size: 1rem; 
      padding: 0.75rem 1.5rem; 
      cursor: pointer; 
      transition: all 0.3s ease; 
      margin-left: auto; 
      box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
    }

    .play-btn:hover { 
      background: linear-gradient(135deg, #1976d2, #0d47a1); 
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
    }

    h2 { 
      font-weight: 600; 
      background: linear-gradient(135deg, #90caf9, #1976d2);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin: 0 0 1.5rem 0; 
      letter-spacing: 0.5px; 
      font-size: 1.5rem;
    }

    .history-list, .favorites-list, .liked-list { 
      display: flex; 
      gap: 1.5rem; 
      flex-wrap: wrap; 
    }

    .history-entry, .favorite-entry, .liked-entry { 
      background: linear-gradient(135deg, rgba(33, 36, 61, 0.8), rgba(35, 41, 70, 0.8)); 
      backdrop-filter: blur(10px);
      border-radius: 12px; 
      padding: 1rem 1.5rem; 
      display: flex; 
      align-items: center; 
      gap: 1rem; 
      font-size: 1rem; 
      color: #fff; 
      border: 1px solid rgba(255, 255, 255, 0.1);
      transition: all 0.3s ease;
    }

    .history-entry:hover, .favorite-entry:hover, .liked-entry:hover {
      background: linear-gradient(135deg, rgba(35, 41, 70, 0.9), rgba(32, 37, 56, 0.9));
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .history-entry img, .favorite-entry img, .liked-entry img { 
      width: 40px; 
      height: 40px; 
      border-radius: 8px; 
      object-fit: cover; 
    }

    .logout-btn { 
      background: linear-gradient(135deg, #ff6b35, #f7931e); 
      color: #fff; 
      border: none; 
      border-radius: 12px; 
      font-size: 1rem; 
      padding: 0.75rem 1.5rem; 
      font-weight: 600; 
      cursor: pointer; 
      margin-left: 1rem; 
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    }

    .logout-btn:hover { 
      background: linear-gradient(135deg, #f7931e, #e65100); 
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    }

    .google-btn { 
      background: linear-gradient(135deg, #fff, #f5f5f5); 
      color: #333; 
      border: none; 
      border-radius: 12px; 
      font-size: 1.1rem; 
      padding: 1rem 2rem; 
      font-weight: 600; 
      cursor: pointer; 
      margin: 4rem auto 0 auto; 
      display: block; 
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); 
      transition: all 0.3s ease;
    }

    .google-btn i { 
      color: #ea4335; 
      font-size: 1.2em; 
      margin-right: 0.8rem; 
      vertical-align: middle; 
    }

    .google-btn:hover { 
      background: linear-gradient(135deg, #f5f5f5, #e0e0e0); 
      transform: translateY(-2px);
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    }

    /* Animated background elements */
    .blob {
      position: fixed;
      border-radius: 50%;
      opacity: 0.05;
      animation: blobMove 20s infinite linear;
      z-index: -1;
    }

    .blob1 {
      width: 300px;
      height: 300px;
      background: linear-gradient(135deg, #ff6b35, #f7931e);
      top: 10%;
      left: -10%;
      animation-delay: 0s;
    }

    .blob2 {
      width: 200px;
      height: 200px;
      background: linear-gradient(135deg, #90caf9, #1976d2);
      top: 70%;
      right: -5%;
      animation-delay: -10s;
    }

    .blob3 {
      width: 150px;
      height: 150px;
      background: linear-gradient(135deg, #ffd600, #ffab00);
      top: 40%;
      right: 80%;
      animation-delay: -5s;
    }

    @keyframes blobMove {
      0% { transform: rotate(0deg) translateX(100px) rotate(0deg); }
      100% { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
    }

    .particles {
      position: fixed;
      width: 100%;
      height: 100%;
      overflow: hidden;
      z-index: -1;
      top: 0;
      left: 0;
    }

    .particle {
      position: absolute;
      width: 3px;
      height: 3px;
      background: #90caf9;
      border-radius: 50%;
      animation: particleFloat 15s infinite linear;
      opacity: 0.4;
    }

    @keyframes particleFloat {
      0% {
        transform: translateY(100vh) translateX(0px);
        opacity: 0;
      }
      10% {
        opacity: 0.4;
      }
      90% {
        opacity: 0.4;
      }
      100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
      }
    }

    @media (max-width: 1080px) {
      .games-section, .history-section, .favorites-section, .liked-section { 
        padding: 2rem 1.5rem; 
        margin: 1.5rem;
      }
      .games-list { 
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem; 
      }
      .toolbar { 
        max-width: calc(100vw - 2rem); 
        margin: 7rem 1rem 1.5rem 1rem;
      }
    }

    @media (max-width: 700px) {
      .games-list { 
        grid-template-columns: 1fr;
      }
      .toolbar { 
        flex-direction: column; 
        align-items: stretch;
        gap: 1rem;
      }
      .search-input {
        width: 100%;
      }
      .history-list, .favorites-list, .liked-list { 
        flex-direction: column; 
      }
      header {
        padding: 1rem;
      }
      .app-title {
        font-size: 1.5rem;
      }
    }
