/* ==========================================================================
   CSC VLE Tools - Main Stylesheet (style.css)
   Clean, Responsive, Mobile-first Design with Dark Mode Support
   ========================================================================== */

:root {
  --blue: #1565c0;
  --blue-d: #0d47a1;
  --blue-light: #e3f0ff;
  --orange: #e65100;
  --orange-light: #fff0e3;
  --yellow: #ffd54f;
  --bg: #f4f7fc;
  --card: #ffffff;
  --text: #1a2538;
  --muted: #5b6b82;
  --line: #e3e9f3;
  --green: #1b8a4b;
  --green-bg: #e6f6ec;
  --red: #d32f2f;
  --red-bg: #fde8e8;
  --shadow: 0 4px 16px rgba(21, 101, 192, 0.08);
  --shadow-lg: 0 10px 30px rgba(21, 101, 192, 0.16);
  --radius: 12px;
  --radius-lg: 16px;
  --font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.25s ease;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1626;
    --card: #16213a;
    --text: #eaf0fb;
    --muted: #9fb0cc;
    --line: #26355a;
    --blue-light: #182a4d;
    --orange-light: #3d2314;
    --green-bg: #133424;
    --red-bg: #3a1515;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
  }
}

[data-theme="dark"] {
  --bg: #0e1626;
  --card: #16213a;
  --text: #eaf0fb;
  --muted: #9fb0cc;
  --line: #26355a;
  --blue-light: #182a4d;
  --orange-light: #3d2314;
  --green-bg: #133424;
  --red-bg: #3a1515;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
  --bg: #f4f7fc;
  --card: #ffffff;
  --text: #1a2538;
  --muted: #5b6b82;
  --line: #e3e9f3;
  --blue-light: #e3f0ff;
  --orange-light: #fff0e3;
  --green-bg: #e6f6ec;
  --red-bg: #fde8e8;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
  width: 100%;
}

/* Top Notification / Contact Bar */
.top-bar {
  background: var(--blue-d);
  color: #cfe0ff;
  font-size: 12.5px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-bar a {
  color: #ffffff;
  text-decoration: underline;
}

.top-bar .social-links {
  display: flex;
  gap: 14px;
}

/* Header & Navigation */
header.nav {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

header.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.logo i {
  background: #fff;
  color: var(--blue);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.logo span {
  display: inline-block;
}

nav.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}

nav.nav-menu a {
  color: #e6efff;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

nav.nav-menu a:hover,
nav.nav-menu a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

nav.nav-menu a.blog-badge {
  background: var(--orange);
  color: #fff;
  font-weight: 600;
}

nav.nav-menu a.blog-badge:hover {
  background: #bf4300;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-auth-nav {
  background: #ffffff;
  color: var(--blue) !important;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 13.5px;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.8);
}

.btn-auth-nav:hover {
  background: #eef4ff !important;
  color: var(--blue-d) !important;
  transform: translateY(-1px);
}

.user-badge-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
}

.user-badge-nav .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--yellow);
  color: #333;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.user-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  border-radius: 12px;
  min-width: 220px;
  padding: 10px 0;
  display: none;
  z-index: 1000;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown .user-info {
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}

.user-dropdown .user-info strong {
  display: block;
  font-size: 14px;
}

.user-dropdown .user-info small {
  color: var(--muted);
  font-size: 12px;
}

.user-dropdown a,
.user-dropdown button {
  width: 100%;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  background: none;
  border: none;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--bg);
  color: var(--blue);
}

.user-dropdown .logout-btn {
  color: var(--red);
  border-top: 1px solid var(--line);
}

.burger {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  padding: 6px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
  color: #fff;
  text-align: center;
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.crumb {
  font-size: 13px;
  color: #cfe0ff;
  margin-bottom: 14px;
}

.crumb a {
  color: #cfe0ff;
}

.crumb a:hover {
  text-decoration: underline;
  color: #fff;
}

.pill {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 99px;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(230, 81, 0, 0.4);
}

h1 {
  font-size: clamp(28px, 5.2vw, 44px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

h1 span {
  color: var(--yellow);
}

.hero p {
  max-width: 660px;
  margin: 14px auto 0;
  color: #dbe8ff;
  font-size: clamp(14px, 2.3vw, 16.5px);
  line-height: 1.6;
}

/* Search bar in Hero */
.search-box {
  max-width: 540px;
  margin: 26px auto 0;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 15px 22px;
  padding-left: 48px;
  border-radius: 99px;
  border: 0;
  font: inherit;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  color: #1a2538;
  background: #ffffff;
  outline: none;
}

.search-box .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--muted);
  pointer-events: none;
}

/* Stats in Hero */
.stats {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 5vw, 48px);
  margin-top: 28px;
  flex-wrap: wrap;
}

