/* ============================================
   TOOLHUB - ULTRA MODERN PROFESSIONAL STYLE SYSTEM
   ============================================ */

/* Smooth Transitions & Base */
* {
  transition:
    background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   PREMIUM GLASSMORPHISM CARDS
   ============================================ */
.glass-card {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  border-radius: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.03),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}
.glass-card:hover::before {
  left: 100%;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 40px -12px rgba(79, 70, 229, 0.3);
}

.glass-card-strong {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.3);
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* ============================================
   ANIMATED TOOL CARDS
   ============================================ */
.tool-card {
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  cursor: pointer;
  animation: card-appear 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
  opacity: 0;
}
.tool-card:nth-child(1) {
  animation-delay: 0.02s;
}
.tool-card:nth-child(2) {
  animation-delay: 0.05s;
}
.tool-card:nth-child(3) {
  animation-delay: 0.08s;
}
.tool-card:nth-child(4) {
  animation-delay: 0.11s;
}
.tool-card:nth-child(5) {
  animation-delay: 0.14s;
}
.tool-card:nth-child(6) {
  animation-delay: 0.17s;
}
.tool-card:nth-child(7) {
  animation-delay: 0.2s;
}
.tool-card:nth-child(8) {
  animation-delay: 0.23s;
}

.tool-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 45px -12px rgba(79, 70, 229, 0.4);
  border-color: rgba(79, 70, 229, 0.6);
}

@keyframes card-appear {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   BLOG CARDS - MODERN
   ============================================ */
.blog-card {
  background: rgba(30, 41, 59, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 1rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.blog-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #8b5cf6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.blog-card:hover::after {
  transform: scaleX(1);
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.4);
}

/* ============================================
   INPUT FIELDS - ENHANCED
   ============================================ */
.tool-input {
  background: rgba(51, 65, 85, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: white;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.tool-input:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.8);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
  background: rgba(51, 65, 85, 0.7);
  transform: scale(1.01);
}

/* ============================================
   BUTTONS - PREMIUM
   ============================================ */
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white !important;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
  display: inline-block;
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}
.btn-primary:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.btn-secondary {
  background: rgba(51, 65, 85, 0.6);
  color: white !important;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

/* ============================================
   RESULT DISPLAY - ANIMATED
   ============================================ */
.result-display {
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  animation: resultGlow 2s ease-in-out;
  transition: all 0.3s ease;
}

.result-display:hover {
  background: rgba(79, 70, 229, 0.12);
  border-color: rgba(79, 70, 229, 0.4);
  transform: scale(1.01);
}

@keyframes resultGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(79, 70, 229, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

/* ============================================
   TIMER DISPLAY - ENHANCED
   ============================================ */
.timer-display {
  font-family: "Courier New", monospace;
  font-size: 4.5rem !important;
  font-weight: bold;
  background: linear-gradient(135deg, #818cf8, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  text-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

/* ============================================
   CATEGORY BADGE - MODERN
   ============================================ */
.category-badge {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.25),
    rgba(139, 92, 246, 0.15)
  );
  color: #a5b4fc;
  padding: 0.3rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.group:hover .category-badge {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.4),
    rgba(139, 92, 246, 0.25)
  );
  border-color: rgba(99, 102, 241, 0.6);
  transform: scale(1.05);
}

/* ============================================
   AD CONTAINER - SUBTLE
   ============================================ */
.ad-container {
  background: rgba(30, 41, 59, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.ad-container:hover {
  border-color: rgba(99, 102, 241, 0.2);
  background: rgba(30, 41, 59, 0.3);
}

/* ============================================
   BLOG PROSE CONTENT - READABLE
   ============================================ */
.prose-content h1 {
  font-size: 2.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #e0e7ff, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}
.prose-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid #6366f1;
  padding-left: 1rem;
}
.prose-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.prose-content p {
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}
.prose-content ul,
.prose-content ol {
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.prose-content ul {
  list-style-type: disc;
}
.prose-content ol {
  list-style-type: decimal;
}
.prose-content a {
  color: #818cf8;
  text-decoration: none;
  border-bottom: 1px solid rgba(129, 140, 248, 0.4);
  transition: all 0.2s ease;
}
.prose-content a:hover {
  color: #a5b4fc;
  border-bottom-color: #a5b4fc;
}
.prose-content strong {
  color: #e2e8f0;
}

/* ============================================
   CTA BOX - PREMIUM
   ============================================ */
.cta-box {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.12),
    rgba(139, 92, 246, 0.08)
  );
  border: 2px solid rgba(79, 70, 229, 0.25);
  border-radius: 1.5rem;
  padding: 2.5rem;
  text-align: center;
  margin: 2.5rem 0;
  transition: all 0.4s ease;
}

.cta-box:hover {
  border-color: rgba(79, 70, 229, 0.5);
  transform: scale(1.01);
  box-shadow: 0 20px 35px -10px rgba(79, 70, 229, 0.2);
}

/* ============================================
   NAVIGATION ACTIVE - MODERN
   ============================================ */
.nav-active {
  color: white !important;
  font-weight: 600;
  position: relative;
}
.nav-active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 2px;
  animation: navGlow 2s ease-in-out infinite;
}

@keyframes navGlow {
  0%,
  100% {
    opacity: 1;
    width: 60%;
    left: 20%;
  }
  50% {
    opacity: 0.7;
    width: 80%;
    left: 10%;
  }
}

/* ============================================
   SCROLLBAR - CUSTOM
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

/* ============================================
   ANIMATIONS - MODERN
   ============================================ */

/* Slow pulse */
@keyframes pulse-slow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
.animate-pulse-slow {
  animation: pulse-slow 3s ease-in-out infinite;
}

/* Slow bounce */
@keyframes bounce-slow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.animate-bounce-slow {
  animation: bounce-slow 3s ease-in-out infinite;
}

/* Floating particles */
.floating-particle {
  position: absolute;
  font-size: 2rem;
  opacity: 0.12;
  animation: float-particle 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes float-particle {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-30px) rotate(10deg);
  }
  50% {
    transform: translateY(-10px) rotate(-5deg);
  }
  75% {
    transform: translateY(-40px) rotate(-10deg);
  }
}

