body {
  margin: 0px;
  padding: 0px;
  background-color: #f9fafb !important;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', 'Liberation Sans',
    Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

/* Header */
/* General Header Styles */
header {
  background-color: #ccdaee40;
  padding: 1rem 2rem;
  border-bottom: 1px solid #eaeaea;
  position: relative;
}

header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  font-weight: bold;
  font-size: 1.2rem;
  color: #333;
  text-decoration: none;
}

header nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2rem;
}

header nav a {
  color: #333;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

header nav a:hover {
  color: #0070f3;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

/* Mobile Menu Styles */
@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }

  /* Hidden Menu State */
  header nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #f7f7f7;
    padding: 1rem;
    border-top: 1px solid #eaeaea;
    z-index: 100;
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px);
    overflow: hidden;
    transition: all 0.4s ease;
  }

  /* Open Menu State */
  header nav.open {
    max-height: 200px;
    /* Adjust based on content */
    opacity: 1;
    transform: translateY(0);
  }

  header nav ul {
    flex-direction: column;
    gap: 1rem;
  }
}

.lazy-image {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy-image[src^='data:image/svg+xml'] {
  opacity: 1;
}

/* SpendMoneyGame */
.spend-money-game {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 10px;
}

.game-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.fullscreen-button {
  background: #212529;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.iframe-container {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.background-image,
.game-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

#gameIframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  display: none;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  border: none;
  border-radius: 50px;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.play-button:hover {
  background: white;
  transform: translate(-50%, -50%) scale(1.05);
}

.play-button:active {
  transform: translate(-50%, -50%) scale(0.95);
}

/* Responsive design */
@media (max-width: 640px) {
  .game-header h1 {
    font-size: 1.25rem;
  }

  .fullscreen-button {
    padding: 10px 12px;
    font-size: 14px;
  }

  .iframe-container {
    height: 300px;
  }

  .play-button {
    padding: 12px 24px;
    font-size: 16px;
  }
}

.header {
  text-align: center;
  margin-bottom: 20px;
}

.profile-image {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  margin-bottom: 16px;
}

h1 {
  font-size: 20px !important;
  margin-bottom: 10px;
  font-weight: bold;
}

.money-counter {
  background-color: #474742;
  color: white;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 8px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.money-amount {
  font-size: 24px;
  font-weight: bold;
}

.money-spent {
  font-size: 14px;
  margin-top: 5px;
}

#itemGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
  grid-auto-rows: 1fr;
  padding-top: 10px;
}

.item-card {
  background: radial-gradient(592px at 48.2% 50%, #f0f0f0 0, #ffe9d5 74.6%);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.item-card img {
  width: 100%;
  height: 192px;
  object-fit: contain;
  margin-bottom: 10px;
}

.item-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.item-price {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.item-actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}

.sell-button,
.buy-button {
  width: 100%;
  padding: 10px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sell-button {
  background-color: #c80013;
  color: white;
}

.buy-button {
  background-color: #474742;
  color: white;
}

.sell-button:disabled,
.buy-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.item-quantity {
  width: 100%;
  text-align: center;
  font-weight: bold;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px 5px;
}

/* Responsive behavior for smaller screens */
@media (max-width: 760px) {
  #itemGrid {
    grid-template-columns: 1fr; /* One item per row */
  }

  .item-card {
    height: auto;
  }

  .item-name,
  .item-price,
  .item-actions {
    margin-bottom: 10px;
  }
}

.receipt {
  background-color: #a0c7fe40;
  border-radius: 8px;
  padding: 20px;
  font-family: monospace;
  font-size: 14px;
}

.receipt h3 {
  font-size: 21px;
  margin-bottom: 15px;
  font-weight: 800;
}

.receipt-header {
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.receipt-items {
  margin-bottom: 15px;
}

.receipt-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 4px;
}

.receipt-item .name {
  flex-basis: 50%;
}

.receipt-item .price {
  flex-basis: 50%;
  text-align: right;
}

.receipt-item-header {
  font-weight: bold;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.receipt-total {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 18px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
  margin-top: 15px;
}

.receipt-footer {
  text-align: center;
  border-top: 1px solid #ccc;
  padding-top: 15px;
  margin-top: 20px;
  font-style: italic;
}

@media (max-width: 600px) {
  #itemGrid {
    grid-template-columns: 1fr;
  }
}

/* SuggestionCards */
.container.playMore {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px;
  padding-bottom: 50px;
  font-family: Arial, sans-serif;
  font-size: 19px;
}

.playMore .card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Always 4 cards */
  gap: 10px;
  margin-top: 30px;
}

.playMore .game-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.playMore .game-card:hover {
  transform: scale(1.05);
}

.playMore .game-card-image {
  width: 100%;
  aspect-ratio: 1 / 1; /* Makes it a square */
  object-fit: cover;
  display: block;
}

.playMore .game-card-title {
  padding: 10px;
  text-align: center;
  font-size: 16px;
}

@media (max-width: 1024px) {
  .playMore .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .playMore .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .playMore .card-grid {
    grid-template-columns: 1fr;
  }
}

.playMore h1,
h2 {
  text-align: left;
  font-weight: bold;
}

.playMore h1 {
  font-size: 1.7rem !important;
  margin-bottom: 10px;
}

.playMore h2 {
  font-size: 1.5rem !important;
  margin-bottom: 20px;
  font-weight: bold;
  margin-top: 20px;
}

.playMore h3 {
  font-size: 1.2rem !important;
  margin-bottom: 20px;
  font-weight: bold;
  margin-top: 20px;
}

.playMore h4 {
  font-size: 1rem !important;
  margin-bottom: 1px;
  font-weight: bold;
  margin-top: 5px;
}

.playMore .card h3 {
  padding: 15px;
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

/* General Footer Styles */
footer {
  padding: 1rem 2rem;
  text-align: center;
  border-top: 1px solid #eaeaea;
  background-color: #ccdaee40;
}

footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

footer nav a {
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

footer nav a:hover {
  color: #0070f3;
}

footer p {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: #666;
}

/* Responsive Styles */
@media (max-width: 768px) {
  footer {
    padding: 1rem;
  }

  footer nav ul {
    flex-direction: row;
    /* Keep links in a single row */
    gap: 0.5rem;
    /* Reduce gap between links */
    justify-content: center;
    flex-wrap: nowrap;
    /* Prevent wrapping */
  }

  footer nav a {
    font-size: 0.9rem;
    /* Slightly smaller font for better fit */
    margin: 0 0.25rem;
    /* Add small margin around links */
  }

  footer p {
    font-size: 0.85rem;
  }
}

/* Additional small-screen styles for very narrow devices */
@media (max-width: 480px) {
  footer nav ul {
    gap: 0.25rem;
    /* Further reduce gap */
  }

  footer nav a {
    font-size: 0.8rem;
    margin: 0 0.2rem;
  }

  footer p {
    font-size: 0.75rem;
    padding: 0 1rem;
  }
}

button {
  border-radius: 0;
}

button:focus:not(:focus-visible) {
  outline: 0;
}

button,
input,
optgroup,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.iframe-container {
  width: 100%;
  max-width: 1000px;
  padding-top: 65%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  z-index: 1;
}

.background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(40px) brightness(1.1);
  z-index: 1;
}

.game-image {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  z-index: 10;
}

iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 5;
}

.play-button {
  position: absolute;
  top: calc(30% + 100px);
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.5rem 1rem;
  margin-top: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  background-color: black;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.play-button:hover {
  background-color: #c61212;
}

.play-button:active {
  transform: translate(-50%, -50%) scale(0.95);
}

@media (max-width: 768px) {
  .game-image {
    width: 100px;
    height: auto;
    top: 30%;
  }

  .play-button {
    top: calc(30% + 80px);
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
  }
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.receipt-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.receipt-logo {
  max-height: 50px;
  object-fit: contain;
}

/* sidebar layouts */

.page-container {
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
  max-width: 100%;
}

.sidebar {
  width: 330px;
  padding: 15px;
  background-color: #f9fafb;
  border-radius: 8px;
  height: fit-content;
}

.left-sidebar {
  order: 1;
}

.main-content {
  flex: 1;
  min-width: 300px;
  order: 2;
}

.right-sidebar {
  order: 3;
}

/* Sidebar Content Styling */
.sidebar-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 15px;
  margin-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin-bottom: 10px;
}

.sidebar-menu a {
  display: block;
  padding: 8px 10px;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
}

.sidebar-menu a:hover {
  background-color: #ffffff;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-menu a.active {
  background-color: #ffffff;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Advertisement Container - Only shows when content is added */
.ad-container {
  margin-bottom: 20px;
}

.ad-container:empty {
  display: none;
}

/* Style for actual ads/sponsored content */
.ad-container img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Popular Games Grid */
.sidebar-games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.game-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
}

.game-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.game-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  color: #1f2937;
}

.game-card-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 4px 0 0 0;
  line-height: 1.3;
}

/* Responsive Design */
@media (max-width: 1456px) {
  .left-sidebar {
    display: none;
  }
}

@media (max-width: 1024px) {
  .right-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-container {
    flex-direction: column;
  }

  .main-content {
    order: 1;
  }
}
