:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --text-color: #333;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f5f7fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Billionaire Grid */
.billionaires {
  padding: 3rem 0;
}

.billionaires h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.billionaire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.billionaire-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
  text-align: center;
  padding-bottom: 1.5rem;
}

.billionaire-card:hover {
  transform: translateY(-5px);
}

.billionaire-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.billionaire-card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.5rem;
}

.billionaire-card p {
  color: var(--accent-color);
  font-weight: bold;
  font-size: 1.2rem;
}

/* How It Works */
.how-it-works {
  padding: 3rem 0;
  background-color: var(--light-color);
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.step {
  text-align: center;
  padding: 1.5rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 50%;
  margin: 0 auto 1rem;
  font-weight: bold;
}

/* Billionaire Page Styles */
.billionaire-header {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
}

.back-button {
  display: inline-block;
  color: white;
  text-decoration: none;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.back-button:hover {
  text-decoration: underline;
}

.billionaire-profile {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.billionaire-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
}

.billionaire-info h1 {
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.money-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.money-label {
  font-weight: 500;
}

.money-value {
  font-weight: 700;
}

#money-spent {
  color: var(--accent-color);
}

#money-remaining {
  color: var(--success-color);
}

/* Items Grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.item-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  padding: 1.5rem;
}

.item-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.item-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.item-price {
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 1rem;
}

.item-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.quantity-btn {
  background-color: #f1f1f1;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background-color: #e1e1e1;
}

.quantity-input {
  width: 50px;
  height: 36px;
  border: none;
  text-align: center;
  font-size: 1rem;
}

.buy-btn {
  flex: 1;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.buy-btn:hover {
  background-color: #2980b9;
}

/* Receipt Styles */
.receipt {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  margin-bottom: 3rem;
}

.receipt h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.receipt-header {
  display: grid;
  grid-template-columns: 3fr 1fr 2fr 2fr;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eee;
  font-weight: 600;
}

.receipt-item {
  display: grid;
  grid-template-columns: 3fr 1fr 2fr 2fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.receipt-summary {
  margin-top: 2rem;
  text-align: right;
  font-size: 1.2rem;
  font-weight: 600;
}

.receipt-grand-total,
.receipt-remaining {
  margin-top: 0.5rem;
}

.receipt-grand-total span:last-child {
  color: var(--accent-color);
  margin-left: 1rem;
}

.receipt-remaining span:last-child {
  color: var(--success-color);
  margin-left: 1rem;
}

/* Ad Container */
.ad-container {
  margin: 2rem auto;
  max-width: 728px;
}

.ad-placeholder {
  background-color: #f1f1f1;
  border: 1px dashed #ccc;
  padding: 2rem;
  text-align: center;
  color: #999;
  border-radius: var(--border-radius);
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

footer p {
  margin-bottom: 0.5rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .billionaire-profile {
    flex-direction: column;
    text-align: center;
  }

  .receipt-header,
  .receipt-item {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    font-size: 0.9rem;
  }

  .item-controls {
    flex-direction: column;
  }

  .quantity-control {
    width: 100%;
  }

  .buy-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .billionaire-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .receipt-header,
  .receipt-item {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .receipt-price {
    display: none;
  }
}

