body {
  background: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 20px 0;
}

.main-container {
  max-width: 1000px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  border: 1px solid #e1e5e9;
}

.page-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: #6c757d;
  border-radius: 15px;
  color: white;
  border: 1px solid #5a6268;
}

.page-header h1 {
  margin: 0;
  font-size: 2em;
  font-weight: bold;
  color: white;
}

.lotto-header-tools {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lotto-header-tools a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.lotto-header-tools a:hover {
  text-decoration: underline;
}

.form-container {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
}

.form-group-modern {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.form-row-modern {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
}

.form-row-modern .form-group-modern {
  flex: 1;
  margin-bottom: 0;
}

.form-label {
  min-width: 120px;
  padding: 12px 16px;
  background: #e9ecef;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  font-weight: 600;
  color: #495057;
  text-align: center;
  margin: 0;
}

.req {
  color: #dc3545;
  font-weight: 800;
}

.form-input,
.form-select {
  flex: 1;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 14px;
  background: white;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #007bff;
}

.form-actions {
  text-align: center;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 2px solid #f1f3f4;
}

.btn-modern {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
}

.btn-primary-modern {
  background: #007bff;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-modern:hover {
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

.btn-modern:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.btn-large {
  padding: 15px 30px;
  font-size: 16px;
  min-width: 220px;
}

.lotto-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.lotto-action {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: none;
  border-radius: 16px;
  color: #fff;
  padding: 18px 16px;
  cursor: pointer;
  min-height: 132px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.lotto-action:hover {
  transform: translateY(-2px);
  color: #fff;
}

.lotto-action:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.lotto-action-find {
  background: linear-gradient(135deg, #007c91 0%, #00a3b8 100%);
}

.lotto-action-donate {
  background: linear-gradient(135deg, #e65100 0%, #ffb300 100%);
}

.lotto-action i {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 18px;
}

.lotto-action strong {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.lotto-action span {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.92;
}

.lotto-slide-wrap {
  max-width: 484px;
  margin: 0 auto;
}

.lotto-slide-stage {
  position: relative;
  padding: 0 42px;
}

.lotto-slide-frame {
  position: relative;
  width: 100%;
  padding-top: 150%;
  background: #f1f3f4;
  border-radius: 14px;
  overflow: hidden;
}

.lotto-slide-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.lotto-slide-frame img.is-active {
  display: block;
}

.lotto-slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid #dee2e6;
  border-radius: 50%;
  background: #fff;
  color: #333;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lotto-slide-nav.prev { left: 0; }
.lotto-slide-nav.next { right: 0; }

.lotto-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.lotto-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 99px;
  background: #d0d0d0;
  padding: 0;
  cursor: pointer;
}

.lotto-dot.is-active {
  width: 18px;
  background: #007c91;
}

.pillar-summary {
  font-weight: 700;
  font-size: 15px;
  color: #343a40;
  margin-bottom: 12px;
}

.pillar-row {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.pillar-cell {
  flex: 1;
  text-align: center;
  padding: 12px 6px;
  border: 1px solid #dee2e6;
  background: #fff;
}

.pillar-cell + .pillar-cell {
  border-left: none;
}

.pillar-cell .t {
  font-size: 12px;
  font-weight: 700;
  color: #6c757d;
}

.pillar-cell .h {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  color: #212529;
}

.pillar-cell .k {
  margin-top: 4px;
  font-size: 13px;
  color: #6c757d;
  min-height: 18px;
}

.lotto-card {
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.lotto-card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 900;
}

.lotto-line {
  background: rgba(40, 167, 69, 0.12);
  border: 1.5px solid #28a745;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
}

.lotto-line:last-child {
  margin-bottom: 0;
}

.lotto-line .pick {
  font-weight: 800;
  font-size: 13px;
  color: #1b7a34;
  margin-bottom: 8px;
}

.lotto-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lotto-ball {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #28a745;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

.donate-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.donate-chip {
  border: 1px solid #dee2e6;
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  cursor: pointer;
}

.donate-chip.is-on {
  background: #ffb300;
  border-color: #ffb300;
  color: #fff;
}

.donate-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.donate-qty-row input {
  flex: 1;
}

#donateModal .custom-modal-header {
  background: linear-gradient(135deg, #e65100 0%, #ffb300 100%);
}

@media (max-width: 768px) {
  .main-container {
    margin: 10px;
    padding: 20px;
  }

  .page-header h1 {
    font-size: 1.45em;
  }

  .form-container {
    padding: 18px;
  }

  .form-row-modern,
  .form-group-modern,
  .lotto-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-label {
    min-width: 0;
    text-align: left;
  }

  .btn-large {
    width: 100%;
  }
}