/* Typing cursor */
.typing-cursor {
  animation: blink-cursor 0.8s step-end infinite;
  color: #a78bfa;
  font-weight: 200;
}
@keyframes blink-cursor {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Hover glow */
.hover-glow:hover {
  box-shadow:
    0 0 40px rgba(79, 70, 229, 0.5),
    0 0 80px rgba(79, 70, 229, 0.2);
}

/* Section reveal on scroll - enhanced */
.section-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1),
    transform 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.section-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(79, 70, 229, 0.15);
  border-top: 3px solid #4f46e5;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Shimmer loading effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.6) 25%,
    rgba(51, 65, 85, 0.4) 50%,
    rgba(30, 41, 59, 0.6) 75%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* ============================================
   MOBILE RESPONSIVE - ENHANCED
   ============================================ */
@media (max-width: 768px) {
  .timer-display {
    font-size: 2.5rem !important;
  }
  .prose-content h1 {
    font-size: 2rem;
  }
  .prose-content h2 {
    font-size: 1.5rem;
  }
  .floating-particle {
    font-size: 1.25rem;
  }
  .glass-card:hover,
  .tool-card:hover {
    transform: translateY(-2px);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  nav,
  footer,
  .ad-container,
  button {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  .glass-card,
  .glass-card-strong {
    background: white !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}

/* ============================================
   REDUCED MOTION - ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   LIGHT MODE OVERRIDES - PROFESSIONAL
   ============================================ */
body.light {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%) !important;
  color: #0f172a !important;
}

body.light nav {
  background: rgba(255, 255, 255, 0.85) !important;
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

body.light .glass-card {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

body.light .glass-card-strong {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}

body.light footer {
  background: rgba(255, 255, 255, 0.85) !important;
  border-top-color: rgba(0, 0, 0, 0.05) !important;
}

body.light .tool-input {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}

body.light .tool-input:focus {
  background: white !important;
  border-color: rgba(79, 70, 229, 0.5) !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important;
}

body.light .prose-content h1 {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.light .prose-content h2,
body.light .prose-content h3 {
  color: #0f172a !important;
}
body.light .prose-content p,
body.light .prose-content ul,
body.light .prose-content ol {
  color: #334155 !important;
}
body.light .prose-content strong {
  color: #0f172a !important;
}

body.light .blog-card {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}
body.light .blog-card:hover {
  border-color: rgba(79, 70, 229, 0.25) !important;
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.1) !important;
}

body.light .result-display {
  background: rgba(79, 70, 229, 0.04) !important;
  border-color: rgba(79, 70, 229, 0.15) !important;
}

body.light .text-white {
  color: #0f172a !important;
}
body.light .text-slate-300 {
  color: #334155 !important;
}
body.light .text-slate-400 {
  color: #475569 !important;
}
body.light .text-slate-500 {
  color: #64748b !important;
}
body.light .category-badge {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.2);
}
body.light .nav-active {
  color: #4f46e5 !important;
}
body.light .nav-active::after {
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
}
