@import "profile.css";
:root {
  /* Light Mode Palette - Day Time (Dark Fonts) */
  --primary-color: #7c3aed; /* Violet-600 */
  --secondary-color: #ec4899; /* Pink-500 */
  --accent-color: #10b981; /* Emerald-500 */
  --text-dark: #0f172a; /* Slate-900 - Dark Font for Day Time */
  --text-light: #334155; /* Slate-700 - Dark Subtext for Day Time */
  --bg-light: #f8fafc; /* Slate-50 */
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-soft: 0 10px 30px rgba(124, 58, 237, 0.05);
  --shadow-hover: 0 20px 40px rgba(124, 58, 237, 0.1);
  --gradient-btech: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  --gradient-jee: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  --card-bg: #ffffff;
}

body.dark-mode {
  /* Dark Mode Palette - Night Time (Light Fonts) */
  --text-dark: #f8fafc; /* Slate-50 - Light Font for Night Time */
  --text-light: #cbd5e1; /* Slate-300 - Light Subtext for Night Time */
  --bg-light: #0f172a; /* Slate-900 */
  --white: #1e293b; /* Slate-800 */
  --glass-bg: rgba(30, 41, 59, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.5);
  --card-bg: #1e293b;
  --primary-color: #c084fc; /* Violet-300 */
  --secondary-color: #f472b6; /* Pink-400 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  background-color: var(--bg-light);
  max-width: 100vw;
  overflow-x: hidden;
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background-color: transparent !important;
  color: var(--text-dark);
  transition: color 0.5s ease;
}

/* Abstract Background Mesh */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 15% 50%,
      rgba(124, 58, 237, 0.05),
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(236, 72, 153, 0.05),
      transparent 25%
    );
  z-index: -5;
  pointer-events: none;
}

body.dark-mode::before {
  background: radial-gradient(
      circle at 15% 50%,
      rgba(167, 139, 250, 0.15),
      transparent 30%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(244, 114, 182, 0.15),
      transparent 30%
    );
}

/* Modern Floating Pill Navbar */
.navbar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(96%, 1320px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  z-index: 2000;
  padding: 0.45rem 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
  box-shadow: 0 14px 38px rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.94);
}

body.dark-mode .navbar {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

body.dark-mode .navbar.scrolled {
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
  background: rgba(15, 23, 42, 0.95);
}

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

.logo {
  font-size: 1.26rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.3px;
  transition: transform 0.25s ease;
  white-space: nowrap !important;
  flex-shrink: 0;
}

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

.icon-grad {
  font-size: 1.55rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li {
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0 0.75rem;
  height: 36px;
  border-radius: 10px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  white-space: nowrap !important;
}

.nav-links li a:hover {
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.08);
}

.nav-links li a.active {
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.12);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.22);
}

body.dark-mode .nav-links li a:hover {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
}

body.dark-mode .nav-links li a.active {
  background: rgba(167, 139, 250, 0.18);
  color: #c4b5fd;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.3);
}

/* Dark Mode Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-left: 0.5rem;
  transition: transform 0.3s ease, color 0.3s ease;
  white-space: nowrap !important;
}

.theme-toggle:hover {
  transform: rotate(15deg);
  color: var(--primary-color);
}

.menu-toggle {
  display: none;
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--text-dark);
  flex-shrink: 0;
}

/* Hero Section */
.hero-search {
  padding: 8rem 5% 4rem;
  text-align: center;
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 45%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  filter: drop-shadow(0 4px 15px rgba(124, 58, 237, 0.2)) drop-shadow(0 2px 10px rgba(255, 255, 255, 0.9));
}

body.dark-mode .hero-content h1 {
  filter: drop-shadow(0 4px 15px rgba(124, 58, 237, 0.4)) drop-shadow(0 2px 12px rgba(0, 0, 0, 0.9));
}

.hero-content p {
  color: var(--text-light);
  margin-bottom: 2.2rem;
  font-size: 1.15rem;
  font-weight: 600;
  max-width: 650px;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.95), 0 2px 12px rgba(255, 255, 255, 0.85);
}

body.dark-mode .hero-content p {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95), 0 2px 12px rgba(0, 0, 0, 0.85);
}

.search-bar-container {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  padding: 0.85rem 1.6rem;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.12);
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1.5px solid var(--glass-border);
}

.search-bar-container:focus-within {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 15px 40px rgba(124, 58, 237, 0.25);
  border-color: var(--primary-color);
}

.search-icon {
  color: var(--text-light);
  margin-right: 1rem;
}

.search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 1rem;
  color: var(--text-dark);
  background: transparent;
}

/* Global Live Search Dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  background: var(--card-bg, #ffffff);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
  max-height: 380px;
  overflow-y: auto;
  display: none;
  z-index: 1001;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.dark-mode .search-results {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

.search-result-item {
  padding: 0.9rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

body.dark-mode .search-result-item {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected,
.search-result-item.active-nav {
  background: rgba(124, 58, 237, 0.08);
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  text-align: left;
}

.result-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-category {
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 600;
}

.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.search-clear-btn:hover {
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.1);
}

/* Updates Section */
.updates-section {
  padding: 4rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-dark);
}

.icon-title {
  color: var(--secondary-color);
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.btech-grid {
  grid-template-columns: repeat(2, 1fr);
  max-width: 900px;
  margin: 0 auto;
}

.btech-year-card {
  flex-direction: column;
  text-align: center;
  padding: 2.2rem 1.5rem;
  cursor: pointer;
  position: relative;
}

.btech-year-card .card-icon.btech-icon {
  width: 80px;
  height: 80px;
  font-size: 2rem;
  margin-bottom: 1rem;
  border-radius: 20px;
  transition: transform 0.3s ease;
}

.btech-year-card:hover .card-icon.btech-icon {
  transform: scale(1.08);
}

.btech-year-card .card-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.btech-year-card .card-content p {
  color: var(--text-light);
  line-height: 1.5;
}

.btech-year-card .arrow-link {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.btech-year-card:hover .arrow-link {
  transform: translateX(5px);
}

.btech-year-card .desktop-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.72rem;
  font-weight: 600;
}

@media (min-width: 769px) {
  .btech-year-card .hex-border,
  .btech-year-card .hex-inner {
    display: contents;
  }
  .btech-year-card .hex-badge {
    display: none !important;
  }
  .btech-year-card .desc-mobile {
    display: none !important;
  }
  .btech-year-card .desc-full {
    display: inline !important;
  }
}

/* B.Tech Mobile Hexagon Interlocking 1-2-1 Pattern & Balanced Typography */
@media (max-width: 768px) {
  .btech-grid {
    display: grid !important;
    grid-template-columns: 156px 156px !important;
    column-gap: 14px !important;
    row-gap: 0 !important;
    justify-content: center !important;
    max-width: 360px !important;
    margin: 0.25rem auto 2rem !important;
    padding: 0.25rem 0 0.5rem !important;
  }

  .btech-year-card {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 156px !important;
    height: 176px !important;
    display: block !important;
    filter: drop-shadow(0 8px 18px rgba(124, 58, 237, 0.12));
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .btech-year-card:hover,
  .btech-year-card:active {
    transform: scale(1.05) !important;
    filter: drop-shadow(0 12px 24px rgba(124, 58, 237, 0.28));
    z-index: 10 !important;
  }

  /* 1-2-1 Interlocking Positioning */
  .btech-year-card.btech-year-1 {
    grid-column: 1 / span 2 !important;
    justify-self: center !important;
    margin-bottom: -34px !important;
    z-index: 3 !important;
  }

  .btech-year-card.btech-year-2 {
    grid-column: 1 !important;
    justify-self: center !important;
    z-index: 2 !important;
  }

  .btech-year-card.btech-year-3 {
    grid-column: 2 !important;
    justify-self: center !important;
    z-index: 2 !important;
  }

  .btech-year-card.btech-year-4 {
    grid-column: 1 / span 2 !important;
    justify-self: center !important;
    margin-top: -34px !important;
    z-index: 1 !important;
  }

  /* Outer Hexagon (Gradient Border) */
  .btech-year-card .hex-border {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.38), rgba(236, 72, 153, 0.28));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
  }

  .btech-year-card.active-year .hex-border,
  .btech-year-card:hover .hex-border {
    background: linear-gradient(145deg, #7c3aed, #ec4899);
  }

  /* Inner Hexagon (Card Body) */
  .btech-year-card .hex-inner {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: var(--card-bg, #ffffff);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 12px;
    box-sizing: border-box;
  }

  .btech-year-card .card-icon.btech-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: rgba(124, 58, 237, 0.1) !important;
    color: var(--primary-color) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.05rem !important;
    margin-bottom: 3px !important;
  }

  .btech-year-card.active-year .card-icon.btech-icon {
    background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.35);
  }

  .btech-year-card .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Clean, balanced Title sizing for Hexagons */
  .btech-year-card .card-content h3 {
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin: 0 0 2px 0 !important;
    line-height: 1.2 !important;
  }

  /* Readable Description sizing */
  .btech-year-card .card-content p {
    font-size: 0.72rem !important;
    font-weight: 450 !important;
    color: var(--text-light) !important;
    line-height: 1.22 !important;
    margin: 0 !important;
    max-width: 122px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .btech-year-card .desc-full {
    display: none !important;
  }

  .btech-year-card .desc-mobile {
    display: inline !important;
  }

  .btech-year-card .desktop-badge {
    display: none !important;
  }

  .btech-year-card .arrow-link {
    display: none !important;
  }

  /* Clean, legible Status Badge */
  .btech-year-card .hex-badge {
    font-size: 0.66rem !important;
    font-weight: 600 !important;
    padding: 2.5px 8px !important;
    border-radius: 999px !important;
    margin-top: 4px !important;
    text-transform: uppercase;
    letter-spacing: 0.35px !important;
    display: inline-block;
  }

  .btech-year-card .badge-available {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
  }

  .btech-year-card .badge-soon {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
  }

  /* Responsive Promotional Banners */
  .btech-promo-card {
    padding: 1.15rem 1.25rem !important;
    border-radius: 16px !important;
    gap: 1rem !important;
  }

  .btech-promo-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.2rem !important;
    border-radius: 12px !important;
  }

  .btech-promo-tag {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    display: block !important;
    margin-bottom: 0.2rem !important;
  }

  .btech-promo-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0.15rem 0 0.25rem !important;
  }

  .btech-promo-desc {
    font-size: 0.82rem !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  .btech-promo-btn {
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    padding: 0.65rem 1.2rem !important;
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    margin-top: 0.5rem !important;
  }
}

