/* ====================================
   Global and Desktop Styles
==================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap');


/* Game Header */
.game-header {
    background-color: #d4edda;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px auto 0 auto; /* same margin and centering */
    border-radius: 10px;
    max-width: 100vw;
    width: 100%;
    padding: 20px 15px; /* same horizontal padding */
}


.game-image {
    width: 150px; /* Adjust size as needed */
    height: 150px;
    border: 3px solid white;
    border-radius: 10px; /* Slightly rounded edges */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white; /* White background to highlight the image */
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fits well inside the square */
    border-radius: 8px; /* Slight roundness inside the border */
}

.game-info {
    flex: 1; /* Take remaining space */
}

.game-info h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50; /* Dark color for contrast */
    margin-bottom: 10px;
}

.game-info p {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #444;
    line-height: 1.5;
}


/* Main Container Layout */
.container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 30px auto 0 auto; /* top margin + horizontal centering */
    flex-wrap: wrap;
    max-width: 100vw; /* unified width */
    width: 100%;
    padding: 0 15px; /* consistent horizontal padding */
}  
  /* Categories Container (hidden on desktop, shown on mobile) */
  .categories-container {
    display: none;
    width: 100%;
  }
  
  @media (max-width: 768px) {
    .categories-container {
      display: block;
    }
  }
  .categories-list {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 0;
  scroll-snap-type: x mandatory;
}

.category-item {
  flex: 0 0 calc(40% - 10px); /* smaller width */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
  cursor: pointer;
  scroll-snap-align: start;
  position: relative;
}

.category-item:hover {
  transform: scale(1.05);
  background-color: #e6f2ff;
}

.category-image {
  max-width: 50px;
  height: auto;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.category-name {
  font-weight: bold;
  margin-top: 5px;
  color: #333;
}

/* Selected state */
.category-item.selected {
  background-color: #28a745;
  border: 2px solid #fff; /* Small white border around the category */
  color: #fff;
}

.category-item.selected .category-name {
  color: #fff;
}

.category-item.selected .category-image {
  border: none;
  background: none;
}

/* Checkmark when selected */
.category-item.selected::after {
  content: "✔";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  background-color: #fff;
  color: #28a745;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Hide scrollbar */
.categories-list::-webkit-scrollbar {
  display: none;
}
.categories-list {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Products Container */
.products-container {
    flex: 3;
    padding: 10px 10px 60px 10px;
    background-color: #f8f9fa;
    border-radius: 8px; /* slightly reduced */
    margin-top: 15px; /* reduced from 20px */
}

.products-container h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px; /* reduced from 26px */
    color: #333;
    margin-bottom: 15px; /* reduced from 20px */
    font-weight: 600; /* slightly lighter */
    text-transform: uppercase;
    letter-spacing: 0.5px; /* slightly tighter */
}

.products-container-inner {
    padding: 12px; /* reduced from 20px */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* softer shadow */
}


/* Root color variables */
:root {
  --bg-page: #f5f5f5;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --text-primary: #1a1a1a;
  --text-secondary: #555555;

  --accent-start: #00d2ff;
  --accent-end: #3a47d5;

  --check-bg: rgba(255, 255, 255, 0.9);
}

body {
  background-color: var(--bg-page);
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  margin: 0;
  padding: 2rem;
}

.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Base product card */
.product-item {
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 4px 12px var(--card-shadow);
  padding: 1.5rem;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: row; /* image left, text right */
  align-items: center;
  gap: 1.25rem;
  height: auto;
  box-sizing: border-box;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-image {
  max-width: 60px;
  border-radius: 0.5rem;
  flex-shrink: 0;
  margin: 0;
  order: 0;
}

.product-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  margin: 0 0 0.25rem;
  order: 1;
}

.product-item p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  order: 2;
}

/* Stack name and description vertically */
.product-name,
.product-item p {
  display: block;
  width: 100%;
}

/* Selected state */
.product-item.selected {
  padding: calc(1.5rem - 4px);
  border-radius: 1rem;
  animation: hueShift 3s ease-in-out infinite;
  background-color: rgba(58, 71, 213, 0.08);
  background-clip: padding-box;
  position: relative;
}

.product-item.selected::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 1rem;
  padding: 4px;
  background: linear-gradient(120deg, var(--accent-start), var(--accent-end));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes hueShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.product-item.selected::after {
  content: '✔';
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  background: var(--check-bg);
  color: var(--accent-end);
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

/* Button */
.button-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
}

.button-primary:hover {
  opacity: 0.9;
}

/* Mobile styles up to 600px */
@media only screen and (max-width: 600px) {
  .products-list {
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    padding: 0 0.75rem;
  }

  .product-item {
    flex-direction: row;
    align-items: center;
    padding: 1.5rem !important;
    gap: 2.25rem;
  }

  .product-name {
    font-size: 1.2rem !important;
  }

  .product-item p:not(.product-name) {
    font-size: 1rem !important;
    display: block;
  }

  .product-image {
    max-width: 60px;
  }

  .product-item.selected {
    padding: calc(1.5rem - 3px) !important;
  }

  .product-item.selected::after {
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
  }
}

/* Hidden class */
.hidden {
  display: none !important;
}


/* Sidebar (Order Information, Payment Options, Total Amount) */
.sidebar {
    flex: 1;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Montserrat', sans-serif;
}

.card {
    margin-bottom: 20px;
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    max-width: 400px; /* container max width */
}

.card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    border-bottom: 2px solid #28a745;
    padding-bottom: 8px;
}

