@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+Ethiopic:wght@400;500;600;700;800;900&display=swap');

/* ==========================================================================
   THEME VARIABLES (Dark Mode Default)
   ========================================================================== */
:root {
  /* Dark Palette (Default) */
  --bg-color: #0A0A0A;
  --surface-color: #111111;
  --surface-hover: #1A1A1A;
  --border-color: #2A2A2A;
  --text-primary: #F0F0F0;
  --text-muted: #888888;
  
  /* Accents */
  --gold: #F5A623;
  --indigo: #4F46E5;
  --success: #22C55E;
  --danger: #EF4444;
  
  /* Dimensions & Spacing */
  --nav-height: 72px;
  --max-width: 1200px;
  --radius-card: 12px;
  --radius-btn: 8px;
  --spacing-unit: 8px;
  
  /* Progress Track */
  --progress-track: #1A1A1A;
}

/* Light Palette Override */
[data-theme="light"] {
  --bg-color: #FAFAFA;
  --surface-color: #FFFFFF;
  --surface-hover: #F0F0F0;
  --border-color: #E5E5E5;
  --text-primary: #111111;
  --text-muted: #666666;
  
  --gold: #D4920A;
  --progress-track: #E5E5E5;
}

/* ==========================================================================
   RESET & TYPOGRAPHY
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Noto Sans Ethiopic', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.7; /* Generous for Amharic */
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

/* Typography Utilities */
.text-gold { color: var(--gold); }
.text-indigo { color: var(--indigo); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-muted); }

.fw-bold { font-weight: 700; }
.fw-black { font-weight: 900; }

/* Cards */
.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card.interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
  border-color: rgba(245, 166, 35, 0.4); /* subtle gold glow */
}

/* Light mode specific hover shadow adjustments */
[data-theme="light"] .card.interactive:hover {
  box-shadow: 0 12px 24px rgba(0,0,0,0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: scale(1.02);
}

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

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

.btn-primary {
  background: var(--indigo);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #4338CA;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-gold {
  background: var(--gold);
  color: #000000;
  font-weight: 700;
}

.btn-gold:hover {
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--surface-hover);
}

/* Progress Bars */
.progress-container {
  width: 100%;
  height: 6px;
  background: var(--progress-track);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   NAVIGATION / HEADER
   ========================================================================== */
.platform-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.7); /* dark default */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease;
}

[data-theme="light"] .platform-nav {
  background: rgba(250, 250, 250, 0.8);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-weight: 900; font-size: 16px;
}

.nav-brand-text {
  font-weight: 900;
  letter-spacing: 1.5px;
  font-size: 14px;
}

.nav-center {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -24px; /* align with nav bottom border */
  left: 0; right: 0;
  height: 2px;
  background: var(--gold);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.theme-toggle:hover {
  background: var(--surface-hover);
}

.avatar-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}

.avatar-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-hover);
  border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
}

/* User Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: 0.2s ease;
}

.nav-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  padding: 10px 16px;
  color: var(--text-primary);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--surface-hover);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Mobile Hamburger Menu */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav-panel {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.mobile-nav-panel.open {
  display: flex;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
  .nav-center { display: none; }
  .mobile-menu-btn { display: block; }
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.platform-main {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 60px;
}

/* ==========================================================================
   SPINNERS & LOADERS
   ========================================================================== */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin { 
  to { transform: rotate(360deg); } 
}

/* Skeleton Loading Animation */
.skeleton {
  background: linear-gradient(90deg, var(--surface-hover) 25%, var(--border-color) 50%, var(--surface-hover) 75%);
  background-size: 400% 100%;
  animation: skeletonLoading 1.5s infinite linear;
  border-radius: 4px;
}

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
