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

/* Brand Design Tokens */
:root {
  --bg-color: #122C3D;          /* Deep Teal-Blue */
  --surface-color: #1D4057;     /* Muted Teal-Blue */
  --surface-hover: #26516D;
  --accent-color: #27AE60;      /* Vivid Emerald Green */
  --accent-hover: #219653;
  --accent-glow: rgba(39, 174, 96, 0.3);
  
  --text-primary: #FFFFFF;      /* Pure White */
  --text-secondary: #E0E6EB;    /* Soft Off-White */
  --text-muted: #8FA0AC;
  
  --font-default: "Roboto", sans-serif;
  --font-heading: "Nunito Sans", sans-serif;
  --font-nav: "Raleway", sans-serif;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-xl: 30px;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-secondary);
  font-family: var(--font-default);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-color);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--surface-hover);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
}

/* Header & Navigation */
.header {
  background-color: rgba(18, 44, 61, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 5%;
  transition: padding var(--transition-normal);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

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

.logo img {
  height: 40px;
  width: auto;
  transition: transform var(--transition-normal);
}

.logo:hover img {
  transform: rotate(5deg) scale(1.05);
}

.logo h1 {
  font-size: 24px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #FFFFFF 0%, #E0E6EB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  font-family: var(--font-nav);
  font-weight: 500;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 16px;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width var(--transition-fast);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.btn-consultation {
  background-color: var(--accent-color);
  color: var(--text-primary);
  font-family: var(--font-nav);
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 50px;
  box-shadow: 0 4px 15px var(--accent-glow);
  transition: all var(--transition-fast);
}

.btn-consultation:hover {
  background-color: var(--accent-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.5);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 5% 40px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
}

/* Background Glowing Orbs */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(39, 174, 96, 0.1) 0%, rgba(18, 44, 61, 0) 70%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

.hero h2 {
  font-size: 16px;
  color: var(--accent-color);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(to right, #FFFFFF, #E0E6EB, #8FA0AC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 40px;
  color: var(--text-muted);
}

/* Quick Statistics */
.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.stat-card {
  background-color: var(--surface-color);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 20px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(39, 174, 96, 0.2);
}

.stat-card h3 {
  font-size: 32px;
  color: var(--accent-color);
  margin-bottom: 5px;
}

.stat-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* Search and Filters Hub */
.search-filter-hub {
  max-width: 1200px;
  margin: 20px auto 40px;
  padding: 0 5%;
}

.search-box {
  position: relative;
  background-color: rgba(29, 64, 87, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-xl);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 15px;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  margin: 0 auto 30px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 8px 32px rgba(39, 174, 96, 0.15);
}

.search-box i {
  color: var(--text-muted);
  font-size: 20px;
  margin-left: 10px;
  margin-right: 15px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 18px;
  width: 100%;
  padding: 10px 0;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* Filters Scrollable Wrapper */
.filters-wrapper {
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.filters-container {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  min-width: max-content;
  padding: 5px 2px;
}

/* Center tags if viewport is wide enough */
@media (min-width: 900px) {
  .filters-container {
    justify-content: center;
    min-width: auto;
    flex-wrap: wrap;
  }
}

.filter-btn {
  background-color: var(--surface-color);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: var(--font-nav);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background-color: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.filter-btn.active {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Sheet Directory Grid */
.directory-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5% 80px;
}

.results-count {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-family: var(--font-nav);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Sheet Card Styles */
.sheet-card {
  background-color: rgba(29, 64, 87, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  animation: fadeIn 0.4s ease forwards;
}

.sheet-card:hover {
  transform: translateY(-5px);
  border-color: rgba(39, 174, 96, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25), 0 0 15px rgba(39, 174, 96, 0.1);
  background-color: rgba(29, 64, 87, 0.6);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

/* Category Badges with Brand-Aligned Palettes */
.category-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 4px;
}

/* Badge category color mappings */
.badge-l1, .badge-l2, .badge-l3, .badge-l4, .badge-l5with-abacus, .badge-l5without-abacus, .badge-l6, .badge-l7, .badge-l8 {
  background-color: rgba(39, 174, 96, 0.15); /* Soft Green for Levels */
  color: #2ECC71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.badge-adv-l3 {
  background-color: rgba(155, 89, 182, 0.15); /* Soft Purple for Adv Level */
  color: #AF7AC5;
  border: 1px solid rgba(175, 122, 197, 0.3);
}

.badge-multiply {
  background-color: rgba(241, 196, 15, 0.15); /* Soft Amber/Gold for Multiplication */
  color: #F4D03F;
  border: 1px solid rgba(244, 208, 63, 0.3);
}

.badge-exactdivision, .badge-mixeddivision {
  background-color: rgba(230, 126, 34, 0.15); /* Soft Orange for Division */
  color: #EB984E;
  border: 1px solid rgba(235, 152, 78, 0.3);
}

.badge-exams {
  background-color: rgba(52, 152, 219, 0.15); /* Soft Blue for Practice Exams */
  color: #5DADE2;
  border: 1px solid rgba(93, 173, 226, 0.3);
}

.badge-tables, .badge-kahoot {
  background-color: rgba(26, 188, 156, 0.15); /* Soft Teal for Tables/GK */
  color: #48C9B0;
  border: 1px solid rgba(72, 201, 176, 0.3);
}

.sheet-icon-indicator {
  color: var(--text-muted);
  font-size: 14px;
}

.sheet-card h3 {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 20px;
  flex-grow: 1;
  color: var(--text-primary);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
  margin-top: auto;
}

.sheet-path-text {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

.btn-open-sheet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(39, 174, 96, 0.3);
  padding: 6px 14px;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.sheet-card:hover .btn-open-sheet {
  background-color: var(--accent-color);
  color: var(--text-primary);
  border-color: var(--accent-color);
  box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
}

.btn-open-sheet i {
  transition: transform var(--transition-fast);
}

.sheet-card:hover .btn-open-sheet i {
  transform: translateX(3px);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background-color: rgba(29, 64, 87, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
}

.empty-state i {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.empty-state h4 {
  font-size: 20px;
  margin-bottom: 5px;
}

.empty-state p {
  color: var(--text-muted);
}

/* Footer Section */
.footer {
  background-color: rgba(13, 31, 44, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 50px 5% 30px;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h4 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  max-width: 400px;
}

.footer-links h5, .footer-contact h5 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-contact p {
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contact i {
  color: var(--accent-color);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.footer-bottom p {
  margin-bottom: 0;
}

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

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 36px;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 600px) {
  .header-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .nav-links {
    gap: 15px;
  }
  
  .hero {
    padding-top: 50px;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Share Integration Styles */
.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-share-card {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid rgba(39, 174, 96, 0.25);
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.btn-share-card:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: rgba(39, 174, 96, 0.05);
}

.card-share-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 85px;
  background-color: var(--surface-color);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: var(--border-radius-md);
  border-bottom-right-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 15px;
  animation: slideUp var(--transition-fast) forwards;
  z-index: 5;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.share-overlay-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.8px;
}

.share-overlay-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.share-overlay-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all var(--transition-fast);
}

.share-overlay-btn:hover {
  transform: translateY(-2px);
}

.share-overlay-btn.whatsapp:hover {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
}

.share-overlay-btn.gmail:hover {
  background: #EA4335;
  border-color: #EA4335;
  color: #fff;
}

.share-overlay-btn.copy:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.share-overlay-btn.close:hover {
  background: #E74C3C;
  border-color: #E74C3C;
  color: #fff;
}

