:root {
  --bg: #0b1220;
  --bg-soft: #0f1a2e;
  --card: #121c2f;
  --card-hover: #18243b;
  --primary: #2f80ff;
  --primary-hover: #1f6ef0;
  --text: #ffffff;
  --text-soft: #b7c2d3;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 18, 32, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  padding: 10px 0;
}

.site-logo {
  width: 230px;
  height: 70px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.navbar .nav-link {
  color: var(--text-soft) !important;
  margin-left: 14px;
  font-weight: 600;
  transition: 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #ffffff !important;
}

.custom-toggler {
  border: 1px solid var(--border);
  padding: 10px;
}

.custom-toggler span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  margin: 5px 0;
  border-radius: 10px;
}

.language-btn {
  background: #18243b;
  border: 1px solid var(--border);
  color: white;
  margin-left: 18px;
  padding: 10px 16px;
  border-radius: 12px;
}

.language-btn:hover {
  background: #24314d;
  color: white;
}

.language-btn img,
.dropdown-item img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  margin-right: 8px;
  border-radius: 50%;
}

.dropdown-menu {
  background: #18243b;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
}

.dropdown-item {
  color: white;
  border-radius: 10px;
  padding: 10px 12px;
}

.dropdown-item:hover {
  background: #24314d;
  color: white;
}

.hero-section {
  padding: 120px 0 90px;
}

.hero-badge {
  display: inline-block;
  background: rgba(47, 128, 255, 0.15);
  color: #7db0ff;
  padding: 8px 18px;
  border-radius: 30px;
  margin-bottom: 20px;
  border: 1px solid rgba(47, 128, 255, 0.25);
}

.hero-content h1 {
  font-size: 62px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-content p {
  max-width: 760px;
  margin: auto;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  margin-top: 35px;
}

.primary-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 14px;
  margin-right: 10px;
  box-shadow: 0 12px 30px rgba(47, 128, 255, 0.18);
  transition: 0.3s ease;
}

.primary-btn:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-2px);
}

.secondary-btn {
  border: 1px solid var(--border);
  color: white;
  padding: 14px 30px;
  border-radius: 14px;
  transition: 0.3s ease;
}

.secondary-btn:hover {
  background: #18243b;
  color: white;
  transform: translateY(-2px);
}

.tools-section {
  padding: 70px 0;
}

.section-title {
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 44px;
  font-weight: 750;
}

.section-title p {
  color: var(--text-soft);
}

.tool-card {
  background: rgba(18, 28, 47, 0.92);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 38px;
  text-align: center;
  transition: 0.3s ease;
  height: 100%;
}

.tool-card:hover {
  transform: translateY(-8px);
  background: var(--card-hover);
  border-color: rgba(47, 128, 255, 0.35);
}

.tool-icon {
  width: 92px;
  height: 92px;
  margin: auto;
  margin-bottom: 22px;
  border-radius: 22px;
  background: rgba(47, 128, 255, 0.15);
  border: 1px solid rgba(47, 128, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  color: #6fa7ff;
}

.barcode-icon {
  letter-spacing: -3px;
}

.tool-card h3 {
  margin-bottom: 15px;
  font-weight: 700;
}

.tool-card p {
  color: var(--text-soft);
  margin-bottom: 25px;
  line-height: 1.7;
}

.tool-btn {
  background: var(--primary);
  color: white;
  padding: 12px 26px;
  border-radius: 13px;
  transition: 0.3s ease;
}

.tool-btn:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-2px);
}

.generator-panel {
  margin-top: 50px;
  background: rgba(18, 28, 47, 0.96);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 32px;
}

.generator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.generator-header h3 {
  margin: 0;
  font-weight: 750;
}

.close-panel-btn {
  background: #e74c3c;
  color: white;
  border-radius: 10px;
  padding: 9px 18px;
}

.close-panel-btn:hover {
  background: #d93d2d;
  color: white;
}

.form-card,
.preview-card {
  background: #0f1829;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px;
  height: 100%;
}

.tool-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.tool-tab {
  border: 1px solid var(--border);
  background: #18243b;
  color: var(--text-soft);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  transition: 0.25s ease;
}

.tool-tab:hover,
.tool-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

label {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 8px;
}

.custom-input {
  background: #111b2e;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: white;
  border-radius: 13px;
  min-height: 48px;
}

.custom-input:focus {
  background: #111b2e;
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(47, 128, 255, 0.15);
}

.custom-input::placeholder {
  color: #7d8aa0;
}

.ltr-input {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext;
}

/* =========================
   Phone Input - Always Left
   ========================= */

.iti {
  width: 100%;
  direction: ltr !important;
}

