/* Modern CSS Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: #2d3748;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

h1 {
  color: #1a202c;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  color: #2d3748;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

/* Enhanced Form Elements */
select {
  width: 100%;
  padding: 0px 12px;
  margin-top: 2px;
  font-size: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background-color: #ffffff;
  color: #2d3748;
  transition: all 0.2s ease;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Custom Dropdown for Set Selection with Symbols */
.custom-select {
  position: relative;
  width: 100%;
  margin-top: 8px;
}

.select-selected {
  background-color: #ffffff;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  color: #2d3748;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-selected:hover {
  border-color: #667eea;
}

.select-selected:after {
  position: absolute;
  content: "";
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-color: #2d3748 transparent transparent transparent;
  transition: transform 0.2s ease;
}

.select-selected.select-arrow-active:after {
  transform: translateY(-50%) rotate(180deg);
}

.select-items {
  position: absolute;
  background-color: #ffffff;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 9999;
  border: 2px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.select-hide {
  display: none;
}

.select-items div {
  color: #2d3748;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.select-items div:hover {
  background-color: #f7fafc;
}

.select-items div.same-as-selected {
  background-color: #667eea;
  color: #ffffff;
}

.select-items div img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.select-selected img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

input[type="number"] {
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background-color: #ffffff;
  color: #2d3748;
  transition: all 0.2s ease;
}

input[type="number"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Design */
button {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

button:active {
  transform: translateY(0);
}

.booster-pack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.05);
}

/* Card text alignment */
.card > div:not(:first-child) {
  text-align: left;
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: #4a5568;
}

/* Enhanced Shadow Box */
#shadowBox {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px solid;
  border-image: linear-gradient(135deg, #667eea, #764ba2) 1;
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
}

/* Rainbow Text */
.rainbow {
  text-align: center;
  font-size: 18px;
}

.rainbow_text_animated {
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow_animation 8s ease-in-out infinite;
  background-size: 400% 100%;
}

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

/* Price Display */
.pack-price {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
  transition: all 0.3s ease;
  line-height: 1.4;
  max-width: 100%;
  word-wrap: break-word;
  white-space: normal;
}

.pack-price:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.pack-price br {
  margin: 4px 0;
}

/* Pricing info styling */
.pricing-info {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9em;
  margin-top: 4px;
  display: inline-block;
}

/* Card price styling */
.card-price {
  font-weight: 600;
  color: #2d3748;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  display: inline-block;
  margin-top: 4px;
}

/* Profit/Loss styling */
.profit {
  color: #38a169;
  font-weight: 700;
}

.loss {
  color: #e53e3e;
  font-weight: 700;
}

.even {
  color: #718096;
  font-weight: 700;
}

@media (max-width: 768px) {
  .container {
    margin: 0.5rem;
    padding: 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  /* Navigation improvements */
  nav {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    padding: 1rem 0;
  }

  nav > div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  nav button,
  nav a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    text-align: center;
  }

  /* Section improvements */
  .section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  /* Open Packs section controls */
  #open-packs-section > div:first-of-type {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  #open-packs-section input[type="number"] {
    width: 100%;
    max-width: none;
  }

  #open-packs-section button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
  }

  #open-packs-section select {
    width: 100%;
    max-width: none;
    height: 44px;
  }

  #total-price-display {
    margin-left: 0;
    margin-top: 0.5rem;
    text-align: center;
    padding: 0.75rem;
  }

  /* Booster pack grid */
  .booster-pack {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .card {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .card img {
    max-height: 180px;
    object-fit: contain;
  }

  /* Product grid improvements */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .product-card {
    padding: 1rem;
  }

  .product-name {
    font-size: 1rem;
  }

  /* Custom select improvements */
  .select-selected {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .select-items div {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Button improvements */
  button {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 44px;
  }

  /* Input improvements */
  input[type="number"] {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 44px;
  }

  /* Footer improvements */
  .footer {
    padding: 1.5rem 0;
  }

  .footer-content {
    padding: 0 1rem;
    gap: 1rem;
  }

  .footer-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .footer-link-text {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .footer-icon {
    width: 24px;
    height: 24px;
  }

  /* Modal improvements */
  .modal-content {
    width: 95%;
    max-height: 90%;
    margin: 1rem;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-header h3 {
    font-size: 1.3rem;
  }

  .modal-body {
    padding: 1rem;
    max-height: 70vh;
  }

  #json-content {
    font-size: 0.75rem;
    padding: 0.75rem;
  }

  /* Buy link improvements */
  .buy-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    width: 100%;
    justify-content: center;
  }

  /* Hide buy-link text on mobile, show only icon and price */
  .buy-link i {
    display: none !important;
  }

  /* Additional mobile-specific hiding for buy link text */
  @media (max-width: 768px) {
    .buy-link i {
      display: none !important;
    }
  }

  /* Even more specific selector for card context */
  .card .buy-link i {
    display: none !important;
  }

  .buy-link {
    gap: 4px;
    padding: 0.4rem 0.6rem;
    justify-content: space-between;
  }

  .buy-link .price {
    margin-left: 0;
  }

  /* Pack price improvements */
  .pack-price {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    line-height: 1.3;
  }
}

/* Additional mobile improvements for very small screens */
@media (max-width: 480px) {
  .container {
    margin: 0.25rem;
    padding: 0.75rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  /* Even smaller cards for very small screens */
  .booster-pack {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
  }

  .card {
    padding: 0.4rem;
    font-size: 0.8rem;
  }

  .card img {
    max-height: 140px;
  }

  /* Single column product grid */
  .product-grid {
    grid-template-columns: 1fr;
  }

  /* Larger touch targets */
  button {
    min-height: 48px;
    padding: 0.875rem 1rem;
  }

  input[type="number"] {
    min-height: 48px;
  }

  .select-selected {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* Footer adjustments for very small screens */
  .footer-link {
    padding: 1rem;
    font-size: 0.85rem;
  }

  .footer-link-text {
    font-size: 0.8rem;
  }

  /* Modal adjustments */
  .modal-content {
    width: 98%;
    margin: 0.5rem;
  }

  .modal-header {
    padding: 0.75rem;
  }

  .modal-body {
    padding: 0.75rem;
  }

  /* Buy-link styles for very small screens */
  .buy-link i {
    display: none !important;
  }

  .buy-link {
    gap: 3px;
    padding: 0.3rem 0.5rem;
    justify-content: space-between;
  }

  .buy-link .price {
    margin-left: 0;
  }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
  .container {
    margin: 0.5rem;
  }

  /* Keep navigation horizontal in landscape */
  nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  nav > div {
    flex-direction: row;
    gap: 0.5rem;
  }

  /* Adjust card grid for landscape */
  .booster-pack {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  /* Keep controls horizontal in landscape */
  #open-packs-section > div:first-of-type {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #open-packs-section input[type="number"] {
    width: 120px;
  }

  #open-packs-section button {
    width: auto;
  }

  #open-packs-section select {
    width: 150px;
  }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

button:focus,
select:focus,
input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* JSON Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-overlay.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90%;
  width: 800px;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-button {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-body {
  padding: 2rem;
  max-height: 60vh;
  overflow-y: auto;
}

#json-content {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #495057;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95%;
  }
  
  .modal-header {
    padding: 1rem 1.5rem;
  }
  
  .modal-body {
    padding: 1rem;
    max-height: 70vh;
  }
  
  #json-content {
    font-size: 0.8rem;
    padding: 1rem;
  }
}

/* Buy link styling */
.buy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 6px;
  background: #ffffff;
  color: #2d3748;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.buy-link:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.buy-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.buy-link i {
  font-style: normal;
  font-weight: 500;
  color: #4a5568;
  display: inline;
  vertical-align: middle;
}

.buy-link .price {
  margin-left: auto;
  font-weight: 600;
  color: #2d3748;
  vertical-align: middle;
}

/* Product Grid Styles */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.product-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.product-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.product-card.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: #e2e8f0;
}

