/* ==============================
   ENHANCED VISUAL EFFECTS
============================== */

/* Improved Card Shadows & Depth */
.card, .category-card, .price-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* Glassmorphism effect on modals */
.modal-content, [class*="modal"], [class*="dialog"] {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.85);
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] [class*="modal"],
[data-theme="dark"] [class*="dialog"] {
  background: rgba(30,41,59,0.92);
}

/* Enhanced Typography */
h2, h3 {
  color: var(--tc-text);
}

[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: #f1f5f9;
}

/* Accent underlines for headings */
.page-hero h1::after,
.features h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: linear-gradient(90deg, var(--tc-brand), var(--tc-gold));
  border-radius: 2px;
  margin: 12px auto 0;
  animation: expandWidth 0.6s ease-out;
}

@keyframes expandWidth {
  from { width: 0; }
  to { width: 50px; }
}

/* Enhanced Input Styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  background: var(--tc-surface);
  border: 1.5px solid var(--tc-border);
  border-radius: var(--tc-radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--tc-text);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--tc-brand);
  box-shadow: 0 0 0 3px rgba(193,18,31,0.1);
  background: rgba(193,18,31,0.02);
}

/* Enhanced Button Groups */
.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-group button,
.btn-group a {
  flex: 1;
  min-width: 120px;
}

/* Tab Navigation */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--tc-border);
  margin-bottom: 20px;
  gap: 2px;
}

.tab {
  padding: 12px 18px;
  border: none;
  background: transparent;
  color: var(--tc-muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  position: relative;
  transition: color 0.25s;
  font-family: var(--font-body);
}

.tab:hover {
  color: var(--tc-text);
}

.tab.active {
  color: var(--tc-brand);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tc-brand);
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { width: 0; }
  to { width: 100%; }
}

/* Badges with better styling */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--tc-brand-light);
  color: var(--tc-brand);
  transition: transform 0.2s;
}

.badge:hover {
  transform: scale(1.05);
}

.badge.success { background: #d1fae5; color: #047857; }
.badge.warning { background: #fef3c7; color: #d97706; }
.badge.error { background: #fee2e2; color: #dc2626; }
.badge.info { background: #dbeafe; color: #0284c7; }

/* Improved code styling */
code, pre {
  background: var(--tc-surface);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-sm);
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
}

code {
  padding: 2px 6px;
  color: var(--tc-brand);
}

pre {
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
}

pre code {
  background: transparent;
  border: none;
  color: var(--tc-text);
  padding: 0;
}

/* Improved Links */
a:not([class]) {
  color: var(--tc-brand);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s;
  text-decoration-thickness: 1.5px;
}

a:not([class]):hover {
  color: var(--tc-brand-dark);
}

/* Dividers */
hr, .divider {
  border: none;
  height: 1px;
  background: var(--tc-border);
  margin: 24px 0;
}

/* Loading states */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--tc-surface) 25%, rgba(0,0,0,0.05) 50%, var(--tc-surface) 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--tc-radius-sm);
  min-height: 16px;
}

/* Accessible Focus States */
*:focus-visible {
  outline: 2px solid var(--tc-brand);
  outline-offset: 2px;
}

/* Improved Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  animation: slideInUp 0.5s ease-out;
}

/* Improved spacing utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

/* Enhanced List Styling */
ul, ol {
  margin-left: 1.5rem;
}

li {
  margin: 8px 0;
  line-height: 1.7;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--tc-border);
  border-radius: 4px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(193,18,31,0.4);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(193,18,31,0.6);
}

/* Improved Responsive Design */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    gap: 40px;
    padding: 40px 0;
  }

  .hero-image {
    justify-content: center;
  }

  .hero-image img {
    max-width: 100%;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .card, .category-card {
    padding: 20px;
  }

  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 18px; }
}

@media (max-width: 480px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .hub-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .navbar {
    padding: 0 4%;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/* ==============================
   ENHANCED PAGE ELEMENTS
============================== */

/* Better Resource Cards (for blog, tips pages) */
.resource-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--tc-radius);
  background: var(--tc-card-bg);
  border: 1.5px solid var(--tc-border);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

/* ==============================
   ABOUT PAGE POLISH
============================== */
.about-page .page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 360px at 85% -80px, rgba(255, 255, 255, 0.10), transparent 60%),
    radial-gradient(680px 300px at 8% -90px, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(150deg, var(--tc-brand-dark), var(--tc-brand));
  color: #fff;
}

.about-page .page-hero h1 {
  color: #fff;
}

.about-page .page-hero p {
  color: rgba(255, 255, 255, 0.88);
}

.about-page .features {
  position: relative;
}

.about-page .features h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 8px;
}

.about-page .features h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tc-brand), #e63946);
}

.about-page .feature-grid .card {
  border-top: 3px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.about-page .feature-grid .card:hover {
  border-top-color: var(--tc-brand);
}

.about-page .pricing {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.99));
}

.about-page .pricing-intro {
  max-width: 680px;
  margin: 0 auto;
}

.about-page .pricing-grid {
  max-width: 980px;
  align-items: stretch;
}

.about-page .price-card {
  min-height: 100%;
}

.about-page .plan-list {
  list-style: none;
  padding-left: 0;
}

.about-page .plan-list li {
  position: relative;
  padding-left: 24px;
}

.about-page .plan-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--tc-brand);
  font-weight: 900;
}

.about-page .price-card.featured {
  transform: translateY(-4px);
}

@media (max-width: 900px) {
  .about-page .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .about-page .price-card.featured {
    transform: none;
  }
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tc-brand), var(--tc-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.resource-card:hover::before {
  transform: scaleX(1);
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tc-shadow-lg);
}

