:root {
  --bg: #0A2533;
  --surface: #123241;
  --text: #F2F7F8;
  --text-dim: #8FA9B3;
  --accent: #12A5A5;
  --accent-2: #F5A623;
  --danger: #E86A5E;
  --border: rgba(255, 255, 255, 0.12);

  --series-1: #12A5A5;
  --series-2: #F5A623;
  --series-3: #6C8AE4;
  --series-4: #E86A5E;
  --series-5: #9B72CF;
  --series-6: #4CAF7D;

  --font-en: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', 'IBM Plex Sans', Tahoma, sans-serif;
}

[data-theme='light'] {
  --bg: #FFFFFF;
  --surface: #F4F7F8;
  --text: #0A2533;
  --text-dim: #5B7481;
  --accent: #0E8C8C;
  --accent-2: #D18A0F;
  --border: rgba(10, 37, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-en);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[dir='rtl'] body,
[lang='ar'] {
  font-family: var(--font-ar);
}

a { color: inherit; }

button {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.pulse {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.fade-in {
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  cursor: pointer;
  min-height: 56px;
  padding: 0 1.5em;
  font-size: 1rem;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:hover {
  filter: brightness(1.08);
}

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

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

.banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0.6em;
  background: var(--danger);
  color: #fff;
  font-size: 0.9rem;
  z-index: 1000;
}

::selection {
  background: var(--accent);
  color: #fff;
}