/* Extra small mobile screens (320px - 360px) */
@media (max-width: 360px) {
  .btech-grid {
    grid-template-columns: 138px 138px !important;
    column-gap: 10px !important;
  }
  .btech-year-card {
    width: 138px !important;
    height: 156px !important;
  }
  .btech-year-card.btech-year-1 {
    margin-bottom: -30px !important;
  }
  .btech-year-card.btech-year-4 {
    margin-top: -30px !important;
  }
  .btech-year-card .card-content h3 {
    font-size: 0.92rem !important;
  }
  .btech-year-card .card-content p {
    font-size: 0.68rem !important;
    max-width: 110px !important;
  }
  .btech-year-card .hex-badge {
    font-size: 0.62rem !important;
  }
}

/* Dark Mode Hexagon Overrides */
body.dark-mode .btech-year-card .hex-inner {
  background: var(--card-bg, #1e293b);
}
body.dark-mode .btech-year-card .card-content h3 {
  color: var(--text-dark, #f8fafc) !important;
}
body.dark-mode .btech-year-card .card-content p {
  color: var(--text-light, #cbd5e1) !important;
}
body.dark-mode .btech-year-card .hex-border {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.4), rgba(244, 114, 182, 0.3));
}
body.dark-mode .btech-year-card.active-year .hex-border,
body.dark-mode .btech-year-card:hover .hex-border {
  background: linear-gradient(145deg, #a78bfa, #f472b6);
}
body.dark-mode .btech-year-card .badge-soon {
  background: rgba(167, 139, 250, 0.15);
  color: #c084fc;
}
body.dark-mode .btech-year-card .badge-available {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.update-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.update-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.btech-icon {
  background: rgba(108, 99, 255, 0.1);
  color: var(--primary-color);
}
.jee-icon {
  background: rgba(255, 101, 132, 0.1);
  color: var(--secondary-color);
}
.general-icon {
  background: rgba(76, 175, 80, 0.1);
  color: var(--accent-color);
}

.card-content {
  flex: 1;
}

.update-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.badge-btech {
  background: rgba(108, 99, 255, 0.1);
  color: var(--primary-color);
}
.badge-jee {
  background: rgba(255, 101, 132, 0.1);
  color: var(--secondary-color);
}
.badge-general {
  background: rgba(76, 175, 80, 0.1);
  color: var(--accent-color);
}

.arrow-link {
  color: var(--text-light);
  transition: transform 0.3s ease;
}

.update-card:hover .arrow-link {
  transform: translateX(5px);
  color: var(--primary-color);
}

/* Materials Section */

/* Materials Section Desktop */
.materials-section {
  padding: 1.5rem 5% 3.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.category-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.major-category {
  border-radius: 30px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  color: var(--white);
  transition: transform 0.3s ease;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.major-category:hover {
  transform: scale(1.02);
}

.btech-cat {
  background: var(--gradient-btech);
  box-shadow: 0 20px 40px rgba(108, 99, 255, 0.3);
}

.jee-cat {
  background: var(--gradient-jee);
  box-shadow: 0 20px 40px rgba(255, 101, 132, 0.3);
}

.cat-content {
  position: relative;
  z-index: 2;
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cat-header h3 {
  font-size: 2rem;
}

.cat-header .icon-box {
  background: rgba(255, 255, 255, 0.2);
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  backdrop-filter: blur(5px);
}

.major-category p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 80%;
}

.explore-btn {
  background: var(--white);
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-btech {
  color: var(--primary-color);
}
.btn-jee {
  color: var(--secondary-color);
}

.explore-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cat-bg-icon {
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 15rem;
  opacity: 0.1;
  transform: rotate(-15deg);
  z-index: 1;
}

/* Site Footer Desktop */
.site-footer {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(236, 72, 153, 0.12) 50%, rgba(6, 182, 212, 0.12) 100%) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1.5px solid rgba(124, 58, 237, 0.25);
  box-shadow: 0 -15px 40px rgba(124, 58, 237, 0.08);
  padding: 4rem 5% 1.8rem;
  margin-top: 5rem;
  position: relative;
  z-index: 10;
}

body.dark-mode .site-footer {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(88, 28, 135, 0.45) 50%, rgba(15, 23, 42, 0.92) 100%) !important;
  border-top: 1.5px solid rgba(167, 139, 250, 0.25);
  box-shadow: 0 -15px 45px rgba(0, 0, 0, 0.5);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}

body.dark-mode .footer-content {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.footer-brand h4 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary-color);
}

.footer-brand p {
  color: var(--text-light);
  line-height: 1.7;
  font-size: 0.95rem;
  max-width: 320px;
  margin-bottom: 1.2rem;
}

.footer-links-col h4,
.footer-connect h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-dark);
}

.footer-links-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-col ul li {
  margin-bottom: 0.75rem;
}

.footer-links-col ul li a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.92rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links-col ul li a:hover {
  color: var(--primary-color);
  transform: translateX(4px);
}

.footer-bottom {
  text-align: center;
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 500;
}

/* ==========================================
   Contact Page Styles
   ========================================== */
.contact-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-info-card,
.contact-form-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 22px;
  padding: 2.2rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.3s ease;
}

.contact-info-card:hover,
.contact-form-card:hover {
  box-shadow: var(--shadow-hover);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}

.contact-info-item:last-of-type {
  margin-bottom: 1rem;
}

.contact-info-item .info-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: transform 0.25s ease, background 0.25s ease;
}

.contact-info-item:hover .info-icon {
  transform: scale(1.08);
  background: rgba(124, 58, 237, 0.18);
}

.contact-info-item h4 {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.contact-info-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.contact-info-item a:hover {
  text-decoration: underline;
}

.contact-form-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
  border: 1.5px solid rgba(124, 58, 237, 0.15);
  background: var(--bg-light);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.form-submit-btn {
  background: var(--gradient-btech);
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
  transition: transform 0.25s, box-shadow 0.25s;
  align-self: flex-start;
}

.form-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45);
}

