/* CSS Variables for Light and Dark Themes */
:root {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --accent: #4a90e2;
  --accent-hover: #357abd;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
  --number-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #f5f5f5;
  --text-secondary: #b0b0b0;
  --accent: #64b5f6;
  --accent-hover: #42a5f5;
  --border: #404040;
  --shadow: rgba(0, 0, 0, 0.3);
  --number-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding: 20px;
}

.container {
  max-width: 600px;
  width: 100%;
  background-color: var(--bg-secondary);
  border-radius: 20px;
  box-shadow: 0 10px 40px var(--shadow);
  padding: 40px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.theme-toggle {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Main Content */
main {
  text-align: center;
}

.lottery-display {
  margin-bottom: 40px;
  padding: 40px 20px;
  background: var(--bg-primary);
  border-radius: 15px;
  transition: background-color 0.3s ease;
}

.number-placeholder {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.number-placeholder span,
.lottery-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--border);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.lottery-numbers {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.lottery-number {
  background: var(--number-bg);
  color: white;
  animation: popIn 0.5s ease backwards;
}

.lottery-number:nth-child(1) { animation-delay: 0.1s; }
.lottery-number:nth-child(2) { animation-delay: 0.2s; }
.lottery-number:nth-child(3) { animation-delay: 0.3s; }
.lottery-number:nth-child(4) { animation-delay: 0.4s; }
.lottery-number:nth-child(5) { animation-delay: 0.5s; }
.lottery-number:nth-child(6) { animation-delay: 0.6s; }

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.generate-btn {
  width: 100%;
  padding: 18px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.generate-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.generate-btn:active {
  transform: translateY(0);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.info {
  margin-top: 20px;
}

.info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Partnership Form Styles */
.form-container {
  margin-top: 30px;
}

.partnership-section h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.form-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--bg-secondary);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.submit-btn {
  width: 100%;
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.95rem;
  display: none;
}

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

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

[data-theme="dark"] .form-status.success {
  background-color: #1e4620;
  color: #a3cfbb;
  border-color: #2d5a2e;
}

[data-theme="dark"] .form-status.error {
  background-color: #4a1c1c;
  color: #f5b7b1;
  border-color: #6b2c2c;
}

/* Comments Section Styles */
.comments-container {
  margin-top: 30px;
  margin-bottom: 30px;
}

.comments-section h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.comments-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 25px;
  line-height: 1.6;
}

#disqus_thread {
  margin-top: 20px;
}

/* Disqus iframe styling for better theme integration */
#disqus_thread iframe {
  border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 30px 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .partnership-section h2,
  .comments-section h2 {
    font-size: 1.5rem;
  }

  .lottery-number,
  .number-placeholder span {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .generate-btn,
  .submit-btn {
    font-size: 1rem;
    padding: 15px 30px;
  }
}