.iti__tel-input {
  width: 100%;
  background: #111b2e !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: white !important;
  border-radius: 13px !important;
  min-height: 48px;
  direction: ltr !important;
  text-align: left !important;
  padding-left: 120px !important;
  padding-right: 16px !important;
}

.iti__country-container {
  left: 0 !important;
  right: auto !important;
  border-radius: 13px 0 0 13px;
}

.iti__selected-country {
  background: #18243b !important;
  border-radius: 13px 0 0 13px !important;
  left: 0 !important;
  right: auto !important;
  direction: ltr !important;
}

.iti__dropdown-content {
  background: #111b2e !important;
  color: white !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  direction: ltr !important;
  text-align: left !important;
}

.iti__country {
  color: white !important;
  direction: ltr !important;
  text-align: left !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
  background: #24314d !important;
}

.iti__search-input {
  background: #0f1829 !important;
  color: white !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 10px !important;
  direction: ltr !important;
  text-align: left !important;
}

html[dir="rtl"] .iti {
  direction: ltr !important;
}

html[dir="rtl"] .iti__tel-input {
  direction: ltr !important;
  text-align: left !important;
  padding-left: 120px !important;
  padding-right: 16px !important;
}

html[dir="rtl"] .iti__country-container {
  left: 0 !important;
  right: auto !important;
}

html[dir="rtl"] .iti__selected-country {
  left: 0 !important;
  right: auto !important;
}

html[dir="rtl"] .iti__dropdown-content,
html[dir="rtl"] .iti__country,
html[dir="rtl"] .iti__search-input {
  direction: ltr !important;
  text-align: left !important;
}

.customization-box {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.customization-box h4 {
  font-size: 20px;
  margin-bottom: 18px;
  font-weight: 700;
}

.generate-main-btn {
  margin-top: 26px;
  width: 100%;
}

.preview-card h4 {
  margin-bottom: 20px;
  font-weight: 700;
  text-align: center;
}

.preview-box {
  width: 100%;
  min-height: 320px;
  background: #ffffff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  overflow: auto;
  padding: 22px;
}

.preview-box canvas,
.preview-box svg {
  max-width: 100%;
  height: auto;
}

.barcode-preview-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.barcode-preview-box svg {
  width: 100%;
  max-width: 360px;
}

.barcode-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  padding: 20px;
}

.download-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.download-actions .secondary-btn {
  padding: 11px 10px;
  margin: 0;
}

.about-section,
.contact-section {
  padding: 75px 0;
}

.content-card {
  background: rgba(18, 28, 47, 0.92);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 42px;
  overflow: hidden;
}

.content-card h2 {
  margin-bottom: 20px;
  font-weight: 750;
}

.content-card p {
  color: var(--text-soft);
  line-height: 1.8;
}

.contact-link {
  color: #7db0ff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  display: inline-block;
  max-width: 100%;
  width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.6;
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 25px 0;
  margin-top: 60px;
}

.site-footer p {
  color: var(--text-soft);
  margin: 0;
}

html[dir="rtl"] .nav-link {
  margin-left: 0;
  margin-right: 14px;
}

html[dir="rtl"] .language-btn {
  margin-left: 0;
  margin-right: 18px;
}

html[dir="rtl"] .language-btn img,
html[dir="rtl"] .dropdown-item img {
  margin-right: 0;
  margin-left: 8px;
}

@media (max-width: 991px) {
  .navbar-collapse {
    padding-top: 20px;
  }

  .language-btn {
    margin-left: 0;
    margin-top: 10px;
  }

  .nav-link {
    margin-left: 0;
    padding: 10px 0;
  }

  .preview-box {
    min-height: 280px;
  }

  .barcode-preview-box {
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 80px 0 60px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .site-logo {
    width: 190px;
    height: 58px;
  }

  .primary-btn,
  .secondary-btn {
    display: block;
    width: 100%;
    margin: 10px 0;
  }

  .generator-header {
    gap: 15px;
    align-items: flex-start;
    flex-direction: column;
  }

  .generator-panel {
    padding: 22px;
  }

  .form-card,
  .preview-card {
    padding: 20px;
  }

  .tool-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-tab {
    width: 100%;
  }

  .preview-box {
    min-height: 240px;
  }

  .barcode-preview-box {
    min-height: 240px;
  }

  .download-actions {
    grid-template-columns: 1fr;
  }

  .contact-link {
    font-size: 17px;
    width: 100%;
    max-width: 100%;
    text-align: center;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .content-card {
    padding: 32px 18px;
    overflow: hidden;
  }

  .iti__tel-input,
  html[dir="rtl"] .iti__tel-input {
    padding-left: 115px !important;
    padding-right: 14px !important;
  }
}