body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #111827;
  color: white;
}

body.light {
  background-color: #f9fafb;
  color: #111827;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
}

.slot-machine {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  padding: 0 1rem;
}

.reel-container {
  width: 60px;
  height: 60px;
  background-color: #1f2937;
  border: 2px solid #4b5563;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reel {
  display: flex;
  flex-direction: column;
  animation: none;
}

.reel.spin {
  animation: reelSpin 0.6s ease-out forwards;
}

.reel img {
  width: 36px;
  height: 36px;
  margin: 4px auto;
  filter: drop-shadow(0 0 1px #0006);
}

@keyframes reelSpin {
  0% {
    transform: translateY(-720px);
    filter: blur(4px);
  }
  100% {
    transform: translateY(0);
    filter: blur(0);
  }
}

button {
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

#result {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #fbbf24;
}

.repo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem;
  width: 100%;
}

.repo-card {
  background-color: #1f2937;
  color: white;
  border: 1px solid #4b5563;
  border-radius: 10px;
  padding: 1rem;
  width: 320px;
  max-width: 90vw;
  overflow: hidden;
}

.repo-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-card p {
  font-size: 0.85rem;
  color: #d1d5db;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-card a {
  display: inline-block;
  margin-top: 0.5rem;
  background: #064e3b;
  color: #10b981;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
}

.repo-card a::after {
  content: ' ↗';
}

canvas#confettiCanvas {
  position: fixed;
  pointer-events: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

/* Light theme overrides */
body.light {
  background-color: #f9fafb;
  color: #111827;
}

body.light .btn {
  color: #111827;
  border-color: #6b7280;
  background-color: #f3f4f6;
}

body.light .btn:hover {
  background-color: #e5e7eb;
}

body.light .btn-success {
  background-color: #22c55e;
  color: white;
}

body.light .btn-success:hover {
  background-color: #16a34a;
}

body.light .reel-container {
  background-color: #e5e7eb;
  border-color: #d1d5db;
  box-shadow: 0 0 5px #cbd5e1;
}

body.light .repo-card {
  background-color: #ffffff;
  color: #111827;
  border-color: #d1d5db;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

body.light .repo-card p {
  color: #374151;
}

body.light .repo-card a {
  background-color: #d1fae5;
  color: #065f46;
}

body.light #result {
  color: #d97706;
}

body.light #rateLimitStatus {
  color: #6b7280;
}

body.light .dropdown-menu {
  background-color: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
}

body.light .dropdown-menu .dropdown-item:hover {
  background-color: #f3f4f6;
}

/* Footer styles */
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  backdrop-filter: blur(10px);
  background-color: rgba(17, 24, 39, 0.6); /* default dark mode */
  color: white;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.95rem;
  z-index: 999;
}

body.light footer {
  background-color: rgba(255, 255, 255, 0.75);
  color: #111;
}

footer a.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.85);
  color: #111;
  text-decoration: none;
  font-size: 1.2rem;
  transition: background 0.3s ease;
}

body.light footer a.social-icon {
  background-color: rgba(0, 0, 0, 0.1);
  color: #111;
}

footer a.social-icon:hover {
  background-color: #e2e8f0;
}

/* Back to top button */
#backToTop {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 998;
  display: none;
  font-size: 1.4rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

#backToTop:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

body.light #backToTop {
  background-color: rgba(255, 255, 255, 0.85);
  color: #111;
}

body.light #backToTop:hover {
  background-color: rgba(200, 200, 200, 0.85);
}

/* Base 3D round button */
.spin-button {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #4CAF50, #388E3C);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  border: none;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  cursor: pointer;
  user-select: none;

  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 6px 0 #2E7D32;

  transition: all 0.2s ease-in-out;
  animation: pulse 2.5s infinite ease-in-out;
}

/* Press-down effect */
.spin-button:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3),
    0 2px 0 #2E7D32;
}

/* Ripple effect */
.ripple-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: width 0.4s ease-out, height 0.4s ease-out, opacity 0.6s ease-out;
}

.ripple-button:active::after {
  width: 200px;
  height: 200px;
  opacity: 0;
}

/* Shine effect */
.spin-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg);
  animation: shine 3s infinite ease-in-out;
  pointer-events: none;
}

/* Subtle pulsing */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Shine animation */
@keyframes shine {
  0% { left: -75%; }
  50% { left: 125%; }
  100% { left: 125%; }
}
