:root {
  --primary: #e5322d;
  --primary-hover: #cb201c;
  --slate-dark: #0f172a;
  --slate-muted: #94a3b8;
  --slate-light: #1e293b;
  --bg-surface: #1e293b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 20px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 15px 30px -5px rgba(229, 50, 45, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #0f172a;
  color: #f1f5f9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

body.modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

header {
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* লোগো টেক্সট সাদা ও স্পষ্ট করার জন্য */
.brand-logo-svg text[fill="#0F172A"] {
  fill: #ffffff !important;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.brand-logo span {
  color: var(--primary);
}

.brand-logo .ai-tag {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

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

.auth-icon-btn {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.auth-icon-btn:hover {
  transform: scale(1.08);
  border-color: var(--primary);
}

.hero {
  text-align: center;
  padding: 32px 16px 16px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.hero h1 {
  font-size: clamp(24px, 6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.25;
  color: #ffffff;
  word-break: break-word;
}

.hero h1 span {
  color: var(--primary);
  background: linear-gradient(135deg, #e5322d, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(13px, 3.5vw, 16px);
  color: #94a3b8;
  line-height: 1.5;
  font-weight: 600;
  padding: 0 8px;
}

/* পপুলার টুলস সেকশন স্টাইল */
.popular-section {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 16px 24px;
}

.section-title {
  font-size: 17px;
  font-weight: 750;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.popular-card {
  background: linear-gradient(135deg, #1e293b, #273548);
  border: 1px solid rgba(229, 50, 45, 0.3);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.popular-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  background: #273548;
  box-shadow: 0 8px 20px rgba(229, 50, 45, 0.3);
}

.popular-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(229, 50, 45, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.popular-info h4 {
  font-size: 14px;
  font-weight: 750;
  color: #ffffff;
  margin-bottom: 2px;
}

.popular-info span {
  font-size: 11.5px;
  color: #94a3b8;
}

.filter-wrapper {
  width: 100%;
  padding: 16px 0;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-wrapper::-webkit-scrollbar { display: none; }

.filter-tabs {
  display: flex;
  gap: 8px;
  padding: 6px 16px;
  margin: 0 auto;
  white-space: nowrap;
  width: max-content;
}

.filter-btn {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 9px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 650;
  color: #94a3b8;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(229, 50, 45, 0.4);
  transform: translateY(-2px);
}

.main-grid-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 16px 48px;
  flex-grow: 1;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.tool-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  background: #273548;
  box-shadow: 0 10px 25px -5px rgba(229, 50, 45, 0.3);
  border-color: rgba(229, 50, 45, 0.4);
}

.tool-card:active {
  transform: scale(0.98);
}

.tool-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.tool-card h3 {
  font-size: 16.5px;
  font-weight: 750;
  margin-bottom: 6px;
  color: #ffffff;
}

.tool-card p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 16px;
  font-weight: 500;
}

.tool-meta {
  font-size: 12.5px;
  font-weight: 750;
  color: #f43f5e;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.tool-card:hover .tool-meta {
  gap: 10px;
}

/* ব্যাকগ্রাউন্ড হেভি ব্লার এবং ডার্ক ওভারলে ফিক্স (ফাঁকা জায়গায় ক্লিক বা স্ক্রল করলে পপআপ যাতে না কাটে) */
.workspace-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999 !important;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  overflow-y: auto;
  pointer-events: auto !important;
}

.workspace-box {
  background: #1e293b;
  color: #f1f5f9;
  width: 100%;
  max-width: 580px;
  border-radius: 26px 26px 0 0;
  padding: 24px 20px 40px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto !important;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.workspace-header h3 {
  font-size: 18px;
  font-weight: 750;
  color: #ffffff;
}

.close-btn {
  background: #334155;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 750;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #fee2e2;
  color: var(--primary);
}

/* ড্র্যাগ অ্যান্ড ড্রপ গ্রিন চেকমার্ক অ্যানিমেশন ও স্টাইল */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 30px 16px;
  text-align: center;
  background: #0f172a;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.dropzone.dragover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  transform: scale(1.02);
}

.dropzone-success {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  animation: pulseSuccess 0.4s ease;
}

@keyframes pulseSuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.processing-progress {
  display: none;
  margin: 12px 0 4px;
}
.progress-track {
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #f43f5e);
  border-radius: inherit;
  transition: width 0.3s ease;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 650;
  color: #94a3b8;
  margin-bottom: 4px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #cbd5e1;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: #0f172a;
  color: #ffffff;
  transition: all 0.2s;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.2);
}

.btn-main {
  background: linear-gradient(135deg, var(--primary), #f43f5e);
  color: #ffffff;
  border: none;
  padding: 15px;
  border-radius: 14px;
  font-weight: 750;
  font-size: 14.5px;
  cursor: pointer;
  width: 100%;
  display: block;
  box-shadow: 0 4px 15px rgba(229, 50, 45, 0.4);
  transition: all 0.2s ease;
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(244, 63, 94, 0.5);
}

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

#smartAiChatModal {
  position: fixed !important;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999 !important;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.ai-chat-card {
  background: #1e293b;
  width: 100%;
  max-width: 540px;
  height: 80vh;
  height: 80dvh;
  max-height: 600px;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.ai-chat-header {
  background: #0f172a;
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ai-chat-header h3 {
  font-size: 15.5px;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-select-box, .voice-toggle-btn {
  background: #334155;
  border: 1px solid rgba(255,255,255,0.2);
  color: #60a5fa;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  cursor: pointer;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}

.msg.bot {
  background: #1e293b;
  color: #f1f5f9;
  align-self: flex-start;
  border: 1px solid rgba(255,255,255,0.1);
  border-top-left-radius: 4px;
}

.msg.user {
  background: linear-gradient(135deg, var(--primary), #f43f5e);
  color: #ffffff;
  align-self: flex-end;
  border-top-right-radius: 4px;
}

.ai-quick-tags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px;
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,0.1);
  scrollbar-width: none;
}
.ai-quick-tags::-webkit-scrollbar { display: none; }

.tag-btn {
  background: #334155;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: #cbd5e1;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.tag-btn:hover { background: #475569; }

.ai-chat-input-bar {
  padding: 12px 16px;
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 10px;
}

.ai-chat-input-bar input {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background: #0f172a;
  color: #ffffff;
}

.ai-chat-input-bar input:focus {
  border-color: var(--primary);
  background: #1e293b;
}

.ai-chat-input-bar button {
  background: linear-gradient(135deg, var(--primary), #f43f5e);
  color: #ffffff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.4);
}

footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 16px 24px;
  margin-top: auto;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

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

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: #ffffff; }

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

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 14px;
  font-size: 12.5px;
}
.trust-badges i { color: #10b981; margin-right: 6px; }

@media (min-width: 640px) {
  .workspace-overlay { align-items: center; padding: 20px; }
  .workspace-box { border-radius: 24px; padding: 28px; }
  #smartAiChatModal { align-items: center; }
  .ai-chat-card { border-radius: 24px; }
}

@media (min-width: 768px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .footer-container { grid-template-columns: repeat(4, 1fr); }
  .nav-container { padding: 0 24px; }
}

@media (min-width: 1024px) {
  .hero { padding: 64px 16px 32px; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
  .nav-container { height: 72px; }
}