.stats > div {
  text-align: center;
}

.stats b {
  display: block;
  font-size: 26px;
  font-weight: 800;
}

.stats small {
  font-size: 12.5px;
  color: #cfe0ff;
}

/* Notice Box */
.notice {
  background: #fff8e1;
  border: 1px solid #ffe08a;
  color: #5c4400;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 13.5px;
  margin: -24px auto 28px;
  position: relative;
  max-width: 1000px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .notice {
    background: #2b2410;
    border-color: #6b5513;
    color: #f4dd96;
  }
}

[data-theme="dark"] .notice {
  background: #2b2410;
  border-color: #6b5513;
  color: #f4dd96;
}

/* Category Filter Chips */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 30px 0 24px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 99px;
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.chip[aria-pressed="true"] {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.25);
}

/* Section Headings */
section.cat {
  margin-top: 40px;
}

section.cat[hidden] {
  display: none;
}

.cat-header {
  margin-bottom: 18px;
}

.cat-header h2 {
  font-size: clamp(20px, 3.2vw, 26px);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-header p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}

/* Card Grid & Square Tool Card Styles (Exact Uploaded Design) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 14px;
  gap: 6px;
  text-align: center;
  align-items: center;
  background: var(--card, #ffffff) !important;
  border: 1px solid var(--line, #e3e9f3);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(21, 101, 192, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(21, 101, 192, 0.18);
}

.card[hidden] {
  display: none !important;
}

.card header, article.card header, .grid .card header, .card .card-head, article.card .card-head, .grid .card .card-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 18px !important;
  background: transparent !important;
  background-color: transparent !important;
  position: static !important;
  box-shadow: none !important;
  z-index: auto !important;
  border: none !important;
  width: auto !important;
}

.ico {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: #e3f0ff;
  transition: transform 0.2s ease;
}

.card.o .ico {
  background: #fff0e3;
}

.card:hover .ico {
  transform: scale(1.08);
}

.card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text, #1a2538);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--green-bg, #e6f6ec);
  color: var(--green, #1b8a4b);
}

.badge.soon {
  background: #eef1f6;
  color: #5b6b82;
}

.badge.featured {
  background: #fff0e3;
  color: #e65100;
}

.card p {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted, #5b6b82);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card ul {
  display: none !important;
}

.btn {
  margin-top: auto;
  width: 100%;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  color: #fff;
  background: var(--blue, #1565c0);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--blue-d, #0d47a1);
}

.card.o .btn {
  background: var(--orange, #e65100);
}

.card.o .btn:hover {
  background: #bf360c;
}

.btn.off {
  background: #dfe5ef;
  color: #6a7a92;
  pointer-events: none;
}

/* Favorite Heart Button */
.fav {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding: 0;
  z-index: 5;
}

.fav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #9aa8bf;
  stroke-width: 2;
  transition: transform 0.2s, fill 0.2s;
}

.fav:hover svg {
  stroke: #e53935;
  transform: scale(1.18);
}

.fav[aria-pressed="true"] svg {
  fill: #e53935;
  stroke: #e53935;
}

/* Popular / Usage badge on card */
.clicks-count {
  position: absolute;
  bottom: 56px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Empty State */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 50px 20px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin: 30px 0;
  font-size: 15px;
}

/* Call to Action Box */
.cta {
  margin: 56px 0 0;
  background: linear-gradient(135deg, #0d47a1, #1976d2);
  color: #fff;
  border-radius: 20px;
  padding: 38px 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(13, 71, 161, 0.2);
}

.cta h2 {
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 700;
}

.cta p {
  color: #dbe8ff;
  font-size: 14.5px;
  margin: 8px auto 20px;
  max-width: 600px;
}

.cta .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 14.5px;
  transition: var(--transition);
}

.cta .btn-cta:hover {
  background: #bf4300;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 81, 0, 0.4);
}

