:root {
  /* Colors - Brightminds Palette */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-tertiary: #F3F4F6;
  
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-tertiary: #9CA3AF;
  
  --accent-amber: #FF9F1C;
  --accent-amber-hover: #E88F15;
  --accent-amber-soft: #FFF4E6;
  
  --border-subtle: #EBEBEB;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Spacing - 8pt system */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --font-display: 'Instrument Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Radii */
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Layout Sections */
section {
  margin-top: var(--space-3xl);
}

main > section:first-child {
  margin-top: var(--space-xl);
}

/* AppBar */
.app-bar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
}

.logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent-amber);
  border-radius: 6px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.class-badge {
  background: var(--bg-tertiary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Hero Section */
.hero-greeting {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.hero-greeting h1 {
  font-size: 32px;
}

.hero-greeting p {
  color: var(--text-secondary);
  font-size: 18px;
}

/* Continue Learning Card */
.continue-card {
  background: var(--bg-primary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 0 var(--border-subtle);
}

.continue-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--border-subtle);
  border-color: var(--text-primary);
}

.continue-info {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.subject-icon-small {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.continue-text h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.continue-text p {
  font-size: 14px;
  color: var(--text-secondary);
}

.progress-track {
  width: 140px;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  margin-top: var(--space-sm);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-amber);
  border-radius: var(--radius-full);
}

/* Subjects Grid */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-lg);
}

.section-header h2 {
  font-size: 24px;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.subject-card {
  background: var(--bg-primary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 var(--border-subtle);
  border-color: var(--text-primary);
}

.subject-card .icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xs);
}

.subject-card h3 {
  font-size: 18px;
}

.subject-card .meta {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Unlock Offer Card */
.unlock-banner {
  background: #0F172A;
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.unlock-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 159, 28, 0.15) 0%, transparent 70%);
  z-index: 1;
}

.unlock-content {
  max-width: 500px;
  position: relative;
  z-index: 2;
}

.unlock-content h2 {
  font-size: 28px;
  margin-bottom: var(--space-sm);
}

.unlock-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  margin-bottom: var(--space-xl);
}

.btn-primary {
  background: var(--accent-amber);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: background 0.2s ease;
}

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

/* Placeholder Utility */
.placeholder-image {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.placeholder-image::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: center;
  width: 80%;
}

.placeholder-avatar {
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

/* Bottom Nav (Mobile/Compact) */
.bottom-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 440px;
  height: 64px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 var(--space-lg);
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-item.active {
  color: var(--accent-amber);
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

/* Subject Specific Accents */
.sub-physics { background-color: #F0F4FF; color: #3B82F6; }
.sub-chemistry { background-color: #F0FDF4; color: #10B981; }
.sub-biology { background-color: #FFF7ED; color: #F97316; }
.sub-maths { background-color: #FEF2F2; color: #EF4444; }
.sub-history { background-color: #F5F3FF; color: #8B5CF6; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .unlock-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xl);
    padding: var(--space-xl);
  }
  
  .hero-greeting h1 {
    font-size: 28px;
  }
  
  .subjects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .subjects-grid {
    grid-template-columns: 1fr;
  }
  
  .continue-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .continue-info {
    width: 100%;
  }
}
