:root {
  --bb-orange: #ff9900;
  --bb-orange-dark: #e28100;
  --bg: #f5f5f5;
  --text-main: #222;
  --text-muted: #555;
  --border-light: #e0e0e0;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.08);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 12px;
}

.card {
  background: #fff;
  max-width: 420px;
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 24px 20px 28px;
}

/* Header & icons */

.card-header {
  text-align: center;
  margin-bottom: 20px;
}

.icon-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--bb-orange);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.card-header h1 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Language selector */

.language-section {
  margin: 16px 0 18px;
}

#languageLabel {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

#languageSelect {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  font-size: 0.95rem;
  background: #fff;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #888 50%),
    linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Buttons */

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.primary-btn,
.secondary-btn {
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  border: none;
  outline: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
}

.primary-btn {
  background: var(--bb-orange);
  color: #fff;
  font-weight: 600;
}

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

.secondary-btn {
  background: #fff7e6;
  color: var(--bb-orange-dark);
  border: 1px solid #ffe0a8;
  font-weight: 500;
}

.secondary-btn:hover {
  background: #ffe9c2;
}

/* Rules panel */

.rules-panel {
  border-radius: 18px;
  border: 1px solid var(--border-light);
  padding: 14px 14px 10px;
  max-height: 360px;
  overflow: auto;
  background: #fafafa;
}

.rules-panel h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--text-main);
}

#rulesContent {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
  white-space: pre-wrap;
}

/* RTL language support */

.rtl #rulesContent {
  text-align: right;
}

/* Small screens */

@media (max-width: 480px) {
  .card {
    padding: 20px 16px 24px;
  }

  .card-header h1 {
    font-size: 1.35rem;
  }
}
