/* ============================================
   StudyToolset — Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  /* Colors */
  --primary: #4F46E5;
  --primary-light: #6366F1;
  --primary-dark: #3730A3;
  --primary-glow: rgba(79, 70, 229, 0.25);
  --accent: #10B981;
  --accent-light: #34D399;
  --accent-dark: #059669;
  --amber: #F59E0B;
  --amber-light: #FBBF24;
  --red: #EF4444;
  --red-light: #FCA5A5;

  /* Neutrals */
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-input: #F1F5F9;
  --bg-dark: #0F172A;
  --bg-dark-card: rgba(30, 41, 59, 0.6);
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --border-focus: var(--primary);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 40px -5px rgba(0, 0, 0, 0.1), 0 8px 16px -4px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 30px var(--primary-glow);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Container */
  --max-width: 860px;
  --max-width-wide: 1100px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  animation: pageLoad 0.6s ease-out;
}

@keyframes pageLoad {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #312E81 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader--hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: preloaderPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }
}

.preloader__text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.preloader__dots {
  display: flex;
  gap: 0.5rem;
}

.preloader__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  animation: preloaderBounce 1.2s ease-in-out infinite;
}

.preloader__dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.preloader__dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes preloaderBounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  40% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: 2.25rem;
  font-weight: 800;
}

h2 {
  font-size: 1.65rem;
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-md);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--wide {
  max-width: var(--max-width-wide);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__logo svg {
  width: 28px;
  height: 28px;
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav__links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.925rem;
  transition: color var(--transition-fast);
}

.nav__links a:hover {
  color: var(--primary);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 40%, #312E81 70%, #1E293B 100%);
  padding: var(--space-3xl) 0;
  text-align: center;
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 40%);
  animation: meshFloat 20s ease-in-out infinite;
}

@keyframes meshFloat {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(2%, -2%) rotate(1deg);
  }

  66% {
    transform: translate(-1%, 1%) rotate(-0.5deg);
  }
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: var(--space-xs) var(--space-lg);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(8px);
}

.hero__badge span {
  color: var(--accent-light);
  font-weight: 600;
}

.hero h1 {
  font-size: 3.25rem;
  font-weight: 800;
  color: #fff;
  max-width: 700px;
  margin: 0 auto var(--space-lg);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--amber-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.6;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}

.hero__stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-xs);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.btn--primary:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn--secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: #E2E8F0;
  transform: translateY(-1px);
}

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn--accent:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn--ghost:hover {
  background: var(--primary);
  color: #fff;
}

.btn--hero {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn--hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  color: var(--primary-dark);
}

/* --- Tool Cards (Homepage) --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
  padding: var(--space-3xl) 0;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
  border-color: transparent;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:hover .tool-card__cta {
  background: var(--primary);
  color: #fff;
}

.tool-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 1.5rem;
}

.tool-card__icon--planner {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
}

.tool-card__icon--hours {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
}

.tool-card__icon--countdown {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.tool-card__icon--pomodoro {
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber);
}

.tool-card__icon--assignment {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
}

.tool-card__icon--reading {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-dark);
}

.tool-card__icon--all {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(16, 185, 129, 0.1));
  color: var(--primary);
}

.tool-card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  flex-grow: 1;
  margin-bottom: var(--space-lg);
}

.tool-card__cta {
  align-self: flex-start;
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  transition: all var(--transition-base);
}

.tool-card--all {
  border-style: dashed;
  border-color: var(--primary-glow);
  background: rgba(79, 70, 229, 0.02);
}

.tool-card--all:hover {
  border-style: solid;
  background: var(--bg-card);
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.form-group label .required {
  color: var(--red);
  margin-left: 2px;
}

.input,
.select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text);
  transition: all var(--transition-fast);
  outline: none;
}

.input:focus,
.select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.input::placeholder {
  color: var(--text-light);
}

.input--error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
  color: var(--red);
  font-size: 0.825rem;
  margin-top: var(--space-xs);
  display: none;
}

.form-error.visible {
  display: block;
}

.form-hint {
  color: var(--text-light);
  font-size: 0.825rem;
  margin-top: var(--space-xs);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

/* --- Result Block --- */
.result-block {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.04), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-top: var(--space-xl);
  animation: fadeInUp 0.4s ease;
}

.result-block h3 {
  color: var(--primary);
  margin-bottom: var(--space-lg);
  font-size: 1.15rem;
}

.result-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.result-stat:last-child {
  border-bottom: none;
}

.result-stat__label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.result-stat__value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.result-stat__value--highlight {
  color: var(--primary);
  font-size: 1.35rem;
}

.result-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  color: #92400E;
  font-size: 0.9rem;
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.result-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  color: #991B1B;
  font-size: 0.9rem;
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* --- Result Highlight Box --- */
.result-highlight {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #818CF8 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  color: #fff;
  margin-bottom: var(--space-xl);
  text-align: center;
}

.result-highlight h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  opacity: 0.9;
}

.result-highlight__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.result-highlight__item {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
}

.result-highlight__value {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-xs);
}

.result-highlight__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

/* --- Related Tools --- */
.related-tools {
  margin-top: var(--space-3xl);
}

.related-tools h2 {
  margin-top: 0;
}

.related-tools__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.related-tools__card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-base);
}

.related-tools__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-glow);
  color: var(--text);
}

