      {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Arial', sans-serif;
      }
      
      body {
        height: calc(100vh - 20px);
        display: flex;
        flex-direction: column;
        background: #f0f2f5;
        font-size: 16px;
        margin-top: 0;
      }
      
      /* Top 20% - Display Screen */
      .display-screen {
        height: 20vh;
        background: #2c3e50;
        color: white;
        padding: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-bottom: 3px solid #34495e;
      }
      
      .display-line {
        font-size: 2rem;
        font-weight: bold;
        text-align: center;
        margin: 5px 0;
      }
      
      .display-line.subtitle {
        font-size: 1.5rem;
        color: #ecf0f1;
        font-weight: normal; 
      }
      
      /* Middle 60% - Main Content */
      .main-content {
        height: 60vh;
        display: flex;
        padding: 15px;
        gap: 15px;
      }
      
      .cart-container {
        flex: 1;
        background: white;
        border-radius: 10px;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
      }
      
      .cart-title {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 15px;
        color: #2c3e50;
        border-bottom: 2px solid #ecf0f1;
        padding-bottom: 10px;
      }
      
      .cart-items {
        flex: 1;
        overflow-y: auto;
      }
      
      .cart-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #ecf0f1;
      }
      
      .item-name {
        font-size: 1.1rem;
        color: #2c3e50;
      }
      
      .item-details {
        display: flex;
        text-align: right;
      }
      
      .item-quantity {
        color: #7f8c8d;
        font-size: 0.9rem;
      }
      
      .item-price {
        font-weight: bold;
        color: #27ae60;
        font-size: 1.1rem;
      }
      
      .products-container {
        flex: 1;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 15px;
        max-width:420px
      }
      
      .product-button {
        background: #3498db;
        border: none;
        border-radius: 10px;
        color: white;
        font-size: 1.8rem;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
      }
      
      .product-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
      }
      
      .product-button:active {
        transform: translateY(0);
      }
      
      .product-button.alcohol {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
      }
      
      .product-button.cigarettes {
        background: linear-gradient(135deg, #95a5a6, #7f8c8d);
      }
      
      .product-button.lottery {
        background: linear-gradient(135deg, #f39c12, #e67e22);
      }
      
      .product-button.seniors {
        background: linear-gradient(135deg, #9b59b6, #8e44ad);
      }
      
      /* Bottom 20% - Footer */
      .footer {
        height: 20vh;
        display: flex;
        padding: 15px;
        gap: 15px;
      }
      
      .total-container {
        flex: 2;
        background: white;
        border-radius: 10px;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
      }
      
      .total-display {
        text-align: center;
      }
      
      .total-label {
        font-size: 1.2rem;
        color: #7f8c8d;
        margin-bottom: 6px;
      }
      
      .total-amount {
        font-size: 2.8rem;
        font-weight: bold;
        color: #27ae60;
      }
      
      .pay-button {
        flex: 1;
        background: linear-gradient(135deg, #27ae60, #2ecc71);
        border: none;
        border-radius: 10px;
        color: white;
        font-size: 2.5rem;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
      }
      
      .pay-button:hover {
        background: linear-gradient(135deg, #229954, #27ae60);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
      }
      
      .pay-button:active {
        transform: translateY(0);
      }
      
      .empty-cart {
        text-align: center;
        color: #bdc3c7;
        font-style: italic;
        margin-top: 50px;
        font-size: 1.2rem;
      }

      /* Age Verification Popup */
      .popup-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 1000;
      }

      .popup-content {
        background: white;
        padding: 30px;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        text-align: center;
        max-width: 500px;
        width: 90%;
      }

      .popup-title {
        font-size: 1.8rem;
        color: #e74c3c;
        margin-bottom: 15px;
        font-weight: bold;
      }

      .popup-message {
        font-size: 1.2rem;
        color: #2c3e50;
        margin-bottom: 25px;
        line-height: 1.5;
      }

      .popup-buttons {
        display: flex;
        gap: 15px;
        justify-content: center;
      }

      .popup-button {
        padding: 12px 30px;
        border: none;
        border-radius: 8px;
        font-size: 1.1rem;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 120px;
      }

      .popup-button.cancel {
        background: #95a5a6;
        color: white;
      }

      .popup-button.cancel:hover {
        background: #7f8c8d;
      }

      .popup-button.retry {
        background: #3498db;
        color: white;
      }

      .popup-button.retry:hover {
        background: #2980b9;
      }


      @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
      }

      .error-message {
        color: #e74c3c;
        font-size: 1rem;
        margin-top: 10px;
        display: none;
      }

 /* Responsive font sizes */
  @media (max-width: 1200px) {
    html { font-size: 15px; }
  }
  
  @media (max-width: 768px) {
    html { font-size: 14px; }
  }
  
  @media (max-width: 480px) {
    html { font-size: 13px; }
  }

/* Success Popup Specific Styles */
#successPopup .popup-icon {
  color: #27ae60;
}

#successPopup .popup-title {
  color: #27ae60;
}

/* Failure Popup Specific Styles */
#failurePopup .popup-icon {
  color: #e74c3c;
}