.resource-title {
  font-weight: 800;
  color: var(--tc-text);
  margin-bottom: 8px;
}

.resource-description {
  color: var(--tc-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
  flex-grow: 1;
}

.resource-link {
  color: var(--tc-brand);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.resource-link:hover {
  gap: 8px;
}

/* FAQ Styling */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-sm);
  overflow: hidden;
  transition: all 0.3s;
}

.faq-item:hover {
  border-color: var(--tc-brand);
  box-shadow: 0 4px 16px rgba(193,18,31,0.08);
}

.faq-question {
  width: 100%;
  font-weight: 700;
  color: var(--tc-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  padding: 20px;
  background: var(--tc-card-bg);
  transition: background 0.2s;
  margin: 0;
  font-size: 1.1rem;
  border: none;
  text-align: left;
}

.faq-question:hover {
  background: rgba(193,18,31,0.02);
}

.faq-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 16px;
  background: var(--tc-brand);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.3s ease, background 0.2s;
  flex-shrink: 0;
}

.faq-toggle:hover {
  background: var(--tc-brand-dark);
}

/* ==============================
   10-MINUTE HIGHLIGHT SECTION
============================== */
.ten-min-highlight {
  background: linear-gradient(135deg, #780000 0%, #C1121F 60%, #e63946 100%);
  color: #fff;
  padding: 96px 8%;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ten-min-highlight::before {
  content: '⏱️';
  position: absolute;
  font-size: 340px;
  opacity: 0.05;
  right: -40px;
  bottom: -80px;
  pointer-events: none;
  line-height: 1;
  filter: grayscale(1) brightness(10);
}
.ten-min-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.ten-min-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.ten-min-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}
.ten-min-title span {
  color: var(--tc-gold);
}
.ten-min-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.75;
}
.ten-min-highlight p {
  color: rgba(255,255,255,0.85);
}
.ten-min-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 52px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 28px 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 52px;
  flex-wrap: wrap;
  gap: 0;
}
.tm-stat {
  flex: 1;
  min-width: 100px;
  padding: 8px 16px;
}
.tm-stat-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 900;
  color: var(--tc-gold);
  line-height: 1;
  margin-bottom: 6px;
}
.tm-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tm-stat-divider {
  width: 1px;
  height: 50px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.ten-min-streak {
  margin-bottom: 40px;
}
.streak-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.ten-min-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tm-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.tm-dot::before {
  content: '';
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  display: block;
  transition: background .3s, box-shadow .3s, border-color .3s;
}
.tm-dot.active::before {
  background: var(--tc-gold);
  border-color: var(--tc-gold);
  box-shadow: 0 0 18px rgba(233,196,106,0.55);
}
.tm-dot span {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
}
.tm-dot.active span {
  color: rgba(255,255,255,0.9);
}
.ten-min-caption {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin: 0;
}
.ten-min-highlight .primary-btn {
  background: #fff;
  color: var(--tc-brand);
  border: none;
}
.ten-min-highlight .primary-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
@media (max-width: 640px) {
  .ten-min-highlight { padding: 72px 6%; }
  .tm-dot::before { width: 38px; height: 38px; }
  .ten-min-dots { gap: 7px; }
  .ten-min-stats { padding: 20px 16px; }
  .tm-stat-num { font-size: 34px; }
  .tm-stat-divider { display: none; }
  .tm-stat { min-width: 80px; }
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
  background: var(--tc-brand-dark);
}

.faq-answer {
  display: none;
  padding: 0 20px 20px 20px;
  color: var(--tc-muted);
  line-height: 1.6;
  background: rgba(193,18,31,0.01);
  border-top: 1px solid var(--tc-border);
  animation: none;
}

.faq-item.active .faq-answer {
  display: block;
  animation: slideInDown 0.3s ease;
}

/* Tip Cards */
.tip-card {
  padding: 24px;
  border-radius: var(--tc-radius);
  background: var(--tc-card-bg);
  border: 2px solid var(--tc-border);
  position: relative;
  overflow: hidden;
}

.tip-card::before {
  content: attr(data-number);
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 120px;
  font-weight: 900;
  opacity: 0.03;
  font-family: var(--font-display);
  line-height: 1;
}

.tip-card:hover {
  border-color: var(--tc-brand);
  box-shadow: var(--tc-shadow-lg);
  transform: translateY(-4px);
}

.tip-number {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--tc-brand-light);
  color: var(--tc-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 12px;
}

.tip-title {
  font-weight: 800;
  color: var(--tc-text);
  margin-bottom: 8px;
}

.tip-description {
  color: var(--tc-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ==============================
   SUCCESS/ERROR STATES
============================== */

.alert {
  padding: 16px;
  border-radius: var(--tc-radius-sm);
  border-left: 4px solid var(--tc-border);
  margin: 16px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.alert.success {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #15803d;
}

[data-theme="dark"] .alert.success {
  background: rgba(22, 163, 74, 0.1);
  color: #86efac;
}

.alert.warning {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.alert.error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

[data-theme="dark"] .alert.error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.alert.info {
  background: #eff6ff;
  border-color: #0284c7;
  color: #082f49;
}

.alert-icon {
  flex-shrink: 0;
  font-size: 18px;
  margin-top: 2px;
}

.alert-message {
  margin: 0;
  line-height: 1.5;
}

/* ==============================
   FIX REVEAL CARDS VISIBILITY
============================== */
/* Ensure all category cards are visible immediately */
.category-card { opacity: 1 !important; }
.reveal { opacity: 1 !important; transform: translateY(0) !important; }
.reveal.show { opacity: 1; transform: translateY(0); }