/* Input field styling */
.card input[type="text"] {
    width: 300px;  /* Fixed width */
    max-width: 100%; /* responsive on small screens */
    padding: 12px 18px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    color: #2c3e50;
    font-weight: 500;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    font-family: 'Montserrat', sans-serif;
}

.card input[type="text"]:focus {
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
    background-color: #fff;
}

.card input[type="text"]::placeholder {
    color: #888;
    font-style: italic;
    opacity: 1;
    letter-spacing: 0.02em;
}

/* Button styling */
.check-btn {
    position: relative;
    padding: 12px 28px;
    font-size: 17px;
    font-weight: 600;
    background-color: #28a745;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 25px;
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
    font-family: 'Montserrat', sans-serif;
}

.check-btn:hover {
    background-color: #218838;
    box-shadow: 0 8px 22px rgba(33, 136, 56, 0.6);
}

.check-btn:active {
    background-color: #1e7e34;
    box-shadow: 0 4px 10px rgba(30, 126, 52, 0.5);
}

/* Colored dots animation */
.check-btn::before,
.check-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #ff4444;
    animation: ballMovement 1.5s infinite ease-in-out;
    opacity: 0.7;
}

.check-btn::before {
    animation-delay: 0s;
    background-color: #ff4444;
}

.check-btn::after {
    animation-delay: 0.7s;
    background-color: #27ae60;
}