/* Dark mode for Contact */
body.dark-mode .contact-info-card,
body.dark-mode .contact-form-card {
  background: var(--card-bg, #1e293b);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .form-field input,
body.dark-mode .form-field select,
body.dark-mode .form-field textarea {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-dark, #f8fafc);
}


@media (max-width: 768px) {
  /* New Updates Compact Mobile Cards */
  .updates-section {
    padding: 1.5rem 1rem 0.85rem !important;
  }

  .updates-header {
    margin-bottom: 0.7rem !important;
  }

  .updates-header .section-title {
    font-size: 1.25rem !important;
    gap: 0.5rem !important;
    margin-bottom: 0 !important;
  }

  .updates-live-badge {
    font-size: 0.68rem !important;
    padding: 0.18rem 0.5rem !important;
  }

  .updates-marquee-wrapper {
    padding: 0.2rem 0 !important;
  }

  .updates-track {
    gap: 0.75rem !important;
  }

  .updates-track .update-card {
    width: 220px !important;
    min-width: 220px !important;
    padding: 0.65rem 0.85rem !important;
    border-radius: 14px !important;
    gap: 0.65rem !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
    align-items: center !important;
  }

  .updates-track .card-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
  }

  .updates-track .card-content {
    min-width: 0 !important;
    flex: 1 !important;
  }

  .updates-track .update-badge {
    font-size: 0.62rem !important;
    padding: 0.12rem 0.45rem !important;
    border-radius: 6px !important;
    margin-bottom: 0.2rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    display: inline-block !important;
  }

  .updates-track .card-content p {
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    color: var(--text-dark) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .updates-track .arrow-link {
    font-size: 0.72rem !important;
    opacity: 0.7 !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  /* 4. Browse Materials in 2 Columns on Mobile */
  .materials-section {
    padding: 1.25rem 1rem 3rem !important;
  }

  .category-split {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .major-category {
    padding: 1.15rem 0.9rem !important;
    min-height: auto !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .cat-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.45rem !important;
    margin-bottom: 0.4rem !important;
  }

  .cat-header .icon-box {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    font-size: 1.05rem !important;
  }

  .cat-header h3 {
    font-size: 1.05rem !important;
    line-height: 1.25 !important;
    margin: 0 !important;
  }

  .major-category p {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
    max-width: 100% !important;
    margin-bottom: 0.75rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.95 !important;
  }

  .explore-btn {
    padding: 0.45rem 0.65rem !important;
    font-size: 0.76rem !important;
    border-radius: 10px !important;
    width: 100% !important;
    justify-content: center !important;
    gap: 0.3rem !important;
  }

  /* 5. 1st Year Explorer & Drive Files on Mobile */
  .folder-explorer-wrapper {
    padding: 1rem 0.75rem 4rem;
  }

  .folder-drive-header {
    margin-bottom: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .folder-breadcrumb {
    font-size: 0.82rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    gap: 0.4rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .explorer-toolbar-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
  }

  .explorer-search-box {
    max-width: 100%;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
  }

  .explorer-toolbar-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .explorer-folder-stat {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
  }

  .explorer-drive-link-btn {
    font-size: 0.78rem;
    padding: 0.45rem 0.85rem;
  }

  .drive-folders-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .drive-folder-card {
    padding: 1.15rem;
    min-height: auto;
    border-radius: 16px;
  }

  .drive-folder-info h3 {
    font-size: 1.08rem;
  }

  .drive-folder-info p {
    font-size: 0.82rem;
  }

  .drive-subfolders-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .drive-subfolder-card {
    padding: 0.8rem 1rem;
    border-radius: 12px;
  }

  .drive-file-row {
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    border-radius: 14px;
  }

  .drive-file-left {
    width: 100%;
    min-width: 0;
  }

  .drive-file-title {
    white-space: normal;
    word-break: break-word;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .drive-file-actions-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.4rem;
  }

  .doc-action-pill {
    padding: 0.5rem 0.4rem;
    font-size: 0.78rem;
    justify-content: center;
    min-width: 0;
    white-space: nowrap;
  }

  .doc-action-pill i {
    font-size: 0.85rem;
  }

  /* 6. Minimalized Footer Layout on Mobile */
  .site-footer {
    padding: 2.2rem 1.25rem 1.5rem !important;
    margin-top: 3rem !important;
  }

  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 1.4rem !important;
    margin-bottom: 1.2rem !important;
    padding-bottom: 1.2rem !important;
    text-align: center;
  }

  .footer-brand h4 {
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
  }

  .footer-brand p {
    font-size: 0.82rem !important;
    max-width: 100% !important;
    margin: 0 auto 0.75rem !important;
    line-height: 1.38;
    color: var(--text-light);
  }

  .footer-parent-org {
    justify-content: center;
    font-size: 0.78rem;
  }

  .footer-links-col h4 {
    font-size: 0.92rem;
    margin-bottom: 0.6rem;
  }

  .footer-links-col ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.8rem;
    padding: 0;
  }

  .footer-links-col ul li {
    margin-bottom: 0;
  }

  .footer-links-col ul li a {
    font-size: 0.78rem;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.08);
  }

  .footer-connect h4 {
    font-size: 0.92rem;
    margin-bottom: 0.45rem;
  }

  .footer-connect p {
    display: none;
  }

  .social-icons {
    justify-content: center;
    gap: 0.65rem;
  }

  .social-link {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .footer-bottom {
    font-size: 0.74rem;
    padding-top: 0.85rem;
  }

  /* 7. Contact Page on Mobile */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-info-card,
  .contact-form-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .contact-info-item {
    gap: 0.85rem;
    margin-bottom: 1.25rem;
  }

  .contact-info-item .contact-email-link {
    font-size: 0.84rem;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .contact-info-item a {
    font-size: 0.84rem;
  }

  .form-group-row {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  /* 8. First Year Notes Grid on Mobile */
  .subject-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .fnotes-card {
    padding: 1.25rem;
  }

  /* 9. Tools Sidebar on Mobile */
  .tools-sidebar {
    width: min(calc(100vw - 20px), 305px) !important;
    max-width: 305px !important;
    top: 10px !important;
    height: calc(100vh - 20px) !important;
    right: -360px;
    z-index: 2500;
    box-sizing: border-box !important;
  }

  .tools-sidebar.active {
    right: 10px !important;
  }

  .sidebar-toggle-btn {
    width: 38px;
    height: 38px;
    left: -38px;
    top: 140px;
    font-size: 0.95rem;
  }

  .sidebar-content {
    padding: 0.85rem !important;
    box-sizing: border-box !important;
  }

  .tool-section {
    padding: 0.8rem 0.85rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .todo-input-group {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .todo-input-group input {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 0 !important;
    box-sizing: border-box !important;
    padding: 0.42rem 0.55rem !important;
    font-size: 0.74rem !important;
  }

  .todo-input-group input::placeholder {
    font-size: 0.72rem !important;
    color: var(--text-light) !important;
    opacity: 0.75 !important;
  }

  .todo-input-group button,
  #add-todo-btn {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-size: 0.82rem !important;
  }
}

/* ==========================================
   Document Popup Preview Modal System
   ========================================== */
.doc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1.25rem;
}

.doc-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.doc-modal-container {
  background: var(--card-bg, #ffffff);
  border-radius: 20px;
  width: 100%;
  max-width: 1080px;
  height: 88vh;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), width 0.2s, height 0.2s;
  position: relative;
}

.doc-modal-overlay.active .doc-modal-container {
  transform: scale(1);
}

/* Fullscreen mode (CSS + HTML5 Fullscreen API) */
.doc-modal-container.is-fullscreen,
.doc-modal-container:fullscreen,
.doc-modal-container:-webkit-full-screen {
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  z-index: 100000 !important;
  overflow: hidden !important;
}

/* Fullscreen Bottom Hover Trigger Zone */
.doc-modal-fs-trigger {
  display: none;
}

.doc-modal-container.is-fullscreen .doc-modal-fs-trigger,
.doc-modal-container:fullscreen .doc-modal-fs-trigger,
.doc-modal-container:-webkit-full-screen .doc-modal-fs-trigger {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: absolute;
  bottom: 0;
  top: auto;
  left: 0;
  right: 0;
  width: 100%;
  height: 48px;
  z-index: 100010;
  cursor: pointer;
  pointer-events: auto;
  background: transparent;
}

.doc-modal-fs-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  background: rgba(15, 23, 42, 0.85);
  color: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: none;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  pointer-events: auto;
  opacity: 0.9;
}

.doc-modal-fs-indicator i {
  font-size: 0.68rem;
  color: #38bdf8;
  animation: fsBounce 2s infinite ease-in-out;
}

@keyframes fsBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Bottom Rectangular Google Drive Visiting Button */
.doc-modal-bottom-drive-btn {
  display: none;
}

.doc-modal-container.is-fullscreen .doc-modal-bottom-drive-btn,
.doc-modal-container:fullscreen .doc-modal-bottom-drive-btn,
.doc-modal-container:-webkit-full-screen .doc-modal-bottom-drive-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 8px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #f1f5f9;
  font-size: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100015;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.25s ease;
}

.doc-modal-bottom-drive-btn:hover {
  transform: translateY(-2px) scale(1.06);
  background: var(--primary-color, #7c3aed);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

/* In fullscreen mode: hide the bottom controls bar until hovered or triggered */
.doc-modal-container.is-fullscreen .doc-modal-header,
.doc-modal-container:fullscreen .doc-modal-header,
.doc-modal-container:-webkit-full-screen .doc-modal-header {
  position: absolute !important;
  bottom: 0 !important;
  top: auto !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 100020 !important;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: none !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, box-shadow 0.25s ease;
}

body.dark-mode .doc-modal-container.is-fullscreen .doc-modal-header,
body.dark-mode .doc-modal-container:fullscreen .doc-modal-header,
body.dark-mode .doc-modal-container:-webkit-full-screen .doc-modal-header {
  background: rgba(17, 24, 39, 0.95);
  border-top-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.65);
}

/* Reveal bottom controls bar on hover or when header-revealed class is active */
.doc-modal-container.is-fullscreen .doc-modal-fs-trigger:hover ~ .doc-modal-header,
.doc-modal-container.is-fullscreen .doc-modal-header:hover,
.doc-modal-container.is-fullscreen.header-revealed .doc-modal-header,
.doc-modal-container:fullscreen .doc-modal-fs-trigger:hover ~ .doc-modal-header,
.doc-modal-container:fullscreen .doc-modal-header:hover,
.doc-modal-container:fullscreen.header-revealed .doc-modal-header,
.doc-modal-container:-webkit-full-screen .doc-modal-fs-trigger:hover ~ .doc-modal-header,
.doc-modal-container:-webkit-full-screen .doc-modal-header:hover,
.doc-modal-container:-webkit-full-screen.header-revealed .doc-modal-header {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: all !important;
}

/* Hide indicator pill & bottom drive button when controls bar is revealed */
.doc-modal-container.is-fullscreen .doc-modal-fs-trigger:hover .doc-modal-fs-indicator,
.doc-modal-container.is-fullscreen .doc-modal-header:hover ~ .doc-modal-fs-trigger .doc-modal-fs-indicator,
.doc-modal-container.is-fullscreen.header-revealed .doc-modal-fs-indicator,
.doc-modal-container.is-fullscreen.header-revealed .doc-modal-bottom-drive-btn,
.doc-modal-container:fullscreen .doc-modal-fs-trigger:hover .doc-modal-fs-indicator,
.doc-modal-container:fullscreen.header-revealed .doc-modal-fs-indicator,
.doc-modal-container:fullscreen.header-revealed .doc-modal-bottom-drive-btn,
.doc-modal-container:-webkit-full-screen .doc-modal-fs-trigger:hover .doc-modal-fs-indicator,
.doc-modal-container:-webkit-full-screen.header-revealed .doc-modal-fs-indicator,
.doc-modal-container:-webkit-full-screen.header-revealed .doc-modal-bottom-drive-btn {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

/* Fullscreen body & iframe completely fill the viewport */
.doc-modal-container.is-fullscreen .doc-modal-body,
.doc-modal-container:fullscreen .doc-modal-body,
.doc-modal-container:-webkit-full-screen .doc-modal-body {
  height: 100vh !important;
  width: 100vw !important;
  flex: 1 1 100% !important;
}

.doc-modal-header {
  padding: 0.9rem 1.4rem;
  background: var(--card-bg, #ffffff);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

body.dark-mode .doc-modal-header {
  background: #111827;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.doc-modal-title-area {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.doc-modal-type-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.doc-modal-type-icon.pdf {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.doc-modal-type-icon.docx {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.doc-modal-info {
  min-width: 0;
}

.doc-modal-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-modal-sub {
  font-size: 0.75rem;
  color: var(--text-light);
  display: block;
}

.doc-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.doc-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  background: var(--bg-light);
  color: var(--text-dark);
  transition: all 0.2s ease;
  font-family: inherit;
}

.doc-modal-btn.download {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.doc-modal-btn.download:hover {
  background: #059669;
  border-color: #059669;
  transform: translateY(-1px);
}

.doc-modal-btn.drive {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary-color);
  border-color: rgba(124, 58, 237, 0.2);
}

.doc-modal-btn.drive:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-1px);
}

.doc-modal-btn.fs {
  background: var(--bg-light);
  color: var(--text-dark);
}

.doc-modal-btn.fs:hover {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.doc-modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.doc-modal-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
  transform: rotate(90deg);
}

.doc-modal-body {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  background: #1e293b;
  overflow: hidden;
}

.doc-modal-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #94a3b8;
  gap: 1rem;
  z-index: 2;
  transition: opacity 0.3s ease;
  font-size: 0.9rem;
}

.doc-modal-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.doc-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(124, 58, 237, 0.2);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: docSpin 0.8s linear infinite;
}

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

#doc-modal-iframe {
  width: 100%;
  height: calc(100% + 56px);
  margin-top: -56px;
  border: none;
  background: #ffffff;
  display: block;
}

/* Coming Soon Section Styles */
.coming-soon-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  padding: 6rem 1.5rem 3rem;
}

.coming-soon-card {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 3.5rem 2.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-hover);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.8s ease-out;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.coming-soon-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.5rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(124, 58, 237, 0.15));
  border: 1px solid rgba(236, 72, 153, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--secondary-color);
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.15);
}