.related-tools__icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.related-tools__info h3 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.related-tools__info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Tool Page Layout --- */
.tool-page {
  padding: var(--space-3xl) 0;
}

.tool-page__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.tool-page__header h1 {
  margin-bottom: var(--space-md);
}

.tool-page__header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.tool-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

/* --- How to Use Guide --- */
.how-to {
  margin-top: var(--space-3xl);
}

.how-to h2 {
  margin-top: 0;
}

.how-to__steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.how-to__step {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}

.how-to__step:last-child {
  border-bottom: none;
}

.how-to__step::before {
  content: counter(step);
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- FAQ Accordion --- */
.faq {
  margin-top: var(--space-3xl);
}

.faq h2 {
  margin-top: 0;
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-lg) 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  transition: color var(--transition-fast);
}

.faq__question:hover {
  color: var(--primary);
}

.faq__question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-light);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.faq__item.active .faq__question::after {
  content: '−';
  color: var(--primary);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq__item.active .faq__answer {
  max-height: 300px;
  padding-bottom: var(--space-lg);
}

.faq__answer p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer__brand h3 {
  font-family: var(--font-heading);
  color: #fff;
  margin-bottom: var(--space-sm);
}

.footer__brand p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer__col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.footer__col ul {
  list-style: none;
}

.footer__col li {
  margin-bottom: var(--space-sm);
}

.footer__col a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer__col a:hover {
  color: #fff;
}

.footer__bottom {
  text-align: center;
  padding-top: var(--space-xl);
  margin-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* --- Features Section (Homepage) --- */
.features {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.features h2 {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.features__subtitle {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-2xl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-xl);
  text-align: left;
}

.feature-item {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition-base);
}

.feature-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-item__icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
}

.feature-item h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-md) 0;
}

.progress-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width var(--transition-slow);
}

/* --- Countdown Cards --- */
.countdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-md);
  transition: var(--transition-base);
}

.countdown-card:hover {
  box-shadow: var(--shadow-md);
}

.countdown-card--urgent {
  border-left: 4px solid var(--red);
}

.countdown-card--warning {
  border-left: 4px solid var(--amber);
}

.countdown-card--safe {
  border-left: 4px solid var(--accent);
}

.countdown-values {
  display: flex;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.countdown-unit {
  text-align: center;
  min-width: 60px;
}

.countdown-unit__value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  color: var(--text);
  line-height: 1;
}

.countdown-unit__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-top: var(--space-xs);
}

/* --- Pomodoro Timer --- */
.timer-display {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.timer-ring {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto var(--space-xl);
}

.timer-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring__bg {
  fill: none;
  stroke: var(--bg-input);
  stroke-width: 8;
}

.timer-ring__progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.timer-ring__progress--break {
  stroke: var(--accent);
}

.timer-time {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.timer-label {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.timer-session {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: var(--space-sm);
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* --- Schedule Table --- */
.schedule-day {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.schedule-day__header {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid rgba(79, 70, 229, 0.1);
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  color: var(--text-secondary);
  font-size: 0.925rem;
}

.schedule-item__duration {
  font-weight: 600;
  color: var(--text);
}

/* --- Subject Tags (Dynamic Input) --- */
.subjects-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.subject-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
}

.subject-tag__remove {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.subject-tag__remove:hover {
  opacity: 1;
}

/* --- Reading Speed Test --- */
.reading-passage {
  background: var(--bg-input);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
  margin: var(--space-xl) 0;
  max-height: 400px;
  overflow-y: auto;
}

.speed-result {
  text-align: center;
  padding: var(--space-2xl);
}

.speed-result__wpm {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.speed-result__label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: var(--space-sm);
}

.percentile-bar {
  position: relative;
  width: 100%;
  height: 24px;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--accent));
  border-radius: var(--radius-full);
  margin: var(--space-xl) 0 var(--space-md);
}

.percentile-marker {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 36px;
  background: var(--text);
  border-radius: 2px;
  transition: left var(--transition-slow);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.animate-fade-in:nth-child(2) {
  animation-delay: 0.1s;
}

.animate-fade-in:nth-child(3) {
  animation-delay: 0.2s;
}

.animate-fade-in:nth-child(4) {
  animation-delay: 0.3s;
}

.animate-fade-in:nth-child(5) {
  animation-delay: 0.4s;
}

.animate-fade-in:nth-child(6) {
  animation-delay: 0.5s;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.hidden {
  display: none !important;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .hero__stats {
    gap: var(--space-lg);
  }

  .hero__stat-value {
    font-size: 1.35rem;
  }

  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: block;
  }

  .nav__links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .countdown-values {
    flex-wrap: wrap;
  }

  .timer-ring {
    width: 220px;
    height: 220px;
  }

  .timer-time {
    font-size: 2.75rem;
  }

  .tool-section {
    padding: var(--space-xl);
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9375rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .hero {
    padding: var(--space-2xl) 0;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-md);
  }

  .tool-card {
    padding: var(--space-xl);
  }

  .tool-section {
    padding: var(--space-lg);
  }

  .result-block {
    padding: var(--space-xl);
  }

  .timer-ring {
    width: 200px;
    height: 200px;
  }

  .timer-time {
    font-size: 2.25rem;
  }

  .speed-result__wpm {
    font-size: 3rem;
  }
}