/* Ball animation keyframes */
@keyframes ballMovement {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    25% {
        transform: translate(18px, -50%) scale(1.2);
    }
    50% {
        transform: translate(0, 18px) scale(1);
    }
    75% {
        transform: translate(-18px, 0) scale(0.85);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Payment Container and Options */
.payment-container {
    flex: 1;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Montserrat', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
}

.payment-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    background-color: white;
    position: relative;
    transition: 0.3s ease-in-out;
}

.payment-box input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-box.upi {
    color: black;
    border-color: #ccc;
}

.payment-box.wallet {
    color: black;
    border-color: #ccc;
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
}

.wallet-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-icon {
    font-size: 20px;
}

.payment-box.selected {
    background-color: #15803d !important;
    color: white !important;
    border-color: #15803d !important;
}

.card .total-amount {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
}

.card .buy-now-btn {
    background-color: #28a745;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.card .buy-now-btn:hover {
    background-color: #218838;
}
@media (min-width: 768px) {
    .continue-payment {
      display: none;
    }
  }
  

/* ====================================
   Mobile Styles
   (Reordering and adjustments)
==================================== */

@media (max-width: 480px) {
    /* Prevent any horizontal overflow */
    html, body {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      overflow-x: hidden;
    }
  
    /* Game Header */
    .game-header {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      width: 100%;
      margin: 0;
      padding: 10px;
      background-color: #0eb76b;
    }
  
    /* Game Image */
    .game-image img {
      width: 100%;
      max-width: 400px;
      height: auto;
      border-radius: 10px;
    }
  
    /* Game Info */
    .game-info {
      width: 100%;
      padding: 0 15px;
    }
    .game-info h1 {
      font-size: 24px;
      margin-top: 10px;
    }
    .game-info p {
      font-size: 16px;
      margin-top: 5px;
    }
  
  
    /* Main Container */
    .container {
      display: flex;
      flex-direction: column;
      gap: 20px;
      width: 100%;
      padding: 20px 10px;
      margin: 20px 0 0;
    }
  
    /* Sidebar & Order Info */
    .sidebar {
      width: 100%;
      padding: 10px;
      order: -2;
      box-sizing: border-box;
    }
@media (max-width: 480px) {

    .card {
    padding-left: 15px;
    padding-right: 15px;
    }

    .card input[type="text"] {
        width: 100%; /* full width inside container */
        max-width: 100%; /* never exceed container */
        box-sizing: border-box; /* include padding and border in width */
        padding: 14px 45px 14px 40px; /* space for icon on left */
        font-size: 18px;
        border-radius: 12px;
        border: 2px solid #ccc;
        background-color: #fff;
        color: #2c3e50;
        font-weight: 500;
        font-family: 'Montserrat', sans-serif;
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
        outline: none;
        margin-bottom: 25px;
        position: relative;
        overflow: hidden;
    }

    .card input[type="text"]:focus {
        border-color: #28a745;
        box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
        background-color: #fff;
    }

    .card input[type="text"].with-icon {
        background-image: url('data:image/svg+xml;utf8,<svg fill="%23888888" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zM10 14a4 4 0 110-8 4 4 0 010 8z"/></svg>');
        background-repeat: no-repeat;
        background-position: 12px center;
        background-size: 20px 20px;
    }
    }
    /* Hide desktop‑only cards, show mobile button */
    .payment-card,
    .total-amount-card {
      display: none;
    }
        .continue-payment {
    display: flex;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    }
    .continue-btn {
    width: 100%;
    background: #45784c;           /* light green */
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    /* base glow */
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(140, 233, 154, 0.6),
        0 0 24px rgba(140, 233, 154, 0.4);
    transition:
        background 0.3s ease,
        box-shadow 0.3s ease;
    }
    .continue-btn:hover {
    background: #438370;           /* slightly brighter on hover */
    /* intensify glow */
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 16px rgba(140, 233, 154, 0.8),
        0 0 32px rgba(140, 233, 154, 0.6);
    }

    }
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    display: none;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
}

.modal.open {
    display: block;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 28px 30px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: calc(100vw - 40px);
    box-sizing: border-box;
    border: 2px solid #444;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    text-align: left;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Heading */
.modal-content h3 {
    font-size: 26px;
    font-weight: 700;
    color: #222;
    margin-bottom: 16px;
    text-align: center;
}

/* Paragraphs */
.modal-content p {
    font-size: 17px;
    color: #444;
    margin: 10px 0;
}

#tag1-container strong,
#tag2-container strong {
    display: inline-block;
    background-color: #e8f0fe;
    color: #1967d2;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

/* Wallet Info */
.wallet-icon {
    margin-right: 6px;
    font-size: 20px;
}
.modal-content span {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

/* Payment buttons */
.payment-options {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.payment-options button {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 14px;
    font-size: 16px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.payment-options button:hover {
    transform: scale(1.03);
}

.payment-options button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Country-specific colors */
button[onclick*="Wallet"] {
    background-color: #28a745;
    color: white;
}
button[onclick*="Wallet"]:hover {
    background-color: #219638;
}

button[onclick*="UPI"] {
    background-color: #673ab7;
    color: white;
}
button[onclick*="UPI"]:hover {
    background-color: #7e57c2;
}

button[onclick*="NPR"] {
    background-color: #007bff;
    color: white;
}
button[onclick*="NPR"]:hover {
    background-color: #3399ff;
}

/* Guest login link buttons */
.payment-options a button {
    background-color: #f44336;
    color: white;
}
.payment-options a button:hover {
    background-color: #e53935;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    color: #555;
    cursor: pointer;
    font-weight: bold;
}
.close-btn:hover {
    color: #000;
}