.coming-soon-card h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.coming-soon-card p {
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.coming-soon-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.coming-soon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.coming-soon-btn.primary {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

.coming-soon-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
}

.coming-soon-btn.secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-dark);
  border: 1px solid var(--glass-border);
}

body.dark-mode .coming-soon-btn.secondary {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-dark);
}

.coming-soon-btn.secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--primary-color);
}

/* 10. Ultra-compact modal rules for mobile phones */
@media (max-width: 768px) {
  .doc-modal-overlay {
    padding: 0 !important;
  }

  .doc-modal-container {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .doc-modal-header {
    padding: 0.65rem 0.85rem !important;
    gap: 0.5rem !important;
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: all !important;
    z-index: 50 !important;
  }

  .doc-modal-title-area {
    gap: 0.6rem !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .doc-modal-info h3 {
    font-size: 0.86rem !important;
    max-width: 140px !important;
  }

  .doc-modal-sub {
    display: none !important;
  }

  .doc-modal-actions {
    gap: 0.35rem !important;
  }

  .doc-modal-btn {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
  }

  .doc-modal-btn span {
    display: none !important;
  }

  .doc-modal-close-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
  }

  /* Critical Mobile PDF Scrolling & Touch Flow */
  .doc-modal-body {
    position: relative !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }

  #doc-modal-iframe {
    width: 100% !important;
    height: 100% !important;
    margin-top: 0 !important;
    border: none !important;
    display: block !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: auto !important;
  }

  /* Unrestricted touch gestures when in cursor/select mode */
  .doc-modal-canvas:not(.active-canvas) {
    pointer-events: none !important;
    touch-action: auto !important;
  }

  .doc-modal-canvas.active-canvas {
    touch-action: pinch-zoom !important;
  }

  /* Prevent bottom trigger from eating touch scroll on mobile */
  .doc-modal-fs-trigger {
    display: none !important;
    pointer-events: none !important;
  }

  .doc-modal-container.is-fullscreen .doc-modal-header,
  .doc-modal-container:fullscreen .doc-modal-header,
  .doc-modal-container:-webkit-full-screen .doc-modal-header {
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: all !important;
  }

  /* Compact tool dock for mobile */
  .doc-left-toolbar {
    left: 4px !important;
    top: 55px !important;
    transform: none !important;
  }

  .doc-left-toolbar.docked {
    transform: translateX(calc(-100% + 22px)) !important;
  }

  .doc-left-tools-list {
    padding: 0.35rem 0.3rem !important;
    gap: 0.3rem !important;
    border-radius: 12px !important;
  }

  .doc-tool-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
  }

  .doc-color-palette {
    padding: 0.3rem !important;
    gap: 0.3rem !important;
  }

  .color-dot {
    width: 16px !important;
    height: 16px !important;
  }

  .coming-soon-card {
    padding: 2rem 1.25rem;
  }

  .coming-soon-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .coming-soon-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   STUDENT PRODUCTIVITY SUITE STYLES
   ========================================================================== */
.suite-main-content {
  padding-top: 1.5rem;
  padding-bottom: 5rem;
}

.suite-hero {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.suite-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin: 0.8rem 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.suite-hero p {
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Nav Tabs Strip */
.suite-navigation-wrapper {
  max-width: 1200px;
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
}

.suite-nav-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  scrollbar-width: none;
}

.suite-nav-bar::-webkit-scrollbar {
  display: none;
}

.suite-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-light);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.suite-nav-btn i {
  font-size: 1.05rem;
}

.suite-nav-btn:hover {
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.08);
}

.suite-nav-btn.active {
  background: var(--gradient-btech);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

/* Pane Display */
.suite-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.suite-pane {
  display: none;
  animation: fadeInPane 0.35s ease forwards;
}

.suite-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Layouts & Cards */
.suite-two-col-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: start;
}

.suite-card-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.suite-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease;
}

.suite-card:hover {
  box-shadow: var(--shadow-hover);
}

.suite-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.suite-card-header h2,
.suite-card-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-dark);
}

.suite-card-header h2 i,
.suite-card-header h3 i {
  color: var(--primary-color);
}

.suite-subtext {
  font-size: 0.86rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

.suite-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Common Suite Inputs & Buttons */
.suite-input,
.suite-select {
  width: 100%;
  padding: 0.65rem 0.95rem;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--text-dark);
  outline: none;
  transition: all 0.2s ease;
}

.suite-input:focus,
.suite-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.suite-select-sm,
.suite-input-sm {
  padding: 0.45rem 0.75rem;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-dark);
  outline: none;
}

.suite-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--gradient-btech);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.suite-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

.suite-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suite-btn-secondary:hover {
  background: rgba(124, 58, 237, 0.18);
  transform: translateY(-1px);
}

.suite-btn-sm {
  padding: 0.45rem 0.85rem;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.suite-btn-text {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
}

.suite-icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.suite-icon-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* SGPA Table Rows */
.sgpa-headers-row {
  display: grid;
  grid-template-columns: 2.2fr 0.9fr 1.8fr 40px;
  gap: 0.75rem;
  padding: 0 0.5rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--glass-border);
}

.sgpa-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.8rem 0 1.2rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.sgpa-row-item {
  display: grid;
  grid-template-columns: 2.2fr 0.9fr 1.8fr 40px;
  gap: 0.75rem;
  align-items: center;
}

.delete-sub-btn {
  color: #ef4444 !important;
}

.delete-sub-btn:hover {
  background: rgba(239, 68, 68, 0.15) !important;
}

.sgpa-btn-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--glass-border);
}

/* SGPA Score Summary Box */
.sgpa-score-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 16px;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.sgpa-score-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.score-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
}

.score-hero {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary-color);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.badge-distinction {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-first-class {
  background: rgba(59, 130, 246, 0.18);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-second-class {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-pass {
  background: rgba(100, 116, 139, 0.18);
  color: #64748b;
}

.sgpa-stats-grid {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-lbl {
  font-size: 0.76rem;
  color: var(--text-light);
}

.stat-pill strong {
  font-size: 1.05rem;
  color: var(--text-dark);
}

/* CGPA Semesters Grid */
.cgpa-semesters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.cgpa-sem-row {
  display: grid;
  grid-template-columns: 55px 1fr 1fr;
  gap: 0.4rem;
  align-items: center;
}

.sem-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
}

.cgpa-output-banner {
  display: flex;
  justify-content: space-around;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  text-align: center;
}

.cgpa-figure,
.cgpa-pct-figure {
  display: flex;
  flex-direction: column;
}

.cgpa-lbl {
  font-size: 0.76rem;
  color: var(--text-light);
  text-transform: uppercase;
}

.cgpa-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--secondary-color);
}

.cgpa-pct {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
}

/* Target CGPA Grid */
.target-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.target-msg-container {
  margin-top: 1rem;
}

.result-box-alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  line-height: 1.45;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.alert-info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* 75% Attendance Styles */
.att-gauge-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.att-circle-container {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 auto;
}

.att-svg {
  transform: rotate(-90deg);
}

.att-svg-bg {
  fill: none;
  stroke: var(--bg-light);
  stroke-width: 9;
}

.att-svg-bar {
  fill: none;
  stroke: #10b981;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease, stroke 0.4s ease;
}

.att-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.att-big-pct {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
}

.att-center-sub {
  font-size: 0.78rem;
  color: var(--text-light);
  text-transform: uppercase;
}

.att-quick-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 220px;
}