#failurePopup .popup-title {
  color: #e74c3c;
}

/* Updated Popup Button Styles */
.popup-button {
  padding: 15px 35px;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.popup-button i {
  font-size: 1.1em;
}

.popup-button.continue {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
}

.popup-button.continue:hover {
  background: linear-gradient(135deg, #229954, #27ae60);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.popup-button.retry {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.popup-button.retry:hover {
  background: linear-gradient(135deg, #2980b9, #2471a3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.popup-button.cancel {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d);
  color: white;
}

.popup-button.cancel:hover {
  background: linear-gradient(135deg, #7f8c8d, #707b7c);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4);
}

.popup-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.item-actions {
  margin-left: 15px;
}


.cart-item.removing {
  opacity: 0;
  transform: translateX(-20px);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.loading-spinner {
  display: none;
  width: 80px;
  height: 80px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
  position: relative;
}

.countdown-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3498db;
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  position: relative;
  margin-top:-70px
}
/* Pixel 7 and Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
      .display-screen{
        height:10vh;
        padding: 6px
      }
      .main-content{
        height:70vh;
      }
      .pay-button {
        font-size: 2.0rem;
      }


      .products-container{
        max-width: 90px;
      }



  /* Add top margin to page */
  body {
    margin-top: 0.5em;
  }

  /* Reduce display line font sizes by 50% */
  #displayLine1 {
    font-size: 1rem; /* 50% of original 2rem */
  }

  #displayLine2 {
    font-size: 0.75rem; /* 50% of original 1.5rem */
  }

  /* Hide product button text, show only icons */
  .product-button {
    font-size: 0; /* Hide text */
    padding: 0;
  }

  .product-button .d-flex {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem !important;
  }

  .product-button img {
    width: 32px;
    height: 32px;
  }

  .product-button span {
    display: none; /* Hide text completely */
  }

  .header-bar{
    display: none!important; 
  }

  .lotteryImage{
        width: 100% !important;
       max-width: 100% !important;
       padding: 0 !important; /* Optional: removes padding on tiny screens to maximize space */
       margin: 0 !important;

  }

.close-button {
  padding: 4px 4px!important;
  font-size: .8rem!important;
  gap: 4px!important;
  min-width: min-content!important;

}
#lotteryPopup:{
    margin-top: 3em;
    padding:10px!important
}


}


/* Pixel 7 and Small Mobile Devices (max-width: 480px) */
@media (max-width: 380px) {
      /* Add top margin to page */
      .display-screen{
        height:10vh;
        padding: 6px
      }
      .main-content{
        height:70vh;
      }
      .pay-button {
        font-size: 1.8rem;
      }
      .total-label{
        font-size: 1.0rem;
      }
      .total-amount{
        font-size: 2.0rem;
      }
      .total-amount{
        font-size: 2.0rem;
      }
      .total-container{
        padding: 12px;
      }
      .products-container{
        max-width: 82px;
      }

      body {
        margin-top: 0.25em;
      }

      /* Reduce display line font sizes by 50% */
      #displayLine1 {
        font-size: 1rem; /* 50% of original 2rem */
      }

      #displayLine2 {
        font-size: 0.75rem; /* 50% of original 1.5rem */
      }

      /* Hide product button text, show only icons */
      .product-button {
        font-size: 0; /* Hide text */
        padding: 0;
      }

      .product-button .d-flex {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1rem !important;
      }

      .product-button img {
        width: 32px;
        height: 32px;
      }

      .product-button span {
        display: none; /* Hide text completely */
      }

      .header-bar{
        display: none!important; 
      }

      .lotteryImage{
            width: 100% !important;
           max-width: 100% !important;
           padding: 0 !important; /* Optional: removes padding on tiny screens to maximize space */
           margin: 0 !important;

      }

    .close-button {
      padding: 4px 4px!important;
      font-size: .8rem!important;
      gap: 4px!important;
      min-width: min-content!important;

    }
    #lotteryPopup:{
        margin-top: 3em;
        padding:10px!important
    }


}