/* Root Variables */
:root {
  --background-dark: #1a1a1a;
  --background-secondary: #2a2a2a;
  --background-tertiary: #3a3a3a;
  --text-primary: #ffffff;
  --accent-orange: #f7931a;
  --accent-orange-light: #ffaa00;
  --accent-orange-dark: #d47500;
  --accent-magenta: #c2185b;
  --accent-magenta-dark: #9c1647;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--background-dark);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

/* Accessibility Warning */
.noscript-warning {
  background-color: var(--accent-magenta);
  color: var(--text-primary);
  padding: 1rem;
  text-align: center;
  font-family: 'Inter', sans-serif;
}

.noscript-warning a {
  color: var(--accent-orange);
  text-decoration: none;
}

.noscript-warning a:hover,
.noscript-warning a:focus {
  text-decoration: underline;
}

/* Header Styling */
.header {
  align-items: center;
  background-color: var(--background-secondary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: relative;
}

.header-left {
  align-items: center;
  display: flex;
}

.logo {
  border-radius: 50%;
  height: 50px;
  margin-right: 1rem;
  width: 50px;
}

.header-text {
  display: flex;
  flex-direction: column;
}

.brand {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: lowercase;
}

.slogan {
  color: var(--accent-orange);
  font-size: 1rem;
  font-weight: 600;
}

.header-right {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.nav-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent-orange);
}

.connect-wallet {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
  border: none;
  border-radius: 5px;
  color: var(--background-dark);
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: transform 0.2s;
}

.connect-wallet:hover,
.connect-wallet:focus {
  transform: scale(1.05);
}

.cut-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 14px,
    var(--accent-orange) 14px,
    var(--accent-orange) 19px
  );
}

/* Main Content Layout */
.main {
  margin: 0 auto;
  max-width: 1200px;
  padding: 2rem 1rem;
}

/* Deposit and Dashboard Section */
.deposit-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem; /* Space before next section */
}

.deposit-box,
.dashboard {
  background-color: var(--background-secondary);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  flex: 1;
  min-height: 320px;
  min-width: 300px;
  padding: 1.25rem;
}

.deposit-box .tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tab {
  background-color: var(--background-tertiary);
  border: none;
  border-radius: 5px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: background-color 0.2s;
}

.tab.active {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
  color: var(--background-dark);
}

.tab-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 320px;
}

.tab-content.hidden {
  display: none;
}

input[type="text"] {
  background-color: var(--background-tertiary);
  border: none;
  border-radius: 5px;
  color: var(--text-primary);
  font-size: 1.1rem;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  width: 100%;
}

.input-with-icon {
  background-image: url('../assets/usdc-icon.png?v=1');
  background-position: 10px center;
  background-repeat: no-repeat;
  background-size: 20px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--background-tertiary);
  border-radius: 5px;
  height: 8px;
  outline: none;
  width: 100%;
}

input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
  border-radius: 5px;
  height: 8px;
}

input[type="range"]::-moz-range-track {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
  border-radius: 5px;
  height: 8px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: var(--accent-orange-dark);
  border-radius: 50%;
  cursor: pointer;
  height: 16px;
  margin-top: -4px;
  width: 16px;
}

input[type="range"]::-moz-range-thumb {
  background: var(--accent-orange-dark);
  border-radius: 50%;
  cursor: pointer;
  height: 16px;
  width: 16px;
}

.percentage-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.percentage-btn {
  background-color: var(--background-tertiary);
  border: none;
  border-radius: 5px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  flex: 1;
  padding: 0.5rem;
  transition: background-color 0.2s, transform 0.1s;
}

.percentage-btn:hover,
.percentage-btn:focus {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
  color: var(--background-dark);
}

.percentage-btn:active {
  transform: scale(0.95);
}

.action-btn {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
  border: none;
  border-radius: 5px;
  color: var(--background-dark);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 1.2rem 2rem;
  transition: transform 0.2s;
  width: 100%;
}