.suite-range {
  width: 100%;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.att-alert {
  padding: 1rem 1.25rem;
  border-radius: 14px;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  font-size: 0.92rem;
}

.att-alert i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Attendance Multi-Subject Table */
.add-sub-bar {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.att-tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.att-tracker-table th {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.att-tracker-table td {
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.att-pct-pill {
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.82rem;
}

.pct-safe {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.pct-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.badge-bunk-safe {
  color: #10b981;
  font-weight: 600;
  font-size: 0.82rem;
}

.badge-bunk-danger {
  color: #ef4444;
  font-weight: 600;
  font-size: 0.82rem;
}

.att-actions-cell {
  display: flex;
  gap: 0.35rem;
}

.att-btn-plus {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.att-btn-minus {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.att-btn-del {
  background: transparent;
  color: var(--text-light);
  border: none;
  cursor: pointer;
  padding: 0.3rem;
}

.att-btn-del:hover {
  color: #ef4444;
}

/* Pomodoro Station Styles */
.pomo-hero-card {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem 2rem;
}

.pomo-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.pomo-modes {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-light);
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
}

.pomo-mode-btn {
  padding: 0.55rem 1rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pomo-mode-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.pomo-timer-wrap {
  position: relative;
  width: 250px;
  height: 250px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pomo-svg {
  transform: rotate(-90deg);
}

.pomo-bg-ring {
  fill: none;
  stroke: var(--bg-light);
  stroke-width: 10;
}

.pomo-active-ring {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.pomo-time-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pomo-digits {
  font-size: 3.8rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
}

.pomo-phase-label {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pomo-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pomo-play-btn {
  padding: 0.85rem 2.2rem;
  background: var(--gradient-btech);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.pomo-play-btn.running {
  background: #f59e0b;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.pomo-sub-btn {
  padding: 0.75rem 1.25rem;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-light);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pomo-sub-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.pomo-stats-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1.5rem;
}

.pomo-stat-item {
  display: flex;
  flex-direction: column;
}

.pomo-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
}

.pomo-stat-lbl {
  font-size: 0.78rem;
  color: var(--text-light);
  text-transform: uppercase;
}

.pomo-stat-divider {
  width: 1px;
  height: 35px;
  background: var(--glass-border);
}

/* Ambient Dock */
.pomo-ambient-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.8rem;
  background: var(--bg-light);
  border-radius: 14px;
}

.ambient-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.suite-range-sm {
  width: 70px;
  accent-color: var(--primary-color);
}

.ambient-vol-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Zen Mode Fullscreen overlay */
body.pomo-zen-active {
  overflow: hidden !important;
}

body.pomo-zen-active .navbar,
body.pomo-zen-active .site-footer,
body.pomo-zen-active .suite-hero,
body.pomo-zen-active .suite-navigation-wrapper,
body.pomo-zen-active .calc-toggle-btn,
body.pomo-zen-active .calc-modal,
body.pomo-zen-active #calc-toggle,
body.pomo-zen-active #calc-modal,
body.pomo-zen-active #scroll-to-top,
body.pomo-zen-active .scroll-to-top {
  display: none !important;
}

body.pomo-zen-active .main-content,
body.pomo-zen-active .suite-main-content,
body.pomo-zen-active .suite-container,
body.pomo-zen-active .suite-pane {
  transform: none !important;
  animation: none !important;
  filter: none !important;
  perspective: none !important;
  contain: none !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

.pomo-hero-card.zen-mode,
#pomo-station-card:fullscreen,
#pomo-station-card:-webkit-full-screen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 2147483647 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  background: rgba(248, 250, 252, 0.98) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: none !important;
  box-shadow: none !important;
  padding: 2.5rem 1.5rem !important;
  margin: 0 !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

body.dark-mode .pomo-hero-card.zen-mode,
body.dark-mode #pomo-station-card:fullscreen,
body.dark-mode #pomo-station-card:-webkit-full-screen {
  background: rgba(15, 23, 42, 0.98) !important;
}

.pomo-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pomo-hero-card.zen-mode .pomo-top-bar,
#pomo-station-card:fullscreen .pomo-top-bar,
#pomo-station-card:-webkit-full-screen .pomo-top-bar {
  width: 100%;
  max-width: 680px;
  margin-bottom: 2rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 1rem !important;
  position: relative !important;
  z-index: 10 !important;
}

.pomo-hero-card.zen-mode #pomo-zen-btn,
#pomo-station-card:fullscreen #pomo-zen-btn,
#pomo-station-card:-webkit-full-screen #pomo-zen-btn {
  display: none !important;
}

.pomo-hero-card.zen-mode #pomo-zen-exit-pill,
#pomo-station-card:fullscreen #pomo-zen-exit-pill,
#pomo-station-card:-webkit-full-screen #pomo-zen-exit-pill {
  display: inline-flex !important;
}

.pomo-zen-exit-pill {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  padding: 0.55rem 1.25rem !important;
  background: rgba(124, 58, 237, 0.14) !important;
  border: 1px solid rgba(124, 58, 237, 0.4) !important;
  color: var(--primary-color) !important;
  border-radius: 999px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
  white-space: nowrap !important;
}

.pomo-zen-exit-pill kbd {
  font-family: inherit;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.pomo-zen-exit-pill:hover {
  background: var(--primary-color) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35) !important;
}

@media (max-width: 600px) {
  .pomo-hero-card.zen-mode .pomo-top-bar,
  #pomo-station-card:fullscreen .pomo-top-bar,
  #pomo-station-card:-webkit-full-screen .pomo-top-bar {
    flex-direction: column !important;
    gap: 0.85rem !important;
    margin-bottom: 1.5rem !important;
  }
  .pomo-zen-exit-pill {
    padding: 0.45rem 1rem !important;
    font-size: 0.82rem !important;
  }
  .pomo-zen-exit-pill kbd {
    display: none !important;
  }
}

.pomo-hero-card.zen-mode .pomo-digits,
#pomo-station-card:fullscreen .pomo-digits,
#pomo-station-card:-webkit-full-screen .pomo-digits {
  font-size: clamp(4.5rem, 11vw, 7rem) !important;
}

.pomo-hero-card.zen-mode .pomo-timer-wrap,
#pomo-station-card:fullscreen .pomo-timer-wrap,
#pomo-station-card:-webkit-full-screen .pomo-timer-wrap {
  width: clamp(280px, 35vw, 360px) !important;
  height: clamp(280px, 35vw, 360px) !important;
  margin-bottom: 2rem !important;
}

.pomo-hero-card.zen-mode .pomo-svg,
#pomo-station-card:fullscreen .pomo-svg,
#pomo-station-card:-webkit-full-screen .pomo-svg {
  width: 100% !important;
  height: 100% !important;
}

/* 3D Flashcard Hub */
.flashcards-container {
  max-width: 720px;
  margin: 0 auto;
}

.flashcard-toolbar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.flashcard-scene {
  perspective: 1200px;
  margin: 2rem 0;
}

.flashcard-3d {
  width: 100%;
  min-height: 280px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  cursor: pointer;
}

.flashcard-3d.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--glass-border);
}

.flashcard-front {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(124, 58, 237, 0.05) 100%);
}

.flashcard-back {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(16, 185, 129, 0.06) 100%);
  transform: rotateY(180deg);
  border-color: rgba(16, 185, 129, 0.3);
}

.card-face-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.face-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-color);
}

.answer-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.face-flip-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-face-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 0;
}

.card-face-content p {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-dark);
}

.flashcard-footer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-progress-counter {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Flashcard Mastery Progress Strip */
.flashcard-mastery-strip {
  margin: 1.25rem 0 1.5rem;
  padding: 0.9rem 1.25rem;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}

.mastery-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.mastery-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-color);
}

.mastery-score {
  color: var(--text-light);
}

.mastery-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

body.dark-mode .mastery-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

.mastery-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed 0%, #10b981 100%);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-rich-content {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-dark);
}

.card-rich-content .katex-display {
  margin: 0.8rem 0;
}

/* Leitner SRS Action Buttons */
.flashcard-srs-actions {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  animation: fadeInPane 0.25s ease forwards;
}

.flashcard-3d.is-flipped ~ .flashcard-srs-actions,
.flashcard-srs-actions.active {
  display: flex;
}

.srs-action-btn {
  flex: 1;
  max-width: 170px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 0.85rem;
}

.srs-action-btn .srs-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.srs-action-btn .srs-text strong {
  font-size: 0.95rem;
}

.srs-action-btn .srs-text span {
  font-size: 0.72rem;
  opacity: 0.8;
}

.srs-action-btn kbd {
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

body.dark-mode .srs-action-btn kbd {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.srs-action-btn.srs-hard {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.srs-action-btn.srs-hard:hover {
  background: #ef4444;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.srs-action-btn.srs-good {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.3);
}

body.dark-mode .srs-action-btn.srs-good {
  color: #fbbf24;
}

.srs-action-btn.srs-good:hover {
  background: #f59e0b;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.srs-action-btn.srs-easy {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.srs-action-btn.srs-easy:hover {
  background: #10b981;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

/* Flashcard Shortcut Hints */
.flashcard-shortcuts-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-light);
  opacity: 0.85;
}

.flashcard-shortcuts-hint kbd {
  padding: 0.15rem 0.45rem;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.72rem;
  color: var(--primary-color);
}

/* Ambient Dock Studio Styles */
.ambient-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ambient-sync-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-light);
  cursor: pointer;
  user-select: none;
}

.ambient-sync-label input[type="checkbox"] {
  accent-color: var(--primary-color);
  cursor: pointer;
}

.ambient-controls-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: wrap;
}

.ambient-vis-canvas {
  width: 100px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
  display: block;
}

body.dark-mode .ambient-vis-canvas {
  background: rgba(255, 255, 255, 0.05);
}

.ambient-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
  transition: color 0.2s ease;
}

.ambient-icon-btn:hover {
  color: var(--primary-color);
}

.ambient-vol-val {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  min-width: 32px;
}

/* Suite Glass Modals */
.suite-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeInPane 0.2s ease forwards;
}

.suite-modal-box {
  width: 100%;
  max-width: 540px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 1.75rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.suite-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.suite-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.suite-modal-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.suite-modal-close:hover {
  color: var(--primary-color);
  background: var(--bg-light);
}

.modal-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.modal-live-preview {
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  position: relative;
  min-height: 60px;
}

.preview-tag {
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--primary-color);
  color: #fff;
}

.suite-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.deck-mgmt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 540px) {
  .deck-mgmt-grid {
    grid-template-columns: 1fr;
  }
}

.mgmt-action-card {
  padding: 1.25rem;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.mgmt-action-card i {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 0.6rem;
}

.mgmt-action-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

.mgmt-action-card p {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

/* Formula Hub */
.formula-search-box {
  position: relative;
  min-width: 260px;
}

.formula-search-box .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.formula-search-box input {
  padding-left: 2.5rem;
}

.formula-filters-strip {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.formula-filter-pill {
  padding: 0.45rem 1rem;
  border-radius: 20px;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.formula-filter-pill.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}

.formula-card {
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.formula-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-hover);
}

.formula-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.formula-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.badge-math { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge-bee { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-physics { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge-mech { background: rgba(236, 72, 153, 0.15); color: #ec4899; }

.formula-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.3rem;
  transition: color 0.2s;
}

.formula-copy-btn:hover {
  color: var(--primary-color);
}

.formula-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-dark);
}

.formula-code-box {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.6rem;
  overflow-x: auto;
}

.formula-code-box code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary-color);
}

.formula-desc {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Scratchpad Styles */
.scratchpad-card {
  display: flex;
  flex-direction: column;
}

.scratchpad-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.scratchpad-textarea {
  width: 100%;
  min-height: 420px;
  padding: 1.25rem;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-dark);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  resize: vertical;
  outline: none;
  margin: 1rem 0;
  transition: border-color 0.2s ease;
}

.scratchpad-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.scratchpad-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-light);
  padding-top: 0.5rem;
}

.stats-left {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.stat-dot {
  opacity: 0.5;
}

/* Countdown Clocks */
.countdowns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.countdown-card {
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
}

.countdown-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.countdown-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.countdown-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-color);
}

.countdown-del-btn {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.9rem;
}

.countdown-del-btn:hover {
  color: #ef4444;
}

.countdown-event-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-dark);
}

.countdown-target-date {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.countdown-digits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.countdown-digit-box {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.75rem 0.25rem;
  display: flex;
  flex-direction: column;
}

.digit-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
}