.product-card.disabled .product-info-button {
  pointer-events: auto;
  cursor: pointer;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.product-card.selected::before {
  opacity: 1;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-code {
  font-size: 0.8em;
  color: #7f8c8d;
  margin-top: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.product-info-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0;
  line-height: 1;
  font-weight: bold;
  color: #000000;
}

.product-info-button:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.5);
  transform: scale(1.1);
}

/* Responsive adjustments for product grid */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .product-card {
    padding: 1rem;
  }
  
  .product-name {
    font-size: 1rem;
  }
}

/* Product Info Modal Content Styles */
#product-info-content h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.5rem;
}

#product-info-content h4 {
  margin: 1.5rem 0 0.5rem 0;
  color: #34495e;
  font-size: 1.2rem;
  border-bottom: 2px solid #667eea;
  padding-bottom: 0.25rem;
}

#product-info-content h5 {
  margin: 1rem 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1rem;
  background: #f8f9fa;
  padding: 0.5rem;
  border-radius: 4px;
  border-left: 3px solid #667eea;
}

#product-info-content p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

#product-info-content ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

#product-info-content li {
  margin: 0.25rem 0;
  line-height: 1.4;
}

#product-info-content a {
  color: #667eea;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 2px 4px;
  border-radius: 3px;
}

#product-info-content a:hover {
  color: #5a67d8;
  background-color: rgba(102, 126, 234, 0.1);
  text-decoration: underline;
}

