/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f9fafb;
  color: #111827;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

/* ===== UTILITIES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.2s;
}

.input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===== AD PLACEHOLDER ===== */
.ad-placeholder {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px dashed #cbd5e1;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
  min-height: 100px;
  text-align: center;
  padding: 1rem;
  margin: 1rem 0;
}

.ad-leaderboard { min-height: 90px; }
.ad-rectangle { min-height: 250px; }
.ad-sidebar { min-height: 600px; }

/* ===== HEADER ===== */
.top-ad-bar {
  background: white;
  border-bottom: 1px solid #f3f4f6;
  padding: 0.5rem 0;
}

.header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
}

.logo-text span {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: 0.25rem;
}

.nav a {
  padding: 0.5rem 0.75rem;
  color: #4b5563;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.nav a:hover {
  background: #eff6ff;
  color: #2563eb;
}

.mobile-menu-btn {
  display: none;
  padding: 0.5rem;
  background: none;
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero h1 span {
  color: #bfdbfe;
}

.hero p {
  font-size: 1.125rem;
  color: #bfdbfe;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-box {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border-radius: 1rem;
  border: none;
  font-size: 1rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.search-box input:focus {
  outline: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: #bfdbfe;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: 2rem 0; }
}

/* ===== CATEGORY TABS ===== */
.category-tabs {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 0;
  position: sticky;
  top: 64px;
  z-index: 90;
  overflow-x: auto;
}

.category-tabs-inner {
  display: flex;
  gap: 0.5rem;
}

.category-tab {
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  background: #f3f4f6;
  color: #4b5563;
  transition: all 0.2s;
}

.category-tab:hover,
.category-tab.active {
  background: #2563eb;
  color: white;
}

/* ===== TOOLS GRID ===== */
.tools-section {
  padding: 2rem 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #111827;
}

.section-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.tool-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.3s;
  position: relative;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  border-color: #bfdbfe;
}

.tool-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.tool-card:hover h3 {
  color: #2563eb;
}

.tool-card p {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.tool-card .badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-popular {
  background: #fef3c7;
  color: #b45309;
}

.badge-pro {
  background: #ede9fe;
  color: #6d28d9;
}

/* ===== TOOL PAGE ===== */
.tool-page {
  padding: 1.5rem 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: #6b7280;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #2563eb;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

.tool-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tool-card-main {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.5rem 2rem;
}

.tool-card-main h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.tool-card-main > p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* ===== RESULT BOXES ===== */
.result-box {
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
}

.result-box.blue { background: #eff6ff; }
.result-box.green { background: #f0fdf4; }
.result-box.purple { background: #faf5ff; }
.result-box.orange { background: #fff7ed; }
.result-box.red { background: #fef2f2; }
.result-box.gray { background: #f9fafb; }

.result-box .label {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.result-box.blue .label { color: #2563eb; }
.result-box.green .label { color: #16a34a; }
.result-box.purple .label { color: #7c3aed; }
.result-box.orange .label { color: #ea580c; }
.result-box.red .label { color: #dc2626; }

.result-box .value {
  font-size: 1.75rem;
  font-weight: 700;
}

.result-box.blue .value { color: #1e40af; }
.result-box.green .value { color: #15803d; }
.result-box.purple .value { color: #6b21a8; }
.result-box.orange .value { color: #c2410c; }
.result-box.red .value { color: #b91c1c; }

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.range-slider {
  width: 100%;
  margin-top: 0.5rem;
  accent-color: #2563eb;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-group .btn {
  flex: 1;
  min-width: 80px;
  text-align: center;
}

/* ===== SIDEBAR WIDGETS ===== */
.widget {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 1.25rem;
}

.widget h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #111827;
}

.widget ul {
  list-style: none;
}

.widget li {
  margin-bottom: 0.5rem;
}

.widget li a {
  font-size: 0.875rem;
  color: #2563eb;
  transition: color 0.2s;
}

.widget li a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ===== FOOTER ===== */
.footer {
  background: #111827;
  color: #9ca3af;
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.footer h4 {
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.5rem;
}

.footer li a {
  font-size: 0.875rem;
  color: #9ca3af;
  transition: color 0.2s;
}

.footer li a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
}

.footer-bottom p:last-child {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* ===== FAQ SECTION ===== */
.faq-section {
  margin-top: 2rem;
}

.faq-item {
  margin-bottom: 1rem;
}

.faq-item h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.faq-item p {
  font-size: 0.875rem;
  color: #6b7280;
}

/* ===== TABLE ===== */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  margin-top: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th {
  background: #f9fafb;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #6b7280;
}

td {
  padding: 0.5rem 1rem;
  border-top: 1px solid #f3f4f6;
}

.text-right { text-align: right; }
.text-green { color: #16a34a; }
.text-red { color: #dc2626; }

/* ===== COPY BUTTON ===== */
.copy-btn {
  padding: 0.5rem 1rem;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: #bbf7d0;
}

/* ===== PASSWORD DISPLAY ===== */
.password-display {
  background: #111827;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.password-display code {
  color: #4ade80;
  font-family: monospace;
  font-size: 1.25rem;
  word-break: break-all;
}

/* ===== CHECKBOX ===== */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 0.75rem;
  cursor: pointer;
}

.checkbox-item input {
  width: 1rem;
  height: 1rem;
}

.checkbox-item span {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 1rem;
  transition: width 0.3s;
}

.progress-bar-fill.blue { background: #2563eb; }
.progress-bar-fill.green { background: #16a34a; }
.progress-bar-fill.red { background: #dc2626; }
.progress-bar-fill.orange { background: #ea580c; }
