/* 
  Easy Tools BD - Premium Design System
  Theme: Modern, Sleek, Glassmorphism
*/

:root {
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --secondary: #ec4899;
  --accent: #0ea5e9;
  --bg-light: #f8fafc;
  --card-light: rgba(255, 255, 255, 0.7);
  --text-light: #0f172a;
  --border-light: rgba(0, 0, 0, 0.05);
  
  --bg-dark: #030712;
  --card-dark: rgba(17, 24, 39, 0.7);
  --text-dark: #f9fafb;
  --border-dark: rgba(255, 255, 255, 0.05);

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  --trans: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.dark-theme {
  --bg-current: var(--bg-dark);
  --card-current: var(--card-dark);
  --text-current: var(--text-dark);
  --border-current: var(--border-dark);
}

body:not(.dark-theme) {
  --bg-current: var(--bg-light);
  --card-current: var(--card-light);
  --text-current: var(--text-light);
  --border-current: var(--border-light);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Hind Siliguri', sans-serif;
  background-color: var(--bg-current);
  color: var(--text-current);
  line-height: 1.6;
  transition: background-color var(--trans), color var(--trans);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.05) 0%, transparent 40%);
  z-index: -1;
  animation: bg-spin 40s linear infinite;
  pointer-events: none;
}

@keyframes bg-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-current); }
::-webkit-scrollbar-thumb { 
  background: var(--primary); 
  border-radius: 10px; 
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-current);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-current);
  height: 70px;
  transition: background-color var(--trans), border-color var(--trans);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.5px;
}

.header-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 20px var(--primary-glow);
  border: 1.5px solid rgba(255,255,255,0.1);
}

.accent-text {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.header-right {
  display: flex;
  gap: 15px;
}

.theme-btn, .hamburger-btn, .lang-btn {
  background: var(--card-current);
  border: 1px solid var(--border-current);
  color: var(--text-current);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--trans);
}

.theme-btn:hover, .lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px var(--primary-glow);
}

.lang-btn {
  width: auto;
  padding: 0 15px;
  font-size: 0.85rem;
  font-weight: 700;
  gap: 8px;
}

.hamburger-btn { display: none; } /* Hamburger no longer needed without sidebar */

/* Search Bar */
.search-container {
  max-width: 650px;
  margin: 0 auto 50px;
  position: relative;
  perspective: 1000px;
}

#toolSearch, #prompt-search {
  width: 100%;
  padding: 20px 25px 20px 60px;
  background: var(--card-current);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-current);
  border-radius: 20px;
  color: var(--text-current);
  font-size: 1.05rem;
  font-weight: 500;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1), 
              0 0 0 1px var(--border-current);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#toolSearch:focus, #prompt-search:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-current);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -15px var(--primary-glow),
              0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  opacity: 0.6;
  color: var(--primary);
  pointer-events: none;
}

/* Tool Grid */
.tool-grid-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  transition: opacity 0.4s ease;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 80px 20px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.hero-main-logo {
  width: 100px;
  height: 100px;
  margin-bottom: 25px;
  filter: drop-shadow(0 0 30px var(--primary-glow));
  animation: float 4s ease-in-out infinite;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 15px;
  letter-spacing: -2px;
  line-height: 1;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.6;
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1rem; }
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--card-current);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-current);
  padding: 30px 25px;
  border-radius: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px -10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(30px);
}

.tool-card.reveal {
  opacity: 1;
  transform: translateY(0);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2),
              0 0 20px var(--primary-glow);
}

/* Category Tabs Premium */
.category-tabs {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  padding: 12px 28px;
  background: var(--card-current);
  border: 1px solid var(--border-current);
  color: var(--text-current);
  border-radius: 100px;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cat-tab:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--primary);
}

.cat-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 10px 20px var(--primary-glow);
}

.card-icon {
  width: 65px;
  height: 65px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.2);
  
  /* Standard Tool Style */
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.02));
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--primary);
  box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.05), 0 8px 16px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

/* Glass Shine Effect */
.card-icon::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
}

.tool-card:hover .card-icon::before {
  opacity: 1;
}

/* Hover Standard */
.tool-card:hover .card-icon {
  transform: translateY(-8px) scale(1.1);
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

/* SVG Styling */
.card-icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 2px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: all 0.4s;
  position: relative;
  z-index: 1;
}

.tool-card:hover .card-icon svg {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
  transform: scale(1.05);
}

/* ==================================
   DYNAMIC CATEGORY ICON COLORS
   ================================== */
   
/* Pro Tools (Purple) */
.pro-card .card-icon {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.1), rgba(217, 70, 239, 0.02));
  border-color: rgba(217, 70, 239, 0.2);
  color: #d946ef;
}
.pro-card:hover .card-icon {
  background: linear-gradient(135deg, #d946ef, #f0abfc);
  box-shadow: 0 15px 30px rgba(217, 70, 239, 0.4);
  color: #fff;
}

/* Image Tools (Orange/Amber) */
.img-card .card-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.02));
  border-color: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}
