/* Variables */
:root {
  --primary-color: #042dac;
  --primary-hover: #021a6c;
  --background-color: #fff;
  --surface-color: #000;
  --text-color: #000;
  --text-muted: #666;
  --accent-color: #042dac;
  --font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--background-color);
}

/* Layout */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  width: 100%;
}

.container {
  max-width: 800px;
  width: 100%;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.8s ease-out;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--surface-color);
  letter-spacing: -0.025em;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 400;
}

/* Button */
.btn-primary {
  font-family: var(--font-family);
  font-size: 1.125rem;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 9999px;
  background: var(--primary-color);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px 0 rgba(4, 45, 172, 0.15);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(4, 45, 172, 0.25);
}

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

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Topic Display */
.topic-container {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

#selectedTopic {
  font-size: 2rem;
  font-weight: 700;
  color: var(--surface-color);
  transition: opacity 0.2s ease;
  line-height: 1.3;
}

.pop-in {
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Footer */
footer {
  padding: 2rem;
  text-align: center;
  color: var(--surface-color);
  font-size: 0.875rem;
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--primary-hover);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Responsive */
@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 2rem 1.5rem;
  }
  
  #selectedTopic {
    font-size: 1.5rem;
  }
}
