/* ============================================
   DroidAI — Common Styles
   Shared across all pages (nav, footer, theme, lang, buttons)
   ============================================ */

/* ---- CSS VARIABLES ---- */
:root {
  --bg: #141416;
  --bg-1: #18181b;
  --surface: #1c1c20;
  --surface-2: #242428;
  --surface-3: #2e2e34;
  --border: #35353a;
  --border-light: #45454a;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-glow: rgba(10, 132, 255, 0.15);
  --green: #30d158;
  --green-glow: rgba(48, 209, 88, 0.12);
  --red: #ff453a;
  --yellow: #ffd60a;
  --orange: #ff9f0a;
  --purple: #bf5af2;
  --gradient-1: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 50%, #bf5af2 100%);
  --gradient-2: linear-gradient(135deg, #30d158 0%, #0a84ff 100%);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-1: #f8f8fa;
  --surface: #f2f2f7;
  --surface-2: #e8e8ed;
  --surface-3: #d1d1d6;
  --border: #c7c7cc;
  --border-light: #aeaeb2;
  --text: #1c1c1e;
  --text-2: #636366;
  --text-3: #8e8e93;
  --accent: #007aff;
  --accent-hover: #0056b3;
  --accent-glow: rgba(0, 122, 255, 0.1);
  --green: #34c759;
  --green-glow: rgba(52, 199, 89, 0.1);
  --red: #ff3b30;
  --yellow: #ff9500;
  --orange: #ff9500;
  --purple: #af52de;
}

/* ---- RESET ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---- UTILITY ---- */
.hidden { display: none !important; }

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 16px; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

.nav-bar {
  width: 100%;
  max-width: 980px;
  height: 52px;
  background: rgba(18, 18, 20, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 24px;
}

.nav-left { display: flex; align-items: center; gap: 24px; }

.nav-logo {
  display: flex; align-items: center; gap: 7px;
  font-size: 22px; font-weight: 700; letter-spacing: -0.3px;
  text-decoration: none; color: var(--text);
}
.nav-logo svg { flex-shrink: 0; }
.nav-logo span { color: var(--accent); }
.nav-logo .logo-bg { fill: #1e2238; }
.nav-logo .logo-body { fill: #7B8CDE; stroke: #7B8CDE; }
.nav-logo .logo-eye-bg { fill: #1e2238; }
.nav-logo .logo-eye-hl { fill: #fff; }
[data-theme="light"] .nav-logo .logo-bg { fill: #e0e4f7; }
[data-theme="light"] .nav-logo .logo-body { fill: #5c6bc0; stroke: #5c6bc0; }
[data-theme="light"] .nav-logo .logo-eye-bg { fill: #e0e4f7; }
[data-theme="light"] .nav-logo .logo-eye-hl { fill: #fff; }

.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--text-2); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-user {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 14px 4px 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer; transition: background 0.2s; height: 36px;
}
.nav-user:hover { background: rgba(255, 255, 255, 0.1); }
.nav-user img { width: 28px; height: 28px; border-radius: 50%; }
.nav-user-name { font-size: 13px; font-weight: 500; color: var(--text); }

/* ---- LANG SELECTOR ---- */
.lang-selector { position: relative; }

.lang-btn {
  display: flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px;
  background: rgba(255, 255, 255, 0.04); color: var(--text-2);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.08); }
.lang-btn svg { width: 14px; height: 14px; opacity: 0.6; }

.lang-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; min-width: 140px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5); z-index: 200;
}
.lang-dropdown.open { display: block; }

.lang-option {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  color: var(--text-2); cursor: pointer; transition: background 0.15s;
  border: none; background: none; width: 100%; text-align: left;
}
.lang-option:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.lang-option.active { color: var(--accent); }
.lang-option .flag { font-size: 16px; }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 20px; border: none; border-radius: 18px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 20px;
  border: 1px solid var(--border); border-radius: 18px;
  background: transparent; color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-light); }

.btn-google {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 18px;
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-google:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.18); }
.btn-google svg { width: 16px; height: 16px; }

/* ---- THEME BUTTON ---- */
.theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px;
  background: rgba(255, 255, 255, 0.04); color: var(--text-2);
  cursor: pointer; transition: background 0.2s; font-size: 16px; line-height: 1;
}
.theme-btn:hover { background: rgba(255, 255, 255, 0.08); }

/* ---- FOOTER ---- */
footer {
  padding: 40px 24px; text-align: center;
  border-top: 1px solid var(--border); margin-top: 80px;
}
footer p { font-size: 12px; color: var(--text-3); }
footer .footer-links { margin-top: 8px; }
footer .footer-links a {
  color: var(--text-3); font-size: 12px; text-decoration: none; margin: 0 8px;
  cursor: pointer;
}
footer .footer-links a:hover { color: var(--text); text-decoration: underline; }
footer .footer-links a.active { color: var(--accent); }

/* ---- LIGHT MODE OVERRIDES ---- */
[data-theme="light"] .nav-bar {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .lang-btn,
[data-theme="light"] .btn-google,
[data-theme="light"] .theme-btn {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .lang-btn:hover,
[data-theme="light"] .btn-google:hover,
[data-theme="light"] .theme-btn:hover { background: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .nav-user { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.1); }
[data-theme="light"] .nav-user:hover { background: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .lang-dropdown {
  background: #fff; border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .lang-option:hover { background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] footer { border-color: var(--border); }

/* ---- MOBILE NAV ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
}