.img-card:hover .card-icon {
  background: linear-gradient(135deg, #f59e0b, #fcd34d);
  box-shadow: 0 15px 30px rgba(245, 158, 11, 0.4);
  color: #fff;
}

/* Extra Tools (Cyan/Teal) */
.extra-card .card-icon {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(14, 165, 233, 0.02));
  border-color: rgba(14, 165, 233, 0.2);
  color: #0ea5e9;
}
.extra-card:hover .card-icon {
  background: linear-gradient(135deg, #0ea5e9, #7dd3fc);
  box-shadow: 0 15px 30px rgba(14, 165, 233, 0.4);
  color: #fff;
}

/* Wish Card (Rose/Red) */
.wish-card .card-icon {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.1), rgba(244, 63, 94, 0.02));
  border-color: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
}
.wish-card:hover .card-icon {
  background: linear-gradient(135deg, #f43f5e, #fda4af);
  box-shadow: 0 15px 30px rgba(244, 63, 94, 0.4);
  color: #fff;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.card-desc {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* App Section Wrapper */
.app-section {
  padding: 0;
  min-height: 100vh;
  background: var(--bg-current);
}

.app-wrapper {
  max-width: 100%;
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Tool Panel */
.tool-panel {
  width: 100%;
  background: var(--card-current);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: none;
  border-radius: 0;
  padding: 60px 20px;
  min-height: 100vh;
  box-shadow: none;
  position: relative;
  transition: background-color var(--trans), border-color var(--trans);
}

.tool-inner-constraint {
  max-width: 1000px;
  margin: 0 auto;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-current);
  border: 1px solid var(--border-current);
  color: var(--text-current);
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 40px;
  font-weight: 600;
  transition: var(--trans);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

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

.tool-view { display: none; }
.tool-view.active {
  display: block;
  animation: slideUp 0.4s ease-out;
}

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

.tool-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.tool-emoji {
  font-size: 3rem;
  background: var(--bg-current);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

.tool-head h2 { font-size: 1.8rem; }
.tool-head p { opacity: 0.7; }

/* Form Elements */
.tool-textarea {
  width: 100%;
  height: 200px;
  background: var(--bg-current);
  border: 1px solid var(--border-current);
  border-radius: 15px;
  padding: 20px;
  color: var(--text-current);
  font-size: 1.1rem;
  margin-bottom: 20px;
  resize: vertical;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.tool-input {
  width: 100%;
  padding: 12px 20px;
  background: var(--bg-current);
  border: 1px solid var(--border-current);
  border-radius: 12px;
  color: var(--text-current);
  font-size: 1rem;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.tool-input:focus, .tool-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02), 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: var(--card-current);
}

.input-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.action-btn {
  background: linear-gradient(180deg, var(--primary) 0%, #4f46e5 100%);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 6px -1px rgba(0,0,0,0.1);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}
.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 6px 12px -2px rgba(0,0,0,0.15);
  filter: brightness(1.1);
}
.action-btn:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.action-btn.secondary { background: var(--border-current); color: var(--text-current); }
.action-btn.small { padding: 8px 16px; font-size: 0.9rem; }

.download-btn-premium {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--trans);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.download-btn-premium:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.download-btn-premium:active {
  transform: scale(0.98);
}

.flex-row { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; }
.flex-row .tool-input { margin-bottom: 0; }

.qr-output {
  margin-top: 30px;
  padding: 20px;
  background: white;
  display: flex;
  justify-content: center;
  border-radius: 20px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.timer-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.sample-text {
  background: var(--bg-current);
  padding: 20px;
  border-radius: 12px;
  font-weight: 500;
  margin-bottom: 20px;
  border-left: 4px solid var(--accent);
}

/* Age Pro Styles */
.age-result-container {
  margin-top: 30px;
  background: var(--bg-current);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid var(--border-current);
  animation: fadeIn 0.5s ease;
}

.main-age-display {
  text-align: center;
  margin-bottom: 30px;
}

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

.age-main-lbl {
  font-size: 1.5rem;
  font-weight: 600;
  opacity: 0.8;
}

.age-main-sub {
  display: block;
  font-size: 1.2rem;
  margin-top: 10px;
  font-weight: 500;
}

.age-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.age-stat-card {
  background: var(--card-current);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid var(--border-current);
  transition: var(--trans);
}

.age-stat-card:hover { transform: translateY(-5px); border-color: var(--primary); }

.age-stat-icon { font-size: 2rem; display: block; margin-bottom: 10px; }
.age-stat-lbl { display: block; font-size: 0.9rem; opacity: 0.6; margin-bottom: 5px; }
.age-stat-val { font-size: 1.1rem; font-weight: 700; color: var(--text-current); }

.age-life-stats {
  border-top: 1px solid var(--border-current);
  padding-top: 25px;
}

.age-life-stats h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
}

.life-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.life-stat {
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background: var(--card-current);
  border-radius: 10px;
}

.life-stat strong { color: var(--primary); }

/* Image Tool Specifics */
.img-preview {
  width: 100%;
  padding: 20px;
  border-radius: 12px;
  border: 2px dashed var(--border-current);
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: rgba(0,0,0,0.02);
}

.img-preview img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
}

.palette-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.color-swatch {
  height: 80px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--trans);
}

.color-swatch:hover { transform: scale(1.05); }

.color-swatch span {
  background: rgba(0,0,0,0.3);
  padding: 2px 5px;
  border-radius: 4px;
}

.custom-date-picker {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.custom-date-picker .tool-select {
  flex: 1;
}

.unit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.tool-select {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-current);
  border: 1px solid var(--border-current);
  color: var(--text-current);
}

.big-result {
  font-size: 4rem;
  font-weight: 800;
  text-align: center;
  color: var(--primary);
  margin: 20px 0;
}

.result-box {
  margin-top: 30px;
  padding: 25px;
  background: var(--card-current);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid var(--border-current);
  border-left: 6px solid var(--primary);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-current);
  white-space: pre-wrap;
  word-break: break-all;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.stat-item {
  background: var(--bg-current);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
}

.stat-val { font-size: 1.5rem; font-weight: 700; display: block; }
.stat-lbl { font-size: 0.8rem; opacity: 0.6; }

/* Todo List */
.todo-list { list-style: none; margin-top: 20px; }
.todo-list li {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--bg-current);
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.todo-done span { text-decoration: line-through; opacity: 0.5; }
.todo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-current);
}
.clear-btn { background: transparent; border: 1px solid #ef4444; color: #ef4444; padding: 5px 12px; border-radius: 8px; cursor: pointer; }

/* Stats Section */
.stats-section { padding: 80px 20px; background: var(--card-current); }
.stats-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}
.stat-num { font-size: 3rem; font-weight: 800; color: var(--primary); display: block; }

/* Footer */
.footer { padding: 40px 20px; text-align: center; border-top: 1px solid var(--border-current); opacity: 0.7; transition: background-color var(--trans), border-color var(--trans); }

/* Mobile */
@media (max-width: 700px) {
  .tool-panel { padding: 25px; border-radius: 0; border: none; }
  .tool-emoji { width: 60px; height: 60px; font-size: 2rem; }
  .tool-grid-section { padding: 20px 15px; }
}

/* Birthday Wish Generator Styles */
.wish-card-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.8s ease-out;
}