.booster-config {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.booster-config h5 {
  margin-top: 0;
  background: #667eea;
  color: white;
  border-left: none;
}

.sheet-info {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.sheet-info h5 {
  margin-top: 0;
  background: #28a745;
  color: white;
  border-left: none;
}

/* Footer Styles */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #ecf0f1;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid #34495e;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.footer-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #ecf0f1;
}

.footer-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.footer-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #ecf0f1;
}

.footer-link-text {
  color: #ecf0f1;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-link:hover .footer-link-text {
  color: #ffffff;
}

/* Responsive footer */
@media (max-width: 768px) {
  .footer {
    padding: 1.5rem 0;
    margin-top: 2rem;
  }
  
  .footer-content {
    padding: 0 1rem;
    gap: 1rem;
  }
  
  .footer-link {
    padding: 10px 16px;
    font-size: 0.8rem;
  }
  
  .footer-icon {
    width: 18px;
    height: 18px;
  }
}

/* Splash page specific styles */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  font-weight: 300;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.cta-primary {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(72, 187, 120, 0.4);
}

.cta-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.features-section {
  padding: 4rem 2rem;
  background: #ffffff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2d3748;
}

.feature-description {
  color: #4a5568;
  line-height: 1.6;
}

.how-it-works {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.how-it-works h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #2d3748;
}

.steps-container {
  max-width: 1000px;
  margin: 0 auto;
}

.step {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  gap: 2rem;
}

.step:nth-child(even) {
  flex-direction: row-reverse;
}

.step-number {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2d3748;
}

.step-description {
  color: #4a5568;
  line-height: 1.6;
}

.auth-section {
  padding: 4rem 2rem;
  background: #ffffff;
  text-align: center;
}

.auth-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.auth-button {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.signup-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.signup-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.login-button {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.login-button:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

.stats-section {
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.stat-item {
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.8;
}

/* Splash page responsive styles */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .step {
    flex-direction: column !important;
    text-align: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Splash page responsive styles */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 1rem;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.4;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    max-width: 280px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    text-align: center;
  }

  .features-section {
    padding: 3rem 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .feature-title {
    font-size: 1.3rem;
  }

  .feature-description {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .how-it-works {
    padding: 3rem 1rem;
  }

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

  .step {
    flex-direction: column !important;
    text-align: center;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .step-title {
    font-size: 1.3rem;
  }

  .step-description {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .auth-section {
    padding: 3rem 1rem;
  }

  .auth-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .auth-button {
    width: 100%;
    max-width: 200px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    text-align: center;
  }

  .stats-section {
    padding: 2rem 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }
}

/* Additional splash page improvements for very small screens */
@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 0.75rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .cta-primary,
  .cta-secondary {
    max-width: 250px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }

  .features-section {
    padding: 2rem 0.75rem;
  }

  .feature-card {
    padding: 1.25rem;
  }

  .feature-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .feature-title {
    font-size: 1.2rem;
  }

  .how-it-works {
    padding: 2rem 0.75rem;
  }

  .how-it-works h2 {
    font-size: 1.8rem;
  }

  .step-number {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .auth-section {
    padding: 2rem 0.75rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Flip Button Styles */
.flip-button {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important;
  z-index: 10 !important;
  background-color: rgba(0, 0, 0, 0.7) !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  font-weight: bold !important;
  transition: background-color 0.2s ease !important;
  transform: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  min-height: auto !important;
  width: auto !important;
  height: auto !important;
}

.flip-button:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

/* Mobile styles for flip button */
@media (max-width: 768px) {
  .flip-button {
    padding: 2px 2px;
    font-size: 10px;
    border-radius: 3px;
  }
}

/* Very small screen styles for flip button */
@media (max-width: 480px) {
  .flip-button {
    padding: 1px 3px;
    font-size: 9px;
    border-radius: 2px;
  }
}