* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* colors 
#9DBDB8
#F0E7D6
#EA2E00



*/
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
}

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

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #f0e7d6 0%, #e8ddd0 100%);
  padding: 24px 32px;
  border-radius: 16px;
  border: 3px solid #ea2e00;
  box-shadow: 0 4px 12px rgba(234, 46, 0, 0.15);
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ea2e00, #9dbdb8, #ea2e00);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

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

.raffle-icon {
  font-size: 3.5rem;
  animation: bounce 2s infinite;
  filter: drop-shadow(2px 2px 4px rgba(234, 46, 0, 0.3));
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

header h1 {
  color: #ea2e00;
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.5px;
}

.header-subtitle {
  color: #9dbdb8;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.etherscan-link {
  color: #ea2e00;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(234, 46, 0, 0.1);
  border: 1px solid rgba(234, 46, 0, 0.2);
  text-transform: none;
}

.etherscan-link:hover {
  color: #d12800;
  background: rgba(234, 46, 0, 0.2);
  border-color: rgba(234, 46, 0, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(234, 46, 0, 0.2);
}

.testnet-badge {
  color: #9dbdb8;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(157, 189, 184, 0.15);
  border: 1px solid rgba(157, 189, 184, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: none;
  letter-spacing: 0.5px;
}

header h2 {
  color: #ea2e00;
  font-size: 1rem;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.error-message {
  color: #ea2e00;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.disconnect-link {
  color: #ea2e00;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.disconnect-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.disconnect-link.hidden {
  display: none;
}

/* Buttons */

.btn-primary {
  background: linear-gradient(135deg, #9dbdb8 0%, #7aa5a0 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 8px rgba(157, 189, 184, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ea2e00 0%, #d12800 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(234, 46, 0, 0.4);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 1.2rem;
}

.btn-text {
  font-size: 0.95rem;
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Wallet Info */
.wallet-info {
  background: #e8f5e9;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* Status Messages */
.status {
  padding: 15px;
  border-radius: 6px;
  margin-top: 20px;
}

.status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status.loading {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.hidden {
  display: none;
}

/* Raffle State Section */
.raffle-state-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  border: 2px solid #f0e7d6;
  position: relative;
  overflow: hidden;
}

.raffle-state-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ea2e00, #9dbdb8, #ea2e00);
}

.raffle-state-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.raffle-enter-container {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.raffle-enter-btn {
  background: linear-gradient(135deg, #ea2e00 0%, #d12800 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(234, 46, 0, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ticket-icon {
  font-size: 1.3rem;
  display: inline-block;
  animation: ticket-bounce 2s infinite;
}

@keyframes ticket-bounce {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-5deg) scale(1.1);
  }
  75% {
    transform: rotate(5deg) scale(1.1);
  }
}

.raffle-enter-btn .btn-text {
  font-size: 0.95rem;
}

.raffle-enter-btn:hover {
  background: linear-gradient(135deg, #d12800 0%, #b82300 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(234, 46, 0, 0.5);
}

.raffle-enter-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(234, 46, 0, 0.4);
}

.raffle-enter-btn:disabled {
  background: linear-gradient(135deg, #ccc 0%, #bbb 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.6;
}

.raffle-enter-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.raffle-state-icon {
  font-size: 3rem;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
  min-width: 60px;
  text-align: center;
}

.raffle-state-icon.state-open {
  animation: pulse-icon 2s infinite;
}

.raffle-state-icon.state-calculating {
  animation: spin 2s linear infinite;
}

.raffle-state-icon.state-closed {
  filter: drop-shadow(2px 2px 6px rgba(234, 46, 0, 0.3));
}

.raffle-state-icon.state-loading {
  animation: spin 2s linear infinite;
  opacity: 0.7;
}

@keyframes pulse-icon {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.raffle-state-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.raffle-state-label {
  font-size: 0.85rem;
  color: #9dbdb8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.raffle-state-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ea2e00;
  transition: all 0.3s ease;
}

.raffle-state-value.state-open {
  color: #9dbdb8;
  text-shadow: 1px 1px 2px rgba(157, 189, 184, 0.2);
}

.raffle-state-value.state-calculating {
  color: #ea2e00;
  animation: text-pulse 1.5s infinite;
}

.raffle-state-value.state-closed {
  color: #ea2e00;
  text-shadow: 1px 1px 2px rgba(234, 46, 0, 0.2);
}

.raffle-state-value.state-error {
  color: #dc3545;
}

@keyframes text-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Players Section */
.players-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  border: 2px solid #f0e7d6;
  position: relative;
  overflow: hidden;
}

.players-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ea2e00, #9dbdb8, #ea2e00);
}

.players-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 3px solid #f0e7d6;
}

.players-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.players-icon {
  font-size: 2rem;
  filter: drop-shadow(2px 2px 4px rgba(234, 46, 0, 0.2));
}

.players-header h2 {
  color: #ea2e00;
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
  letter-spacing: -0.5px;
}

.players-count-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.count-label {
  font-size: 0.75rem;
  color: #9dbdb8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.players-count {
  background: linear-gradient(135deg, #ea2e00 0%, #d12800 100%);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 1.5rem;
  font-weight: 800;
  min-width: 50px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(234, 46, 0, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.players-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  min-height: 80px;
}

.player-item {
  background: linear-gradient(135deg, #f0e7d6 0%, #e8ddd0 100%);
  padding: 16px 20px;
  border-radius: 12px;
  border-left: 5px solid #ea2e00;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  color: #333;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.player-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #ea2e00, #9dbdb8);
}

.player-item:hover {
  background: linear-gradient(135deg, #e8ddd0 0%, #e0d3c8 100%);
  transform: translateY(-3px) translateX(4px);
  box-shadow: 0 6px 12px rgba(234, 46, 0, 0.25);
  border-left-width: 6px;
}

.player-index {
  background: linear-gradient(135deg, #ea2e00 0%, #d12800 100%);
  color: white;
  font-weight: 800;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 2px 4px rgba(234, 46, 0, 0.3);
  flex-shrink: 0;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  border-radius: 12px;
  border: 2px dashed #f0e7d6;
}

.empty-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.empty-text {
  color: #ea2e00;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.empty-subtext {
  color: #9dbdb8;
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
  font-style: italic;
}