.digit-label {
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.countdown-passed-badge {
  padding: 0.75rem;
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
}

/* Responsive adjustments for Student Suite */
@media (max-width: 900px) {
  .suite-two-col-layout {
    grid-template-columns: 1fr;
  }

  .sgpa-headers-row,
  .sgpa-row-item {
    grid-template-columns: 1.8fr 0.8fr 1.6fr 36px;
    gap: 0.4rem;
  }

  .att-gauge-section {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .sgpa-headers-row {
    display: none;
  }

  .sgpa-row-item {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
      "name name"
      "credit grade"
      "action action";
    background: var(--bg-light);
    padding: 0.75rem;
    border-radius: 12px;
  }

  .sgpa-col-name { grid-area: name; }
  .sgpa-col-credit { grid-area: credit; }
  .sgpa-col-grade { grid-area: grade; }
  .sgpa-col-actions { 
    grid-area: action;
    display: flex;
    justify-content: flex-end;
  }

  .pomo-digits {
    font-size: 2.8rem;
  }

  .pomo-timer-wrap {
    width: 200px;
    height: 200px;
  }

  .pomo-svg {
    width: 200px;
    height: 200px;
  }

  .flashcard-3d {
    min-height: 240px;
  }

  .card-face-content p {
    font-size: 1.05rem;
  }
}

/* ==========================================================================
   TSM (THE STRATEGIC MENTOR) SHOWCASE STYLES
   ========================================================================== */
.tsm-subbrand-tag {
  font-size: 0.62rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.12));
  color: var(--primary-color);
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 0.35rem;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap !important;
}

.tsm-nav-pill {
  height: 36px !important;
  padding: 0 0.85rem !important;
  border-radius: 999px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.12)) !important;
  border: 1px solid rgba(124, 58, 237, 0.3) !important;
  color: var(--primary-color) !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12) !important;
  transition: all 0.25s ease !important;
  flex-shrink: 0;
}

.tsm-nav-pill:hover {
  background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35) !important;
}

.tsm-ext-icon {
  font-size: 0.75rem;
  opacity: 0.85;
}

.tsm-parent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.15rem;
  border-radius: 50px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.08);
}

.tsm-parent-badge:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.2);
}

.tsm-parent-badge i {
  color: var(--primary-color);
}

/* TSM Showcase Section */
.tsm-showcase-section {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.tsm-showcase-card {
  position: relative;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(236, 72, 153, 0.06) 50%, rgba(6, 182, 212, 0.08) 100%);
  border: 1.5px solid rgba(124, 58, 237, 0.25);
  border-radius: 24px;
  padding: 2.5rem 2.2rem;
  box-shadow: 0 15px 40px rgba(124, 58, 237, 0.12);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tsm-showcase-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.tsm-showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tsm-header-left {
  max-width: 750px;
}

.tsm-org-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.12);
  padding: 0.3rem 0.75rem;
  border-radius: 30px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  margin-bottom: 0.75rem;
}

.tsm-showcase-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.tsm-showcase-desc {
  font-size: 0.98rem;
  color: var(--text-light);
  line-height: 1.6;
}

.tsm-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.75rem;
  background: var(--gradient-btech);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.tsm-cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.5);
  color: #ffffff;
}

.tsm-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.tsm-feature-box {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.35rem 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-soft);
}

.tsm-feature-box:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-hover);
}

.tsm-feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.tsm-feat-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.tsm-feat-info p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.45;
  margin: 0;
}

/* Footer TSM Parent Org Block */
.footer-parent-org {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-parent-org span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
  font-weight: 600;
}

.footer-tsm-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary-color) !important;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-tsm-link:hover {
  transform: translateX(3px);
  color: var(--secondary-color) !important;
}

/* Sidebar TSM Button */
.sidebar-tsm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--primary-color) !important;
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.sidebar-tsm-btn:hover {
  background: var(--gradient-btech);
  color: #fff !important;
  border-color: transparent;
}





/* Hide folder file/dir count badges on card-buttons */
.drive-shared-badge,
.subfolder-badge {
  display: none !important;
}


/* ==========================================================================
   DOC PREVIEW: FLOATING LEFT CONTROL BAR & ANNOTATION TOOLS
   ========================================================================== */
.doc-modal-body {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  background: #0f172a;
  overflow: hidden;
}

/* Floating Left Control Bar Dock */
.doc-left-toolbar {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%) translateX(0);
  z-index: 10010;
  display: flex;
  align-items: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  user-select: none;
}

/* Undisturbed / Docked state: hides towards the left edge */
.doc-left-toolbar.docked {
  transform: translateY(-50%) translateX(calc(-100% + 22px));
}

.doc-left-tools-list {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 0.55rem 0.42rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Handle tab on the right side of the dock */
.doc-left-tab-handle {
  width: 22px;
  height: 54px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: none;
  border-radius: 0 12px 12px 0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 0.75rem;
}

.doc-left-tab-handle:hover {
  background: #7c3aed;
  color: #ffffff;
  width: 26px;
}

.doc-left-toolbar.docked .doc-left-tab-handle {
  color: #38bdf8;
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.doc-left-toolbar.docked .doc-left-tab-handle i {
  transform: rotate(180deg);
}

/* Tool Buttons inside Dock */
.doc-tool-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: scale(1.08);
}

.doc-tool-btn.active {
  background: rgba(124, 58, 237, 0.35);
  border-color: rgba(167, 139, 250, 0.6);
  color: #a78bfa;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.4);
}

.doc-tool-divider {
  width: 22px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0.15rem 0;
}

/* Tool Tooltip on Hover */
.doc-tool-btn .tool-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.35rem 0.65rem;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10030;
}

.doc-tool-btn:hover .tool-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Palette for Colors */
.doc-color-palette {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  padding: 0.2rem 0;
}

.doc-color-palette.active {
  display: flex;
}

.color-dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.color-dot:hover {
  transform: scale(1.25);
}

.color-dot.active {
  border-color: #ffffff;
  box-shadow: 0 0 8px var(--c);
  transform: scale(1.2);
}

/* Floating Search Bar */
.doc-search-box-floating {
  position: absolute;
  top: 18px;
  left: 65px;
  z-index: 10015;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  padding: 0.4rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}

.doc-search-box-floating.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.doc-search-box-floating input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.84rem;
  outline: none;
  width: 180px;
}

.doc-search-box-floating button {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  transition: color 0.2s;
}

.doc-search-box-floating button:hover {
  color: #ffffff;
}

.doc-search-count {
  font-size: 0.74rem;
  color: #38bdf8;
  white-space: nowrap;
}

/* Interactive Annotation Canvas Overlay */
.doc-modal-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 25;
  pointer-events: none;
  touch-action: auto;
  user-select: none;
  -webkit-user-select: none;
}

.doc-modal-canvas.active-canvas {
  pointer-events: auto !important;
  touch-action: pinch-zoom !important;
}


/* Updates Marquee & Ticker (Desktop & Mobile) */
.updates-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.updates-header .section-title {
  margin-bottom: 0;
}

.updates-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.updates-live-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.updates-marquee-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 0.5rem 0;
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.updates-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: updatesMarquee 26s linear infinite;
  will-change: transform;
}

.updates-track:hover,
.updates-track:focus-within {
  animation-play-state: paused;
}

.updates-track .update-card {
  width: 320px;
  flex-shrink: 0;
}

@keyframes updatesMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Living Study Room Environment Layer */
#study-environment-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.env-frame-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.env-frame-layer.active {
  opacity: 1 !important;
}

body.dark-mode .env-frame-layer.active {
  opacity: 1 !important;
}

.env-overlay {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none;
}

body.dark-mode .env-overlay {
  display: none !important;
  opacity: 0 !important;
}

/* Magic Theme Controls in Navbar */
.magic-theme-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap !important;
  margin-left: 0.25rem;
}

.magic-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 36px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--glass-border);
  padding: 0 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.magic-theme-btn:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
}

.magic-theme-btn .mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  transition: background 0.3s, box-shadow 0.3s;
}

.magic-theme-btn[data-mode="light"] .mode-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.magic-theme-btn[data-mode="dark"] .mode-dot {
  background: #a78bfa;
  box-shadow: 0 0 8px #a78bfa;
}

.magic-theme-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 175px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 3000;
}

.magic-theme-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.magic-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.magic-menu-item:hover {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary-color);
}

.magic-menu-item.active {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-color);
  font-weight: 600;
}


/* ==========================================================================
   NAVBAR RESPONSIVE & MOBILE DRAWER (<= 1040px)
   ========================================================================== */
@media (max-width: 1040px) {
  .navbar {
    width: min(95%, 1040px);
    padding: 0.55rem 1rem;
    border-radius: 20px;
  }

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

  .logo {
    font-size: 1.15rem;
    gap: 0.4rem;
  }

  .icon-grad {
    font-size: 1.35rem;
  }

  /* Magic theme button in mobile bar */
  .magic-theme-wrapper {
    margin-left: auto;
    margin-right: 0.6rem;
  }

  .magic-theme-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    gap: 0.35rem;
  }

  /* Hamburger Toggle Button */
  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--primary-color);
    font-size: 1.15rem;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
    transition: all 0.2s ease;
  }

  .menu-toggle:hover {
    background: rgba(124, 58, 237, 0.15);
  }

  /* Floating Dropdown Mobile Menu */
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 0;
    overflow: hidden;
    background: var(--card-bg, #ffffff);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1.5px solid var(--glass-border);
    border-radius: 18px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0 0.8rem;
    gap: 0.35rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease, opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 2200;
  }

  .nav-links.active {
    max-height: 520px;
    padding: 0.9rem 0.8rem;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    display: flex;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
  }

  .nav-links li a:hover,
  .nav-links li a.active {
    background: rgba(124, 58, 237, 0.12);
    color: var(--primary-color);
  }

  body.dark-mode .nav-links {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
  }

  .tsm-nav-pill {
    width: 100% !important;
    justify-content: center !important;
    margin-top: 0.3rem !important;
  }
}


