
/* ===== BASE STYLES ===== */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #020617, #0f172a);
  color: #e5e7eb;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1, h2, h3 {
  color: #ff7a00; /* orange accent */
}

h1 {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
}

h3 {
  font-size: 1.3rem;
  color: #e5e7eb;
}

p, li {
  color: #cbd5f5;
  line-height: 1.6;
}

ul {
  padding-left: 20px;
}

a {
  color: #ff7a00;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== LAYOUT ===== */
.wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

.app {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 30px;
  background: #020617;
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  animation: fadeIn 0.6s ease-in-out;
}

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

/* ===== FORMS & INPUTS ===== */
textarea,
input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 1px solid #1e293b;
  border-radius: 14px;
  background: #0f172a;
  color: #e5e7eb;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin: 8px 0;
  resize: vertical;
}

textarea:focus,
input[type="text"]:focus {
  border-color: #ff7a00;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.2);
}

/* ===== BUTTONS ===== */
button {
  background: #ff7a00;
  color: white;
  border: none;
  border-radius: 40px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover {
  background: #e86800;
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -8px #ff7a00;
}

button:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
}

.buttons {
  display: flex;
  gap: 16px;
  margin: 24px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.buttons button {
  min-width: 180px;
}

/* ===== RESULT CARD ===== */
.result-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 24px 0;
  padding: 24px;
  background: #1e293b;
  border-radius: 20px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.stat {
  background: #020617;
  padding: 16px 12px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
  border: 1px solid #1e293b;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.stat:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
  border-color: rgba(255,122,0,0.3);
}

.stat span {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat strong {
  font-size: 1.3rem;
  color: #ff7a00;
  font-weight: 700;
}

/* Animation for stat update */
.stat-update {
  animation: statPulse 0.4s ease;
}

@keyframes statPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); background: rgba(255,122,0,0.15); }
  100% { transform: scale(1); }
}

/* ===== TOOLS SECTION ===== */
.tools-section {
  max-width: 900px;
  margin: 60px auto;
  padding: 40px 20px;
  background: #020617;
  border-radius: 28px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.6);
}

.tools-title {
  text-align: center;
  font-size: 2rem;
  color: #ff7a00;
  margin-bottom: 8px;
}

.tools-subtitle {
  text-align: center;
  color: #cbd5f5;
  margin-bottom: 32px;
}

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

.tool-card {
  background: #1e293b;
  border: 1px solid #1e293b;
  border-radius: 20px;
  padding: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.6);
  border-color: #ff7a00;
}

.tool-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
  transform: scale(1.1) rotate(5deg);
  color: #ff7a00;
}

.tool-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #10b981;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 40px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
}

.tool-badge.popular {
  background: #f59e0b;
}

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #e5e7eb;
  padding-right: 60px;
}

.tool-card p {
  font-size: 0.9rem;
  color: #cbd5f5;
  margin-bottom: 20px;
  line-height: 1.5;
  flex: 1;
}

.tool-btn {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ff7a00;
  background: rgba(255,122,0,0.15);
  padding: 8px 16px;
  border-radius: 40px;
  border: 1px solid transparent;
  transition: all 0.2s;
  align-self: flex-start;
}

.tool-card:hover .tool-btn {
  background: #ff7a00;
  color: white;
  transform: translateX(4px);
}

/* ===== FAQ SECTION ===== */
.faq-item {
  margin-top: 12px;
  background: #1e293b;
  border-radius: 16px;
  overflow: hidden;
  transition: background 0.3s;
  border: 1px solid #1e293b;
}

.faq-question {
  width: 100%;
  background: transparent;
  color: #ff7a00;
  padding: 18px 20px;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: rgba(255,122,0,0.1);
}

.faq-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  color: #ff7a00;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  padding: 0 20px;
  opacity: 0;
  background: #020617;
}

.faq-answer p {
  margin: 12px 0 16px;
  color: #cbd5f5;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  opacity: 1;
  padding: 0 20px 20px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-item.active .faq-question {
  background: rgba(255,122,0,0.15);
}

/* ===== SEO CONTENT ===== */
.seo {
  max-width: 900px;
  margin: 40px auto;
  padding: 32px;
  background: #020617;
  border-radius: 24px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.6);
}

.seo ul {
  padding-left: 24px;
  margin: 16px 0;
  color: #cbd5f5;
}