/* Footer */
footer {
  margin-top: 56px;
  background: var(--blue-d);
  color: #b9cdf0;
  font-size: 13px;
  padding: 40px 18px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 15px;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col p {
  font-size: 13px;
  line-height: 1.6;
  color: #d0e0fb;
  margin-top: 8px;
}

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

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

.footer-links a {
  color: #cfe0ff;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 12.5px;
  color: #a4c0eb;
}

.footer-bottom a {
  color: #fff;
  margin: 0 8px;
}

/* Modals & Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 55, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  border: 1px solid rgba(21, 101, 192, 0.15);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(13, 71, 161, 0.28);
  max-width: 440px;
  width: 100%;
  padding: 28px 24px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  font-family: inherit;
}

.modal-backdrop.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 20px;
  cursor: pointer;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: rotate(90deg);
}

/* Modal Auth Icon Badge & Header */
.modal-auth-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef4ff 0%, #dbeafe 100%);
  border: 2px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.12);
}

.modal-auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #0D47A1;
  margin: 0 0 6px;
}

.modal-auth-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 16px;
  line-height: 1.45;
}

/* Modal Tabs (matching navigation button style) */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 99px;
  gap: 4px;
  margin-bottom: 18px;
  border: 1px solid #e2e8f0;
}

.auth-tab {
  flex: 1;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.auth-tab.active {
  background: #1565C0;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(21, 101, 192, 0.3);
}

.auth-tab:hover:not(.active) {
  color: #0D47A1;
  background: rgba(21, 101, 192, 0.08);
}

/* Modal Form Controls */
.modal-card .form-group {
  margin-bottom: 13px;
  text-align: left;
}

.modal-card .form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}

.modal-card .form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 13.5px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: all 0.2s ease;
}

.modal-card .form-control:focus {
  border-color: #1565C0;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.18);
}

/* Modal Auth Submit Button (Matching Main Menu Button & Home Theme) */
.btn-auth-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(21, 101, 192, 0.35);
  transition: all 0.25s ease;
  font-family: inherit;
  text-decoration: none;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, #0D47A1 0%, #082d64 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21, 101, 192, 0.45);
}

.modal-demo-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

.modal-demo-hint strong {
  color: #1565C0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: #1a2538;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.toast.success {
  border-left: 4px solid #2e7d32;
}

.toast.error {
  border-left: 4px solid #d32f2f;
}

.toast.info {
  border-left: 4px solid var(--blue);
}

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

/* Static Content Pages (About, Contact, Privacy, Terms) */
.page-header {
  background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
  color: #fff;
  padding: 48px 0;
  text-align: center;
}

.content-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 36px auto;
  box-shadow: var(--shadow);
  max-width: 960px;
}

.content-box h2 {
  font-size: 22px;
  margin: 24px 0 10px;
  color: var(--blue-d);
}

.content-box h3 {
  font-size: 18px;
  margin: 18px 0 8px;
}

.content-box p {
  margin-bottom: 14px;
  color: var(--text);
  line-height: 1.7;
}

.content-box ul,
.content-box ol {
  margin: 12px 0 16px 24px;
  line-height: 1.7;
}

.content-box li {
  margin-bottom: 6px;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 820px) {
  .burger {
    display: block;
  }

  nav.nav-menu ul {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: var(--blue-d);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 18px 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  }

  nav.nav-menu ul.open {
    display: flex;
  }

  nav.nav-menu a {
    padding: 10px 14px;
    font-size: 15px;
  }

  .top-bar .wrap span:last-child {
    display: none;
  }

  .hero {
    padding: 42px 0 54px;
  }
}