/* ==========================================================================
   MOBILE NAVBAR POLISH & OVERFLOW PREVENTION (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .navbar {
    width: min(94%, 768px) !important;
    padding: 0.4rem 0.75rem !important;
    border-radius: 16px !important;
    top: 8px !important;
  }

  .nav-container {
    gap: 0.35rem !important;
    justify-content: space-between !important;
  }

  .logo {
    font-size: 1.02rem !important;
    gap: 0.3rem !important;
    flex-shrink: 0 !important;
  }

  .icon-grad {
    font-size: 1.2rem !important;
  }

  .tsm-subbrand-tag {
    font-size: 0.55rem !important;
    padding: 0.1rem 0.32rem !important;
    margin-left: 0.15rem !important;
  }

  .magic-theme-wrapper {
    margin-left: auto !important;
    margin-right: 0.3rem !important;
    flex-shrink: 0 !important;
  }

  .magic-theme-btn {
    height: 32px !important;
    padding: 0 0.55rem !important;
    font-size: 0.74rem !important;
    gap: 0.3rem !important;
  }

  .magic-theme-btn .mode-label-text {
    display: inline-block;
  }

  .menu-toggle {
    display: flex !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  /* Hero Section Balanced Typography */
  .hero-search {
    padding: 5rem 1rem 1.25rem !important;
    min-height: auto !important;
  }

  .hero-content h1 {
    font-size: clamp(1.65rem, 5.5vw, 1.95rem) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin-bottom: 0.4rem !important;
  }

  .hero-content p {
    font-size: 0.92rem !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
    color: var(--text-light) !important;
    max-width: 320px !important;
    margin: 0 auto 0.75rem !important;
  }

  /* General Section Headings on Mobile */
  .section-title {
    font-size: 1.3rem !important;
  }

  .section-subtitle {
    font-size: 0.85rem !important;
  }

  /* Footer Typography on Mobile */
  .site-footer {
    padding: 2.2rem 1.2rem 1.2rem !important;
  }

  .footer-brand h4 {
    font-size: 1.15rem !important;
  }

  .footer-brand p {
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
  }

  .footer-parent-org {
    font-size: 0.8rem !important;
  }

  .footer-links-col h4,
  .footer-connect h4 {
    font-size: 0.95rem !important;
    margin-bottom: 0.7rem !important;
  }

  .footer-links-col li a {
    font-size: 0.84rem !important;
  }

  .footer-connect p {
    font-size: 0.84rem !important;
  }

  .footer-bottom p {
    font-size: 0.76rem !important;
  }
}

@media (max-width: 380px) {
  .tsm-subbrand-tag {
    display: none !important;
  }
  .magic-theme-btn .mode-label-text {
    display: none !important;
  }
  .magic-theme-btn {
    padding: 0 0.45rem !important;
  }
}


/* Strict Viewport & Horizontal Overflow Prevention */
.main-content,
.hero-search,
.updates-section,
.tsm-showcase-section,
.materials-section,
.site-footer {
  max-width: 100vw;
  box-sizing: border-box;
}

.updates-section {
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

.updates-marquee-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden !important;
  position: relative;
  contain: paint;
}


/* ==========================================================================
   INTERACTIVE NOTE & SYLLABUS MODAL SYSTEM
   ========================================================================== */
.note-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 3500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem;
}

.note-modal.active {
  opacity: 1;
  pointer-events: all;
}

.note-modal-content {
  background: var(--card-bg, #ffffff);
  color: var(--text-dark);
  width: 100%;
  max-width: 950px;
  max-height: 90vh;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.note-modal.active .note-modal-content {
  transform: scale(1);
}

.note-modal-header {
  padding: 1.25rem 1.75rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-modal-header .header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.note-modal-header .header-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  backdrop-filter: blur(4px);
}

.note-modal-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  margin: 0;
}

.note-modal-header p {
  font-size: 0.85rem;
  opacity: 0.9;
  color: #ffffff;
  margin: 0.2rem 0 0 0;
}

.close-note-modal {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.close-note-modal:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg);
}

.note-modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.note-tabs-bar {
  display: flex;
  background: var(--bg-light);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  padding: 0.5rem 1rem 0 1rem;
  gap: 0.5rem;
}

body.dark-mode .note-tabs-bar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.note-tab-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.note-tab-btn.active {
  background: var(--card-bg, #ffffff);
  color: var(--primary-color);
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.03);
  border-top: 3px solid var(--primary-color);
}

.note-content-area {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.unit-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.unit-concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem 0;
}

.concept-card {
  background: var(--bg-light);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 1rem;
  transition: transform 0.2s ease;
}

body.dark-mode .concept-card {
  border-color: rgba(255, 255, 255, 0.06);
}

.concept-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--secondary-color);
}

.concept-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* PDF Preview Simulator Frame */
.pdf-viewer-simulator {
  background: #1e293b;
  border-radius: 12px;
  color: white;
  padding: 1.25rem;
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pdf-title-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #38bdf8;
}

.pdf-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pdf-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.pdf-btn.primary {
  background: var(--primary-color);
}

.pdf-btn.primary:hover {
  background: #6d28d9;
}

.pdf-preview-sheet {
  background: #ffffff;
  color: #1e293b;
  border-radius: 8px;
  padding: 1.5rem;
  min-height: 250px;
  font-family: 'Times New Roman', Times, serif;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.pdf-preview-sheet h3 {
  font-family: 'Poppins', sans-serif;
  text-align: center;
  border-bottom: 2px solid #7c3aed;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  color: #4c1d95;
}

.pdf-preview-sheet .pdf-formula-box {
  background: #f1f5f9;
  border-left: 4px solid #7c3aed;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  font-family: monospace;
  font-weight: bold;
  color: #0f172a;
}

.pdf-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 4rem;
  font-weight: 900;
  color: rgba(124, 58, 237, 0.05);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* ==========================================================================
   FLOATING TOOLS SIDEBAR (Live Clock, Study Streak, To-Do List)
   ========================================================================== */
.tools-sidebar {
  position: fixed;
  top: 20px;
  right: -340px; /* Hidden off-screen by default */
  width: 320px;
  height: calc(100vh - 40px);
  background: var(--card-bg, #ffffff);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
  z-index: 2500;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
}

body.dark-mode .tools-sidebar {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}

.tools-sidebar.active {
  right: 20px; /* Slides in smoothly */
}

.sidebar-toggle-btn {
  position: absolute;
  left: -46px;
  top: 120px;
  width: 46px;
  height: 46px;
  background: var(--card-bg, #ffffff);
  border-radius: 14px 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  cursor: pointer;
  box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.08);
  font-size: 1.15rem;
  border: 1px solid var(--glass-border);
  border-right: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.dark-mode .sidebar-toggle-btn {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  color: #c4b5fd;
}

.sidebar-toggle-btn:hover {
  transform: scale(1.05);
  color: var(--secondary-color);
}

.sidebar-content {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.tool-section {
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1rem;
}

body.dark-mode .tool-section {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

.tool-section h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.live-clock {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  font-family: monospace;
  letter-spacing: 1px;
  line-height: 1.2;
}

.live-date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.2rem;
  font-weight: 500;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.calendar-weekdays {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.calendar-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 4px;
  text-align: center;
}

.calendar-day {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.calendar-day:hover {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-color);
}

.calendar-day.studied,
.calendar-day.streak-active {
  background: rgba(236, 72, 153, 0.2) !important;
  color: var(--secondary-color) !important;
  font-weight: 700;
}

.calendar-day.today {
  border: 1.5px solid var(--primary-color);
}

.streak-info {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  text-align: center;
}

.todo-input-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
  width: 100%;
  box-sizing: border-box;
}

.todo-input-group input {
  flex: 1 1 0%;
  min-width: 0;
  width: 0;
  box-sizing: border-box;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--card-bg, #ffffff);
  color: var(--text-dark);
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
}

.todo-input-group input::placeholder {
  font-size: 0.74rem;
  color: var(--text-light);
  opacity: 0.72;
}

.todo-input-group button,
#add-todo-btn {
  background: var(--gradient-btech);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  height: 34px;
  min-height: 34px;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.25);
  transition: background 0.2s, transform 0.15s;
}

.todo-input-group button:hover,
#add-todo-btn:hover {
  transform: scale(1.05);
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.todo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.55rem;
  background: var(--card-bg, #ffffff);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-dark);
  border: 1px solid var(--glass-border);
}

.todo-list li.completed .todo-text {
  text-decoration: line-through;
  opacity: 0.6;
}

.todo-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: pointer;
  color: transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.todo-list li.completed .todo-checkbox {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.todo-text {
  flex: 1;
  margin: 0 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-delete {
  cursor: pointer;
  color: var(--text-light);
  font-size: 0.75rem;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.todo-delete:hover {
  color: #ef4444;
}

.suite-launcher-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-tsm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(124, 58, 237, 0.12));
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.sidebar-tsm-btn:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(124, 58, 237, 0.22));
  transform: translateY(-1px);
}


/* ==========================================================================
   GOOGLE DRIVE FOLDER EXPLORER SYSTEM (DESKTOP)
   ========================================================================== */
.folder-explorer-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 5rem;
  width: 100%;
}

.folder-drive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.folder-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-light);
  flex-wrap: wrap;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 0.6rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.folder-breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.folder-breadcrumb a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.folder-breadcrumb .sep {
  opacity: 0.4;
  font-size: 0.8rem;
}

.folder-breadcrumb .current-folder {
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.explorer-toolbar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 0.9rem 1.4rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  margin-bottom: 1.5rem;
}

.explorer-search-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg, #ffffff);
  padding: 0.55rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  flex: 1;
  max-width: 450px;
  transition: all 0.2s ease;
}

.explorer-search-box i {
  color: var(--text-light);
  font-size: 0.9rem;
}

.explorer-search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.explorer-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.explorer-folder-stat {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--bg-light);
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.explorer-drive-link-btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.1);
  padding: 0.45rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.explorer-drive-link-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

.drive-folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.drive-folder-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
  min-height: 160px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.drive-folder-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 16px 36px rgba(124, 58, 237, 0.16);
}

.drive-folder-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.drive-folder-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.drive-folder-card:hover .drive-folder-icon-wrap {
  transform: scale(1.1);
}