.wish-card-premium {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 40px;
  border-radius: 30px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 4px solid rgba(255,255,255,0.2);
}

.wish-card-premium::before {
  content: '🎂';
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 8rem;
  opacity: 0.1;
  transform: rotate(15deg);
}

.wish-text-main {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.wish-card-footer {
  font-size: 1rem;
  opacity: 0.9;
  font-style: italic;
}

.vibe-btn-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.action-btn.secondary.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.copy-share-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.floating-balloons {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  top: 0;
  left: 0;
}

/* GPA Calculator */
.gpa-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.gpa-in {
    text-align: center;
    font-size: 1.1rem;
}

/* Screen Recorder */
.recorder-preview {
    border: 2px solid var(--border-current);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.recorder-timer {
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    z-index: 10;
}
@keyframes pulse-red {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.recorder-timer::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #ff4444;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse-red 1s infinite;
}

/* Range Input Premium */
.range-input {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: var(--bg-current);
    border-radius: 5px;
    outline: none;
    margin: 15px 0;
    border: 1px solid var(--border-current);
}
.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
}
.range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
}

/* Responsive fixes */
@media (max-width: 600px) {
    .big-result { font-size: 2.5rem; }
    .action-btn { padding: 12px 20px; }
}

/* ====== GPA Calculator Full Redesign ====== */
.gpa-scale-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-current);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.gpa-scale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.gpa-scale-item {
    text-align: center;
    font-size: 0.85rem;
    padding: 5px;
    background: var(--card-current);
    border-radius: 8px;
}

.gpa-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}
.gpa-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
.gpa-table th {
    text-align: left;
    padding: 12px;
    background: var(--primary);
    color: white;
}
.gpa-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-current);
}

.gpa-result-card {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.3);
}
.gpa-val-big {
    font-size: 4rem;
    font-weight: 800;
}
.gpa-label-sub {
    font-size: 1.2rem;
    opacity: 0.9;
}

.gpa-summary-table {
    width: 100%;
    margin-top: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px;
}
.gpa-sum-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.gpa-sum-row:last-child { border: none; }

.gpa-subj-row { transition: all 0.3s; }
.gpa-subj-row:hover { background: rgba(99, 102, 241, 0.05); }

.gpa-marks-input {
    width: 80px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-current);
    background: var(--bg-current);
    color: var(--text-current);
    text-align: center;
}

.gpa-row-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gpa-subj-name { font-weight: 600; }
.gpa-marks-disp { text-align: center; opacity: 0.75; }
.gpa-grade-disp { text-align: center; font-weight: 700; }