.seo li {
  margin-bottom: 8px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 12px;
  margin: 12px;
  padding: 12px 24px;
  border-radius: 40px;
  background: rgba(2,6,23,0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.6);
  z-index: 999;
  border: 1px solid #1e293b;
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(255,122,0,0.4);
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.12);
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  color: #e5e7eb;
  background: rgba(255,122,0,0.15);
  transition: all 0.25s ease;
}

.nav-links a:hover {
  background: #ff7a00;
  color: #020617;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255,122,0,0.5);
}

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

.mode-btn, .menu-btn {
  font-size: 1.2rem;
  padding: 10px 16px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  background: rgba(255,122,0,0.15);
  color: #ff7a00;
  box-shadow: 0 6px 16px rgba(255,122,0,0.3);
  transition: all 0.2s;
}

.mode-btn:hover, .menu-btn:hover {
  background: #ff7a00;
  color: white;
}

.menu-btn {
  display: none;
  font-size: 1.5rem;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  margin-top: 16px;
  padding: 16px;
  border-radius: 20px;
  background: #1e293b;
  border: 1px solid #1e293b;
}

.mobile-menu a {
  display: block;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  color: #e5e7eb;
  background: rgba(255,122,0,0.15);
}

.mobile-menu a:active {
  background: #ff7a00;
  color: #020617;
}

.mobile-menu.show {
  display: block;
}

/* ===== FOOTER ===== */
.site-footer {
  margin: 20px 12px 12px;
  padding: 24px;
  border-radius: 40px;
  background: rgba(2,6,23,0.88);
  backdrop-filter: blur(12px);
  border: 1px solid #1e293b;
  box-shadow: 0 14px 36px rgba(0,0,0,0.6);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.footer-links a {
  padding: 8px 18px;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  color: #e5e7eb;
  background: rgba(255,122,0,0.15);
  transition: all 0.2s;
}

.footer-links a:hover {
  background: #ff7a00;
  color: #020617;
}

.footer-copy {
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
}

/* ===== LIGHT MODE ===== */
body.light {
  background: #f8fafc;
  color: #020617;
}

body.light .app {
  background: #ffffff;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

body.light p,
body.light li {
  color: #334155;
}

body.light .stat {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

body.light .stat span {
  color: #64748b;
}

body.light .result-card {
  background: #f1f5f9;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

body.light .tools-section,
body.light .seo,
body.light .faq-item .faq-answer {
  background: #ffffff;
}

body.light .tool-card {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.light .tool-card p {
  color: #334155;
}

body.light .faq-item {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.light .faq-question {
  color: #ff7a00;
}

body.light .faq-answer {
  background: #ffffff;
}

body.light .site-header,
body.light .site-footer {
  background: rgba(255,255,255,0.88);
  border-color: #e2e8f0;
}

body.light .nav-links a,
body.light .footer-links a,
body.light .mode-btn,
body.light .menu-btn {
  background: rgba(255,122,0,0.1);
  color: #ff7a00;
}

body.light .nav-links a:hover,
body.light .footer-links a:hover,
body.light .mode-btn:hover,
body.light .menu-btn:hover {
  background: #ff7a00;
  color: white;
}

body.light input,
body.light textarea {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #020617;
}

body.light input:focus,
body.light textarea:focus {
  border-color: #ff7a00;
  box-shadow: 0 0 0 3px rgba(255,122,0,0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  .app { padding: 20px; }

  .buttons { flex-direction: column; }
  .buttons button { width: 100%; }

  .result-card {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .stat {
    padding: 12px 8px;
  }
  .stat span {
    font-size: 0.7rem;
  }
  .stat strong {
    font-size: 1.1rem;
  }

  .tools-grid { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .menu-btn { display: block; }

  .site-header {
    margin: 8px;
    padding: 12px 16px;
  }

  .faq-question {
    padding: 14px 16px;
    font-size: 0.95rem;
  }
  .faq-icon { font-size: 1.3rem; }

  .seo {
    padding: 24px 20px;
  }

  .footer-links a {
    padding: 6px 14px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }

  .result-card {
    grid-template-columns: 1fr;
  }

  .stat strong {
    font-size: 1.2rem;
  }

  .tool-card h3 {
    font-size: 1.1rem;
    padding-right: 50px;
  }

  .tool-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .footer-links {
    gap: 8px;
  }
  .footer-links a {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 360px) {
  .app { padding: 16px; }
  .stat span { font-size: 0.65rem; }
  .stat strong { font-size: 1rem; }
}