@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .content-box {
    padding: 22px 18px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card {
    padding: 10px;
  }

  .card header, .card .card-head {
    margin-top: 14px !important;
    gap: 6px !important;
    background: transparent !important;
  }

  .ico {
    width: 42px;
    height: 42px;
    font-size: 21px;
  }

  .card h3 {
    font-size: 12.5px;
    line-height: 1.3;
  }

  .card p {
    display: none;
  }

  .badge {
    font-size: 9px;
    top: 8px;
    left: 8px;
    padding: 2px 7px;
  }

  .btn {
    font-size: 12px;
    min-height: 36px;
    padding: 6px;
  }

  .fav {
    top: 2px;
    right: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   Floating WhatsApp Direct Support Button
   ========================================================================== */
.whatsapp-float-container {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  pointer-events: auto !important;
  transition: transform 0.25s ease !important;
}

.whatsapp-float-container:hover {
  transform: translateY(-3px) scale(1.05) !important;
}

.whatsapp-tooltip {
  background: var(--card, #ffffff);
  color: var(--text, #1a2538);
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line, #e3e9f3);
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.whatsapp-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  border: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
}

.whatsapp-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: waPulse 2s infinite ease-out;
  pointer-events: none;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}

@media (max-width: 480px) {
  .whatsapp-float-container {
    bottom: 18px !important;
    right: 18px !important;
  }
  .whatsapp-btn {
    width: 48px;
    height: 48px;
  }
  .whatsapp-btn svg {
    width: 26px;
    height: 26px;
  }
  .whatsapp-tooltip {
    display: none;
  }
}
  .whatsapp-btn {
    width: 48px;
    height: 48px;
  }
  .whatsapp-btn svg {
    width: 26px;
    height: 26px;
  }
  .whatsapp-tooltip {
    display: none;
  }
}



/* ============================================================
   CONTENT & SOURCE CODE PROTECTION - CSC VLE TOOLS
   ============================================================ */
* {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

input, textarea, select, [contenteditable="true"], .allow-select {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

img {
  -webkit-user-drag: none !important;
  user-drag: none !important;
  pointer-events: none;
}

a, button, input, select, textarea, .tool-card, .btn-primary, .btn-secondary {
  pointer-events: auto !important;
}


/* ===== UNIFIED SITE HEADER (MATCHING HOME PAGE) ===== */
body > header, header.site-header {
  background: var(--csc-blue-dark, #0D47A1) !important;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* Ensure inner tool card headers and card-head are never affected by site-header styles */
.card header, article.card header, .grid .card header, .card .card-head, article.card .card-head, .grid .card .card-head {
  background: transparent !important;
  background-color: transparent !important;
  position: static !important;
  box-shadow: none !important;
  z-index: auto !important;
  border: none !important;
}

.card, article.card {
  background: #ffffff !important;
}

.top-bar {
  background: var(--csc-blue, #1565C0);
  padding: 6px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
  position: relative;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.logo-text h1 {
  color: #ffffff;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.logo-text span {
  display: block;
  color: #ffffff;
  opacity: 0.85;
  font-size: 12px;
}

nav ul, .nav-menu ul {
  display: flex;
  list-style: none;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 0;
}

nav a, .nav-menu a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

nav a:hover, .nav-menu a:hover { background: rgba(255,255,255,0.15); color: white; }
nav a.active, .nav-menu a.active { background: var(--csc-orange, #E65100); color: white; }

.nav-cta {
  background: var(--csc-orange, #E65100) !important;
  color: white !important;
  font-weight: 600 !important;
}

.nav-cta:hover { background: var(--csc-orange-light, #FF6D00) !important; }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
}

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

@media (max-width: 860px) {
  .hamburger { display: flex; }
  nav ul, .nav-menu ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--csc-blue-dark, #0D47A1);
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    gap: 4px;
    z-index: 100;
  }
  nav ul.open, .nav-menu ul.open { display: flex; }
  nav a, .nav-menu a { padding: 12px 16px; border-radius: 8px; display: block; }
}


/* ==============================================================
   CSC VLE TOOLS - SUBSCRIPTION & MEMBERSHIP UI SYSTEM
   ============================================================== */
.subscription-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.sub-active {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
.sub-warning {
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffe082;
}
.sub-expired, .sub-inactive {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

/* User dropdown subscription info box */
.user-dropdown .sub-info-card {
  margin: 8px 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
  color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.2);
}
.user-dropdown .sub-info-card .sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.user-dropdown .sub-info-card .plan-name {
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.user-dropdown .sub-info-card .expiry-date {
  font-size: 11px;
  opacity: 0.9;
  display: block;
}
.user-dropdown .sub-info-card .renew-btn {
  display: inline-block;
  margin-top: 8px;
  background: #ff9800;
  color: #ffffff !important;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.user-dropdown .sub-info-card .renew-btn:hover {
  background: #f57c00;
  transform: scale(1.02);
}

/* Expiry 7-Day Warning Top Bar Banner */
.sub-expiry-banner {
  background: linear-gradient(90deg, #d84315 0%, #f4511e 100%);
  color: #ffffff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(216, 67, 21, 0.35);
  position: relative;
  z-index: 9998;
}
.sub-expiry-banner .renew-pill {
  background: #ffffff;
  color: #d84315;
  padding: 3px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Subscription Modal Styles */
.sub-modal-card {
  max-width: 820px !important;
  width: 95% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  padding: 32px 28px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  box-shadow: 0 25px 60px rgba(10, 25, 55, 0.35) !important;
}
.sub-modal-header {
  text-align: center;
  margin-bottom: 24px;
}
.sub-modal-header .crown-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffe082;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.sub-modal-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0d47a1;
  margin: 0 0 6px;
}
.sub-modal-header p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
.pricing-card {
  border: 2px solid #e0e7ff;
  border-radius: 16px;
  padding: 22px 18px;
  background: #ffffff;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: #2563eb;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.15);
}
.pricing-card.selected {
  border-color: #1565c0;
  background: #f8fbff;
  box-shadow: 0 8px 24px rgba(21, 101, 192, 0.2);
}
.pricing-card.popular {
  border-color: #f59e0b;
}
.pricing-card .pop-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  padding: 3px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.pricing-card .plan-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}
.pricing-card .plan-dur {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.pricing-card .plan-price {
  font-size: 32px;
  font-weight: 800;
  color: #0d47a1;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.pricing-card .plan-price span {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}
.pricing-card .features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.6;
}
.pricing-card .features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.pricing-card .features-list li::before {
  content: '✓';
  color: #16a34a;
  font-weight: 800;
}
.pricing-card .btn-select-plan {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #1565c0;
  background: #ffffff;
  color: #1565c0;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pricing-card.selected .btn-select-plan {
  background: #1565c0;
  color: #ffffff;
}

/* Pay Now & QR Code Screen */
.pay-screen {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

/* 5-Minute QR Countdown Timer Box */
.qr-countdown-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 9px 20px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 700;
  margin: 8px auto 14px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
}
.qr-countdown-box .timer-digits {
  font-family: 'Courier New', Courier, monospace;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: #dc2626;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 6px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.25);
}

/* Registration Page Integrated Plan Cards */
.register-auth-card {
  max-width: 840px !important;
  width: 96% !important;
}
.reg-plans-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 18px;
  margin-bottom: 24px;
}
.reg-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 768px) {
  .reg-pricing-grid {
    grid-template-columns: 1fr;
  }
}
.reg-plan-card {
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 18px 14px;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.22s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.reg-plan-card:hover {
  border-color: #2563eb;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37,99,235,0.12);
}
.reg-plan-card.selected {
  border-color: #1565c0;
  background: #eff6ff;
  box-shadow: 0 8px 24px rgba(21,101,192,0.18);
}
.reg-plan-card.popular {
  border-color: #f59e0b;
}
.reg-plan-card.popular.selected {
  border-color: #1565c0;
}
.reg-plan-popular-tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.reg-plan-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.reg-plan-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.reg-plan-price {
  font-size: 26px;
  font-weight: 800;
  color: #0d47a1;
  margin-bottom: 10px;
}
.reg-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font-size: 12px;
  color: #334155;
  line-height: 1.6;
}
.reg-plan-features li {
  margin-bottom: 4px;
}
.reg-plan-select-btn {
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid #1565c0;
  color: #1565c0;
  background: #ffffff;
  transition: all 0.2s ease;
}
.reg-plan-card.selected .reg-plan-select-btn {
  background: #1565c0;
  color: #ffffff;
}
.qr-container {
  display: inline-block;
  background: #ffffff;
  padding: 14px;
  border-radius: 16px;
  border: 2px solid #0d47a1;
  box-shadow: 0 8px 24px rgba(13, 71, 161, 0.12);
  margin: 12px 0;
}
.qr-container img {
  display: block;
  width: 210px;
  height: 210px;
  object-fit: contain;
}
.pay-steps-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 14px auto;
  max-width: 480px;
  font-size: 13px;
  color: #1e40af;
  text-align: left;
}
.pay-steps-box ol {
  margin: 6px 0 0 20px;
  padding: 0;
}
.pay-steps-box li {
  margin-bottom: 4px;
}

/* Verification State Animation */
.verifying-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(21, 101, 192, 0.3);
  border-radius: 50%;
  border-top-color: #1565c0;
  animation: subSpin 0.8s linear infinite;
}
@keyframes subSpin {
  to { transform: rotate(360deg); }
}