.drive-folder-icon-wrap.color-assignments { background: rgba(245, 158, 11, 0.14); color: #f59e0b; }
.drive-folder-icon-wrap.color-books { background: rgba(16, 185, 129, 0.14); color: #10b981; }
.drive-folder-icon-wrap.color-docs { background: rgba(6, 182, 212, 0.14); color: #06b6d4; }
.drive-folder-icon-wrap.color-lab { background: rgba(239, 68, 68, 0.14); color: #ef4444; }
.drive-folder-icon-wrap.color-lectures { background: rgba(99, 102, 241, 0.14); color: #6366f1; }
.drive-folder-icon-wrap.color-notes { background: rgba(139, 92, 246, 0.14); color: #8b5cf6; }
.drive-folder-icon-wrap.color-coding { background: rgba(236, 72, 153, 0.14); color: #ec4899; }
.drive-folder-icon-wrap.color-pyqs { background: rgba(14, 165, 233, 0.14); color: #0ea5e9; }
.drive-folder-icon-wrap.color-syllabus { background: rgba(34, 197, 94, 0.14); color: #22c55e; }

.drive-shared-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.drive-folder-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.35rem;
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.drive-folder-info p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.4;
}

/* Subfolders & File Rows */
.drive-subfolders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.drive-subfolder-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.25s ease;
  cursor: pointer;
}

.drive-subfolder-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.12);
}

.drive-files-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drive-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.4rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  gap: 1rem;
  transition: all 0.2s ease;
}

.drive-file-row:hover {
  background: var(--card-bg, #ffffff);
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.drive-file-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.drive-file-icon {
  font-size: 1.3rem;
  color: #ef4444;
  flex-shrink: 0;
}

.drive-file-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



.explorer-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.explorer-section-title i {
  color: var(--primary-color);
}

.file-explorer-card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  overflow: hidden;
}

.drive-file-list,
.drive-files-list {
  display: flex;
  flex-direction: column;
}

.drive-file-title-wrap {
  min-width: 0;
  flex: 1;
}

.breadcrumb-jump {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.breadcrumb-jump:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.drive-file-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.doc-action-pill {
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--bg-light);
  color: var(--text-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.doc-action-pill:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.doc-action-pill.preview {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary-color);
  border-color: rgba(124, 58, 237, 0.2);
}

.doc-action-pill.preview:hover {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  transform: translateY(-1px);
}

.doc-action-pill.download {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.2);
}

.doc-action-pill.download:hover {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.doc-action-pill.drive {
  background: var(--bg-light);
  color: var(--text-light);
  padding: 0.45rem 0.65rem;
}

.doc-action-pill.drive:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.subfolder-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  flex: 1;
}

.subfolder-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.subfolder-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subfolder-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--bg-light);
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.explorer-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--glass-bg);
  border-radius: 16px;
  border: 1px dashed var(--glass-border);
  color: var(--text-light);
  width: 100%;
}

.explorer-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  opacity: 0.4;
}

.explorer-empty-state h4 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.drive-file-icon.pdf {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.drive-file-icon.docx {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.drive-file-icon.pptx {
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
}

.drive-file-icon.txt {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.drive-file-icon.zip {
  background: rgba(202, 138, 4, 0.12);
  color: #ca8a04;
}

.drive-file-icon.code {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}

.drive-file-icon.img {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}



/* ==========================================
   Advanced Scientific & STEM Calculator Styles
   ========================================== */
.calc-toggle-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.25);
  font-size: 1.25rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1999;
  border: 1px solid var(--glass-border);
}

.calc-toggle-btn:hover {
  transform: scale(1.12) rotate(8deg);
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.4);
}

.calc-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 15px;
}

.calc-modal.active {
  opacity: 1;
  pointer-events: all;
}

.calc-content {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  width: 490px;
  max-width: min(94vw, 490px);
  max-height: 94vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(15px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  color: var(--text-dark);
}

.calc-modal.active .calc-content {
  transform: scale(1) translateY(0);
}

/* Header */
.calc-header {
  display: flex;
  justify-content: space-between;
  padding: 1.1rem 1.3rem 0.75rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.calc-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
}

.calc-header-title i {
  font-size: 1.2rem;
}

.calc-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.calc-header-actions i {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-light);
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.calc-header-actions i:hover {
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.1);
}

/* Tab Navigation */
.calc-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.6rem 1.1rem;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(124, 58, 237, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.calc-tabs::-webkit-scrollbar { display: none; }

.calc-tab-btn {
  background: transparent;
  border: none;
  padding: 0.45rem 0.8rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.calc-tab-btn:hover {
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.08);
}

.calc-tab-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Tab Panes */
.calc-body {
  padding: 1.1rem;
  overflow-y: auto;
  flex: 1;
}

.calc-pane {
  display: none;
  animation: calcFadeIn 0.25s ease forwards;
}

.calc-pane.active {
  display: block;
}

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

/* Scientific Calculator Display */
.calc-screen {
  background: var(--bg-light);
  padding: 0.85rem 1rem;
  border-radius: 16px;
  margin-bottom: 0.9rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--glass-border);
}

.calc-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

.calc-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.calc-badge-btn {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calc-badge-btn:hover, .calc-badge-btn.active {
  background: var(--primary-color);
  color: #ffffff;
}

.calc-mem-indicator {
  font-weight: 700;
  color: #10b981;
  font-size: 0.75rem;
  display: none;
}

.calc-mem-indicator.active {
  display: inline-block;
}

.calc-screen-actions {
  display: flex;
  gap: 0.35rem;
}

.calc-action-icon {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.calc-action-icon:hover {
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.1);
}

#calc-input {
  border: none;
  background: transparent;
  text-align: right;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-dark);
  font-family: 'Poppins', monospace;
  outline: none;
  padding: 0.15rem 0;
}

.calc-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  min-height: 28px;
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.calc-preview-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#calc-result {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: right;
  word-break: break-all;
  font-family: 'Poppins', monospace;
}

/* Keypad Grids */
.calc-grid-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-row-memory {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.calc-row-memory .calc-btn {
  padding: 6px 2px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
}

.calc-grid-scientific {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.calc-btn {
  padding: 10px 4px;
  border: none;
  border-radius: 11px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.calc-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.calc-btn:active {
  transform: translateY(1px);
}

/* Button Variants */
.calc-btn.num {
  background: var(--white);
  color: var(--text-dark);
  font-size: 1.05rem;
}

.calc-btn.fn {
  background: rgba(124, 58, 237, 0.08);
  color: var(--primary-color);
  font-size: 0.85rem;
}

.calc-btn.op {
  background: rgba(124, 58, 237, 0.16);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.05rem;
}

.calc-btn.clear {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  font-weight: 700;
}

.calc-btn.del {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.calc-btn.equals {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #ffffff;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.calc-btn.active-state {
  background: var(--primary-color) !important;
  color: #ffffff !important;
}

/* Converter Tab */
.converter-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.conv-category-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
}

.conv-cat-pill {
  padding: 0.35rem 0.75rem;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.conv-cat-pill.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.conv-box {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.conv-row {
  display: grid;
  grid-template-columns: 1fr 125px;
  gap: 0.8rem;
}

.conv-input {
  background: var(--white);
  border: 1px solid var(--glass-border);
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-size: 1.05rem;
  color: var(--text-dark);
  font-weight: 600;
  font-family: 'Poppins', monospace;
  outline: none;
}

.conv-select {
  background: var(--white);
  border: 1px solid var(--glass-border);
  padding: 0.6rem 0.6rem;
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--text-dark);
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.conv-swap-center {
  display: flex;
  justify-content: center;
  margin: -0.2rem 0;
}

.conv-swap-btn {
  background: var(--white);
  border: 1px solid var(--glass-border);
  color: var(--primary-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.conv-swap-btn:hover {
  transform: rotate(180deg) scale(1.1);
  background: var(--primary-color);
  color: #ffffff;
}

.conv-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(124, 58, 237, 0.15);
}

.conv-formula-tag {
  font-size: 0.75rem;
  color: var(--text-light);
}

.conv-actions {
  display: flex;
  gap: 0.6rem;
}

.conv-action-btn {
  background: rgba(124, 58, 237, 0.1);
  border: none;
  color: var(--primary-color);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.conv-action-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* Solvers Tab */
.solver-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.solver-nav-pills {
  display: flex;
  gap: 0.5rem;
}

.solver-pill {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.6rem;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.solver-pill.active {
  background: var(--primary-color);
  color: #ffffff;
}

.solver-card {
  background: var(--bg-light);
  padding: 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

.solver-formula-header {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
  text-align: center;
}

.solver-inputs-grid {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  margin: 0.8rem 0;
  flex-wrap: wrap;
}

.solver-input-group {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.solver-input-group label {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.solver-field {
  width: 62px;
  background: var(--white);
  border: 1px solid var(--glass-border);
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
}

.solver-btn {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  margin-top: 0.5rem;
}

.solver-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.solver-result-box {
  margin-top: 0.9rem;
  padding: 0.85rem;
  background: var(--white);
  border-radius: 12px;
  font-size: 0.85rem;
  border: 1px solid var(--glass-border);
  display: none;
}

.solver-result-box.active {
  display: block;
  animation: calcFadeIn 0.2s ease;
}

.solver-root-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

.solver-root-row:last-child {
  border-bottom: none;
}

/* Constants Tab */
.constants-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.constants-search {
  width: 100%;
  background: var(--bg-light);
  border: 1px solid var(--glass-border);
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text-dark);
  outline: none;
}

.constants-list {
  max-height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-right: 4px;
}

.constant-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-light);
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  transition: all 0.2s ease;
}

.constant-item:hover {
  border-color: var(--primary-color);
  transform: translateX(2px);
}

.constant-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.constant-name {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-dark);
}

.constant-val {
  font-size: 0.76rem;
  color: var(--text-light);
  font-family: monospace;
}

.constant-actions {
  display: flex;
  gap: 0.35rem;
}

.const-btn {
  background: var(--white);
  border: 1px solid var(--glass-border);
  color: var(--primary-color);
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.const-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* History Tab */
.history-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.history-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.history-clear-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.history-clear-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.history-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-right: 4px;
}

.history-item {
  background: var(--bg-light);
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-item:hover {
  border-color: var(--primary-color);
  background: rgba(124, 58, 237, 0.05);
}

.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.history-time {
  font-size: 0.7rem;
  color: var(--text-light);
}

.history-expr {
  font-size: 0.82rem;
  color: var(--text-light);
  text-align: right;
  font-family: monospace;
}

.history-res {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: right;
  font-family: monospace;
}

.history-empty {
  text-align: center;
  color: var(--text-light);
  padding: 2.5rem 0;
  font-size: 0.88rem;
}


.formula-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-light);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.formula-empty i {
  font-size: 2rem;
  opacity: 0.4;
  margin-bottom: 0.4rem;
}

@media (max-width: 480px) {
  .updates-track .update-card {
    width: 200px !important;
    min-width: 200px !important;
    padding: 0.55rem 0.75rem !important;
    gap: 0.55rem !important;
  }

  .updates-track .card-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 0.88rem !important;
  }

  .updates-track .card-content p {
    font-size: 0.72rem !important;
    line-height: 1.28 !important;
  }
}