.action-btn:hover,
.action-btn:focus {
  transform: scale(1.05);
}

.action-btn:active {
  transform: scale(0.95);
}

.disclaimer {
  color: var(--accent-magenta);
  font-size: 0.9rem;
  text-align: center;
}

/* Dashboard Styling */
.dashboard h2 {
  color: var(--accent-orange);
  font-weight: 700;
  margin-bottom: 1rem;
}

.metric-cluster {
  margin-bottom: 1rem;
}

.metric {
  border-bottom: 1px solid var(--background-tertiary);
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.metric.primary {
  font-size: 1.1rem;
  font-weight: 600;
}

.metric:last-child {
  border-bottom: none;
}

.metric span#next-ticket-timer {
  color: var(--accent-orange);
  font-size: 0.9rem;
}

/* Raffel Section Styling */
.raffel-section {
  margin-top: 2rem;
  text-align: center;
}

.section-title {
  color: var(--accent-orange);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.raffel-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 960px;
}

.raffel-box {
  background-color: var(--background-secondary);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  min-height: 350px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s;
  width: 300px;
}

.raffel-box.current {
  border: 2px solid var(--accent-orange);
  transform: scale(1.05);
}

.raffel-box:hover {
  transform: scale(1.03);
}

.raffel-content {
  flex-grow: 1;
}

.raffel-title {
  color: var(--accent-orange);
  margin-bottom: 1rem;
}

.raffel-box p {
  margin-bottom: 0.5rem;
}

.raffel-box a {
  color: var(--accent-orange);
  text-decoration: none;
}

.raffel-box a:hover,
.raffel-box a:focus {
  text-decoration: underline;
}

.sats-amount {
  color: var(--accent-orange);
  font-weight: 700;
}

.your-tickets {
  background-color: var(--background-tertiary);
  border: 2px solid var(--accent-orange);
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  display: inline-block;
  font-weight: 700;
  margin: 0.5rem 0;
  padding: 0.25rem 0.75rem;
}

.claim-btn,
.starting-soon-btn {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
  border: none;
  border-radius: 5px;
  color: var(--background-dark);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  transition: transform 0.2s;
  width: 100%;
}

.claim-btn.disabled,
.starting-soon-btn.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.claim-btn:hover:not(.disabled),
.claim-btn:focus:not(.disabled),
.starting-soon-btn:hover:not(.disabled),
.starting-soon-btn:focus:not(.disabled) {
  transform: scale(1.05);
}

.claim-btn:active:not(.disabled),
.starting-soon-btn:active:not(.disabled) {
  transform: scale(0.95);
}

.good-luck-btn {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
  border: none;
  border-radius: 5px;
  color: var(--background-dark);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  transition: transform 0.2s;
  width: 100%;
}

.good-luck-btn:hover,
.good-luck-btn:focus {
  transform: scale(1.05);
}

.good-luck-btn:active {
  transform: scale(0.95);
}

.progress-bar {
  background-color: var(--background-tertiary);
  border-radius: 5px;
  height: 10px;
  margin-top: 1rem;
  overflow: hidden;
}

.progress {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-orange-light));
  height: 100%;
  transition: width 0.5s ease-in-out;
  width: 0;
}

.timer {
  color: var(--accent-orange);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* Footer Styling */
.footer {
  background-color: var(--background-secondary);
  margin-top: 2rem;
  padding: 2rem 1rem;
  position: relative;
  text-align: center;
}

.footer-content p {
  margin-bottom: 0.5rem;
}

.social-link {
  color: var(--accent-orange);
  text-decoration: none;
}

.social-link:hover,
.social-link:focus {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .header-left {
    flex-direction: column;
    text-align: center;
  }

  .header-text {
    align-items: center;
  }

  .deposit-dashboard {
    flex-direction: column;
  }

  .raffel-container {
    flex-direction: column;
    align-items: center;
  }

  .raffel-box {
    max-width: 100%;
    width: 300px;
  }
}