/* ====== High-Fidelity Birthday Surprise ====== */
.surprise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#surprise-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Floating Elements Animation */
.p-balloon {
    position: absolute;
    bottom: -50px;
    font-size: 2rem;
    animation: floatUp 15s linear infinite;
    opacity: 0.6;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

.stars-bg {
    position: absolute;
    width: 200%;
    height: 200%;
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
    animation: starsRotate 120s linear infinite;
    opacity: 0.2;
}

@keyframes starsRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Advanced Gift Box */
.gift-box-container {
    perspective: 1000px;
    cursor: pointer;
}

.gift-box {
    width: 160px;
    height: 140px;
    background: #e17055;
    position: relative;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gift-box.shaking {
    animation: giftShake 0.5s infinite;
}

@keyframes giftShake {
    0% { transform: rotate(0); }
    25% { transform: rotate(3deg) scale(1.05); }
    50% { transform: rotate(0) scale(1.1); }
    75% { transform: rotate(-3deg) scale(1.05); }
    100% { transform: rotate(0); }
}

.gift-lid {
    width: 180px;
    height: 40px;
    background: #fab1a0;
    position: absolute;
    top: -10px;
    left: -10px;
    border-radius: 6px;
    z-index: 5;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gift-lid.fly-off {
    transform: translateY(-300px) translateX(100px) rotate(45deg);
    opacity: 0;
}

.gift-ribbon-v {
    position: absolute;
    width: 34px;
    height: 100%;
    background: #d63031;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.gift-ribbon-h {
    position: absolute;
    width: 100%;
    height: 34px;
    background: #d63031;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.tap-text {
    color: #fff;
    font-size: 1.3rem;
    margin-top: 40px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    animation: bounceText 2s infinite;
}

@keyframes bounceText {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Premium Surprise Card - Glassmorphism Refresh */
.surprise-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    padding: 60px 40px;
    max-width: 650px;
    margin: 20px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8), inset 0 0 20px rgba(255,255,255,0.05);
    animation: cardPopUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: visible;
    text-align: center;
}

/* Typing Effect Elements */
.wish-message {
    color: #fff;
    font-size: 1.5rem;
    line-height: 1.7;
    background: rgba(0, 0, 0, 0.3);
    padding: 35px;
    border-radius: 24px;
    border-left: 6px solid #fdcb6e;
    text-align: left;
    margin-bottom: 30px;
    min-height: 120px;
    position: relative;
    font-weight: 500;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.6rem;
    background-color: #fdcb6e;
    margin-left: 5px;
    vertical-align: middle;
    animation: blink 0.8s step-end infinite;
    box-shadow: 0 0 10px #fdcb6e;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.share-link-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.share-link-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.5);
}

/* Interactive Cake View - Premium Upgrade */
.cake-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInCake 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
}

@keyframes fadeInCake {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.cake {
    position: relative;
    width: 260px;
    height: 220px;
    margin-top: 40px;
}

.plate {
    width: 300px;
    height: 120px;
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: radial-gradient(circle, #e0e0e0, #999);
    border-radius: 50%;
    box-shadow: 0 5px 0 #666, 0 8px 30px rgba(0,0,0,0.6);
}

.layer {
    position: absolute;
    width: 260px;
    border-radius: 15px 15px 5px 5px;
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.2);
}

.layer-bottom {
    height: 90px;
    bottom: 0;
    background: linear-gradient(to right, #4b2c20, #6d4c41, #4b2c20);
}

.layer-middle {
    height: 130px;
    bottom: 0;
    background: linear-gradient(to right, #5d4037, #8d6e63, #5d4037);
    width: 240px;
    left: 10px;
}

.layer-top {
    height: 170px;
    bottom: 0;
    background: linear-gradient(to right, #3e2723, #5d4037, #3e2723);
    width: 220px;
    left: 20px;
}

/* Chocolate Glaze/Icing */
.icing {
    top: 50px;
    left: 20px;
    background: linear-gradient(#2b160e, #4b2c20);
    width: 220px;
    height: 25px;
    border-radius: 12px;
    position: absolute;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.drip {
    position: absolute;
    background: #2b160e;
    width: 18px;
    border-radius: 20px;
    z-index: 4;
}

.drip1 { top: 60px; left: 40px; height: 50px; }
.drip2 { top: 60px; left: 110px; height: 75px; }
.drip3 { top: 60px; left: 190px; height: 45px; }

/* Cream Toppings */
.toppings {
    position: absolute;
    top: 40px;
    width: 100%;
    z-index: 6;
}

.topping {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #ff5e57, #ff3b2f);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.topping:nth-child(1) { left: 45px; top: 0px; }
.topping:nth-child(2) { left: 115px; top: -10px; }
.topping:nth-child(3) { left: 185px; top: 0px; }

.candles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* Base Candle Style */
.candle {
    position: absolute;
    width: 14px;
    height: 55px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: inset -2px 0 5px rgba(0,0,0,0.2);
}

.candle:hover { transform: translateY(-5px) scale(1.1); }

/* Number Candle Specifics */
.candle.num-candle {
    width: 45px;
    height: 65px;
    background: linear-gradient(45deg, #fdcb6e, #ffeaa7);
    border: 3px solid #d35400;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: #d35400;
    border-radius: 12px;
}

.num-candle::before {
    content: '';
    position: absolute;
    bottom: -15px;
    width: 4px;
    height: 15px;
    background: #95a5a6;
}

.flame {
    position: absolute;
    background: radial-gradient(circle at bottom, #ff9f43, #ff6b6b);
    width: 18px;
    height: 28px;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 20% 20%;
    box-shadow: 0 0 25px rgba(255, 159, 67, 0.8), 0 0 10px rgba(255, 234, 167, 0.6);
    animation: flicker 0.15s ease-in infinite;
}

@keyframes flicker {
    0% { height: 28px; opacity: 0.9; }
    50% { height: 32px; transform: translateX(-50%) translate(-1px, -2px); opacity: 1; }
    100% { height: 26px; transform: translateX(-50%) translate(1px, 0); opacity: 0.9; }
}

.smoke {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
}

.candle.extinguished .flame { display: none; }
.candle.extinguished .smoke { animation: smokePuff 0.8s ease-out forwards; }

@keyframes smokePuff {
    0% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-50px) scale(4); opacity: 0; }
}

.cake-hint {
    margin-top: 60px !important;
    font-size: 1.5rem !important;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(255,255,255,0.8);
}

/* === Surprise Themes === */

/* Space Theme */
.surprise-overlay.theme-space {
    background: radial-gradient(circle at center, #0B0B1E 0%, #000 100%);
}
.theme-space .stars-bg {
    opacity: 0.5;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
}
.theme-space .hbd-title span {
    background: linear-gradient(135deg, #a29bfe, #74b9ff);
    -webkit-background-clip: text;
}

/* Gold Theme */
.surprise-overlay.theme-gold {
    background: linear-gradient(135deg, #1a1a1a 0%, #302b11 50%, #1a1a1a 100%);
}
.surprise-overlay.theme-gold::before {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    background: url('https://www.transparenttextures.com/patterns/shattered-island.png');
    opacity: 0.1;
}
.theme-gold .hbd-title span {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    -webkit-background-clip: text;
    text-shadow: 0 0 20px rgba(241, 196, 15, 0.5);
}
.theme-gold .surprise-card {
    border: 1px solid rgba(241, 196, 15, 0.3);
    box-shadow: 0 30px 60px rgba(0,0,0,0.9), 0 0 40px rgba(241, 196, 15, 0.1);
}

/* Party Theme */
.surprise-overlay.theme-party {
    background: #000;
    animation: discoBg 10s linear infinite;
}
@keyframes discoBg {
    0% { background-color: #1a0033; }
    25% { background-color: #33001a; }
    50% { background-color: #001a33; }
    75% { background-color: #1a3300; }
    100% { background-color: #1a0033; }
}
.theme-party .hbd-title span {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    animation: textFlash 1s infinite alternate;
}
@keyframes textFlash {
    from { filter: drop-shadow(0 0 5px #ff00ff); }
    to { filter: drop-shadow(0 0 20px #00ffff); }
}

/* === Pre-Birthday Countdown === */
.countdown-overlay {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 1s ease;
    width: 100%;
    max-width: 800px;
}

.lock-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: pulseLock 2s infinite;
    filter: drop-shadow(0 0 15px var(--primary));
}

@keyframes pulseLock {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.countdown-title {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 40px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.count-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 25px;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    transition: transform 0.3s;
}

.count-box:hover { transform: translateY(-5px); }

.count-box span {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fdcb6e;
    line-height: 1;
    text-shadow: 0 0 15px rgba(253, 203, 110, 0.5);
}

.count-box label {
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
}

.countdown-note {
    color: #fff;
    opacity: 0.8;
    font-size: 1.1rem;
    font-style: italic;
}

@media (max-width: 600px) {
    .count-box { min-width: 80px; padding: 15px; }
    .count-box span { font-size: 2rem; }
}

/* Premium Form Styles */
.tool-form-premium {
    animation: fadeIn 0.5s ease-out;
}

.input-group-premium {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.input-label {
    font-weight: 700;
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 5px;
    display: block;
}

.file-upload-premium {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.file-upload-premium:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.15);
}

.file-upload-premium i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.file-upload-premium span {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-current);
}

.file-upload-premium p {
    font-size: 0.9rem;
    opacity: 0.5;
}

.btn-group-premium {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 60px 20px 40px;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

.hero-logo-container {
  margin-bottom: 25px;
}

.hero-main-logo {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 15px 40px var(--primary-glow);
  animation: floatLogo 6s ease-in-out infinite;
}

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

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 15px;
  letter-spacing: -1.5px;
  background: linear-gradient(to bottom, #fff, #a5a6f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body:not(.dark-theme) .hero-title {
  background: linear-gradient(to bottom, #0f172a, #312e81);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.accent-text {
  color: var(--primary);
  -webkit-text-fill-color: initial;
  background: none;
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.8;
  max-width: 700px;
  margin: 0 auto;
}

/* Footer Section */
.footer {
  background: var(--bg-current);
  border-top: 1px solid var(--border-current);
  padding: 60px 20px;
  margin-top: 80px;
  transition: background-color var(--trans), border-color var(--trans);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.8rem;
  font-weight: 800;
}

.footer-logo-img {
  width: 45px;
  height: 45px;
  border-radius: 10px;
}

.footer-copy {
  opacity: 0.5;
  font-size: 1rem;
}

.footer-dev {
  font-size: 1rem;
  font-weight: 600;
}

/* --- COMPREHENSIVE MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
  /* Hero Section */
  .hero-section {
    padding: 40px 15px 20px;
  }
  .hero-title { 
    font-size: 2.2rem; 
    line-height: 1.2;
    background: linear-gradient(to bottom, var(--text-current), var(--primary));
    -webkit-background-clip: text;
  }
  .hero-subtitle { 
    font-size: 1rem; 
    padding: 0 10px;
  }
  .hero-main-logo {
    width: 90px;
    height: 90px;
  }

  /* Grid */
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  
  .tool-card {
    padding: 15px 10px;
    border-radius: 15px;
  }
  .card-icon {
    font-size: 2rem;
    margin-bottom: 5px;
  }
  .card-title {
    font-size: 1rem;
  }
  .card-desc {
    font-size: 0.75rem;
  }

  /* Tool Panel */
  .tool-panel { 
    padding: 20px 15px; 
    border-radius: 0; 
  }
  .tool-head {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  .tool-emoji { 
    width: 60px; 
    height: 60px; 
    font-size: 2rem; 
  }
  .tool-head h2 {
    font-size: 1.5rem;
  }

  /* Header */
  .header-inner {
    padding: 0 15px;
  }
  .logo {
    font-size: 1.2rem;
  }
  .header-logo-img {
    width: 32px;
    height: 32px;
  }
  
  /* Utilities & Inputs */
  .unit-row, .timer-input-row, .gpa-inputs, .flex-row {
    flex-direction: column;
    gap: 10px;
  }
  .unit-row select, .unit-row span {
    width: 100%;
    text-align: center;
  }
  .arrow-icon {
    transform: rotate(90deg);
  }
  
  /* Results */
  .big-result, .age-main-val {
    font-size: 2.8rem;
  }
  .age-main-lbl {
    font-size: 1rem;
  }
  .age-stats-grid {
    grid-template-columns: 1fr;
  }
  
  /* Form Layout */
  .action-btn {
    width: 100%;
    margin-bottom: 10px;
  }
  .btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .btn-group .action-btn {
    width: 100%;
    margin: 0;
  }
  
  /* Specific UI components */
  #toolSearch {
    padding: 15px 20px 15px 45px;
    font-size: 1rem;
  }
  .search-icon {
    font-size: 1.2rem;
    left: 15px;
  }
}

/* QR Scanner Styles */
#reader {
  width: 100% !important;
  border: none !important;
  border-radius: 20px;
  overflow: hidden;
}

#reader video {
  border-radius: 20px !important;
  object-fit: cover !important;
}

#scanner-overlay {
  z-index: 10;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Premium Clock T17 */
.premium-clock-card {
  background: var(--card-current);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 30px;
  padding: 50px 30px;
  text-align: center;
  border: 1px solid var(--border-current);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255,255,255,0.05);
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.premium-clock-card::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 70%);
  z-index: 0;
  opacity: 0.3;
}

.clock-main-display {
  position: relative;
  z-index: 1;
  font-size: 5rem;
  font-weight: 800;
  color: var(--text-current);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 0 30px var(--primary-glow);
}

.clock-date-display {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 25px;
}

.clock-badges {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.clock-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(5px);
}

@media (max-width: 600px) {
  .clock-main-display {
    font-size: 3.5rem;
  }
  .clock-date-display {
    font-size: 1.1rem;
  }
  .clock-badge {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}

/* Premium Love Calculator T18 */
.premium-love-card {
  background: var(--card-current);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  padding: 30px;
  border: 1px solid var(--border-current);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  text-align: center;
}

.love-inputs {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.input-group-premium {
  flex: 1;
  text-align: left;
}

.love-heart-icon {
  font-size: 2rem;
  animation: heartbeat 1.2s infinite;
  color: #ef4444;
  margin-top: 20px;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

.love-btn {
  width: 100%;
  height: 55px;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  border: none;
  box-shadow: 0 10px 20px rgba(244, 63, 94, 0.3);
}

.love-result-container {
  margin-top: 30px;
  padding: 25px;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

.love-percent {
  font-size: 4rem;
  font-weight: 900;
  color: #f43f5e;
  line-height: 1;
  margin-bottom: 5px;
  font-family: 'Inter', sans-serif;
}

.love-status {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-current);
}

.love-meter {
  height: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  overflow: hidden;
}

.love-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #f43f5e, #ec4899);
  transition: width 0.5s ease-out;
}

@media (max-width: 500px) {
  .love-inputs {
    flex-direction: column;
    gap: 10px;
  }
  .love-heart-icon {
    margin-top: 0;
    transform: rotate(90deg);
  }
}

/* Premium Tool View Card */
.premium-tool-card {
  background: var(--card-current);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 30px;
  padding: 40px;
  border: 1px solid var(--border-current);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  margin-top: 20px;
}

.tool-head-premium {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 40px;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tool-emoji-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.icon-purple {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  box-shadow: 0 10px 20px rgba(168, 85, 247, 0.3);
}

.tool-title-group h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.tool-title-group p {
  opacity: 0.6;
  font-size: 1.1rem;
}

/* Password Generator T5 Premium */
.pass-gen-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.pass-result-box {
  margin-bottom: 30px;
}

.pass-output-container {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.2);
  padding: 15px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 15px;
  gap: 15px;
}

.pass-output-container input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-current);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: 'Fira Code', monospace;
  width: 100%;
}

.pass-output-container input:focus { outline: none; }

.pass-actions {
  display: flex;
  gap: 10px;
}

.pass-action-btn {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  background: rgba(255,255,255,0.05);
  color: var(--text-current);
}

.pass-action-btn:hover {
  transform: scale(1.1);
  background: var(--primary);
  color: white;
}

.strength-meter {
  padding: 0 10px;
}

.strength-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.strength-track {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pass-settings-card {
  background: rgba(255,255,255,0.03);
  padding: 30px;
  border-radius: 25px;
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 30px;
}

.setting-row {
  margin-bottom: 30px;
}

.setting-label-group {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.setting-label {
  font-weight: 700;
  font-size: 1.1rem;
}

.setting-count {
  background: var(--primary);
  color: white;
  padding: 2px 12px;
  border-radius: 20px;
  font-weight: 700;
}

.premium-range {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  outline: none;
}

.premium-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 15px var(--primary-glow);
  transition: all 0.2s;
}

.premium-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.checkbox-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.premium-checkbox-card {
  position: relative;
  cursor: pointer;
}

.premium-checkbox-card input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.cb-card-content {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 15px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}

.cb-icon {
  font-size: 1.2rem;
  font-weight: 800;
  opacity: 0.5;
}

.cb-label-text {
  font-size: 0.9rem;
  font-weight: 600;
}

.premium-checkbox-card input:checked + .cb-card-content {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

.premium-checkbox-card input:checked + .cb-card-content .cb-icon {
  opacity: 1;
}

.generate-btn {
  width: 100%;
  height: 60px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  box-shadow: 0 10px 30px var(--primary-glow);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.generate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px var(--primary-glow);
}

@media (max-width: 600px) {
  .premium-tool-card { padding: 25px; }
  .tool-head-premium { flex-direction: column; text-align: center; gap: 15px; }
  .checkbox-options-grid { grid-template-columns: 1fr; }
  .pass-output-container input { font-size: 1.2rem; }
}

/* Telegram Join Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInOverlay 0.4s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tg-popup-card {
    background: var(--card-current);
    width: 90%;
    max-width: 400px;
    border-radius: 30px;
    padding: 30px;
    border: 1px solid var(--border-current);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: slideUpPopup 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.tg-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.tg-icon-wrapper {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 8px 15px rgba(0, 136, 204, 0.4));
}

.tg-icon-wrapper i {
    width: 30px;
    height: 30px;
}

.tg-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-current);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.tg-popup-body h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}

.tg-popup-body p {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 25px;
}

.tg-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.tg-stat {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255,255,255,0.05);
}

.tg-stat i {
    width: 20px;
    height: 20px;
    color: #0088cc;
}

.tg-stat span {
    font-size: 0.8rem;
    font-weight: 700;
}

.tg-join-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #0088cc, #00aaff);
    color: white;
    text-decoration: none;
    padding: 15px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(0, 136, 204, 0.2);
    transition: all 0.3s;
    margin-bottom: 15px;
}

.tg-join-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 136, 204, 0.3);
}

.tg-maybe-later {
    background: none;
    border: none;
    color: var(--text-current);
    opacity: 0.5;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-weight: 600;
    transition: opacity 0.3s;
}

.tg-maybe-later:hover {
    opacity: 1;
}

/* Floating TG Bot Button Styling */
.floating-tg-bot {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 10px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(36, 161, 222, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: botSlideInLeft 0.8s backwards 1.5s;
}

.floating-tg-bot svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.4s;
}

.floating-tg-bot span {
    white-space: nowrap;
}

.bot-status-dot {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border: 2px solid rgba(15, 23, 42, 1);
    border-radius: 50%;
    z-index: 2;
}

.bot-status-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: #22c55e;
    opacity: 0.5;
    animation: botPulse 2s infinite;
}

.floating-tg-bot:hover {
    transform: scale(1.05) translateY(-5px);
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(36, 161, 222, 0.5);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(36, 161, 222, 0.4);
}

.floating-tg-bot:hover svg {
    transform: rotate(-10deg) scale(1.1);
}

@keyframes botPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(2.5); opacity: 0; }
}

@keyframes botSlideInLeft {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* QR Generator Premium Styling */
.qr-gen-wrapper {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.template-selector-premium {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.tpl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 12px;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.tpl-btn i {
    width: 18px;
    height: 18px;
}

.tpl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

.tpl-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.qr-settings-card {
    background: rgba(15, 23, 42, 0.4);
    padding: 25px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.qr-input-group {
    display: none;
    animation: fadeIn 0.4s ease;
}

.qr-input-group.active {
    display: block;
}

.qr-color-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.color-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-item label {
    font-size: 0.85rem;
    color: #94a3b8;
}

.color-item input[type="color"] {
    width: 100%;
    height: 45px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
}

.qr-result-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.qr-display-box {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Native Website Chatbot Styling */
#web-chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
}

#chatbot-launcher {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    animation: launcherPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards 2s;
}

#chatbot-launcher:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.6);
}

.launcher-icon, .launcher-close {
    position: absolute;
    transition: all 0.4s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.launcher-icon svg, .launcher-close svg {
    width: 100%;
    height: 100%;
}

.launcher-close {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

#web-chatbot-container.active .launcher-icon {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

#web-chatbot-container.active .launcher-close {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.launcher-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #fff;
}

#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#web-chatbot-container.active #chatbot-window {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.chatbot-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    font-size: 30px;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.chatbot-header p {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.online-status {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #22c55e;
}

.chatbot-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.chatbot-close-btn:hover {
    color: #fff;
}

#chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.bot-msg-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.bot-avatar-small {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.bot-msg {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border-bottom-left-radius: 4px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-msg {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.msg-time {
    display: block;
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 5px;
    text-align: right;
}

.bot-msg .msg-time {
    text-align: left;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    width: fit-content;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-replies button {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-replies button:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

#chatbot-voice-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    opacity: 0.7;
}

#chatbot-voice-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

#chatbot-voice-btn.listening {
    color: #ef4444;
    animation: voicePulse 1s infinite;
}

@keyframes voicePulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

.chatbot-input {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

#chatbot-input-field {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 15px;
    color: #fff;
    outline: none;
    transition: all 0.3s;
}

#chatbot-input-field:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
}

.dark-theme #chatbot-window {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .chatbot-header {
    background: rgba(30, 41, 59, 0.8);
}

#chatbot-send-btn {
    background: var(--primary);
    border: none;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

#chatbot-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

#chatbot-send-btn svg {
    width: 20px;
    height: 20px;
}

@keyframes launcherPop {
    from { transform: scale(0) rotate(-180deg); opacity: 0; }
}

@media (max-width: 480px) {
    #chatbot-window {
        width: calc(100vw - 40px);
        height: 450px;
        right: -10px;
    }
}
/* AI Prompt Library Styles (T83) */
.prompt-lib-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.prompt-filters {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.prompt-filters::-webkit-scrollbar { display: none; }

.prompt-cat-btn {
    padding: 8px 20px;
    background: var(--card-current);
    border: 1px solid var(--border-current);
    border-radius: 50px;
    color: var(--text-current);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.prompt-cat-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.prompt-card {
    background: var(--card-current);
    border: 1px solid var(--border-current);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.prompt-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

.prompt-card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-current);
}

.prompt-card-body {
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 15px;
    font-size: 0.9rem;
    max-height: 120px;
    overflow-y: auto;
    color: var(--text-current);
    opacity: 0.8;
    line-height: 1.5;
    white-space: pre-wrap;
}

.prompt-card-footer {
    display: flex;
    justify-content: flex-end;
}

.copy-prompt-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.copy-prompt-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.prompt-loading {
    text-align: center;
    padding: 50px;
    opacity: 0.6;
}

.prompt-empty {
    text-align: center;
    padding: 50px;
    opacity: 0.6;
    grid-column: 1 / -1;
}


/* Premium Tool Header Styles */
.premium-tool-card {
    background: var(--card-current);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid var(--border-current);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.tool-head-premium {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 35px;
}

.tool-emoji-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.tool-emoji-wrapper i, .tool-emoji-wrapper svg {
    width: 32px;
    height: 32px;
}

.icon-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.icon-purple {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
}

.tool-title-group h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.tool-title-group p {
    font-size: 1rem;
    opacity: 0.7;
}

@media (max-width: 600px) {
    .tool-head-premium {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .tool-emoji-wrapper {
        margin: 0 auto;
    }
}


/* Loader Animation */
.spin-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tool Header Color Wrappers */
.tool-emoji-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    animation: float 4s ease-in-out infinite;
}
.icon-purple { background: linear-gradient(135deg, #a855f7, #6366f1); color: white; }
.icon-blue { background: linear-gradient(135deg, #3b82f6, #2dd4bf); color: white; }
.icon-green { background: linear-gradient(135deg, #10b981, #34d399); color: white; }
.icon-red { background: linear-gradient(135deg, #f43f5e, #fb7185); color: white; }

/* Tool Title Group */
.tool-title-group h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 5px; }
.tool-title-group p { opacity: 0.6; font-size: 0.95rem; }

/* Premium Tool Card */
.premium-tool-card {
    background: var(--card-current);
    border: 1px solid var(--border-current);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    backdrop-filter: blur(20px);
}
.tool-head-premium { display: flex; align-items: center; gap: 25px; margin-bottom: 40px; }

/* Responsive tweaks for payment UI */
@media (max-width: 600px) {
    .premium-tool-card { padding: 25px; border-radius: 20px; }
    .tool-head-premium { flex-direction: column; text-align: center; gap: 15px; }
    .plans-grid { grid-template-columns: 1fr; }
}

/* Premium Loader */
.spin-loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

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

.processing-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  z-index: 10;
  color: white;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
