/* The Language Dojo — Styles */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
}

.logout-form {
  display: inline;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  background: var(--bg-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.btn-small:hover {
  background: var(--danger);
  color: white;
}

/* Inputs */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Hero / Landing */
.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.auth-form {
  max-width: 400px;
  margin: 0 auto;
}

.form-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-card h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.auth-toggle {
  margin-top: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-toggle a {
  color: var(--primary);
  text-decoration: none;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

/* Dashboard */
.dashboard {
  text-align: center;
  padding: 2rem 0;
}

.dashboard h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.language-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.language-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.language-card:hover:not(.disabled) {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.language-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.flag {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.language-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.language-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Modules */
.modules-grid {
  padding: 1rem 0;
}

.modules-grid h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.module-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.module-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.module-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.module-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.module-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Game Header */
.game-header {
  margin-bottom: 1.5rem;
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.back-link:hover {
  color: var(--text);
}

.game-header h1 {
  font-size: 1.5rem;
}

/* Mode Selection */
.mode-selection {
  text-align: center;
}

.instructions {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.mode-btn {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.mode-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.mode-btn h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.mode-btn p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Game Progress */
.game-progress {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Question Card */
.question-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

.noun, .verb, .starter {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.context {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.prompt {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  padding: 1rem 1.5rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.option-btn:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}

.sentence-option {
  font-size: 1.05rem;
  line-height: 1.5;
}

/* Feedback */
.feedback {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.feedback.correct {
  border-color: var(--success);
}

.feedback.incorrect {
  border-color: var(--danger);
}

.feedback-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.feedback h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.feedback.correct h2 {
  color: var(--success);
}

.feedback.incorrect h2 {
  color: var(--danger);
}

.the-phrase {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.gender-tag, .category-tag {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: capitalize;
  margin-bottom: 1rem;
}

.rule-box {
  background: var(--bg);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.5rem;
  text-align: left;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
}

.rule-box strong {
  color: var(--accent);
}

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Game Complete */
.game-complete {
  text-align: center;
  padding: 3rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.game-complete h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.game-complete p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 640px) {
  .auth-form {
    max-width: 100%;
  }
  
  .language-grid {
    grid-template-columns: 1fr;
  }
  
  .modules {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 1rem;
  }
  
  .navbar {
    padding: 1rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .noun, .verb, .starter {
    font-size: 1.5rem;
  }
}
