:root {
  /* Default Light Mode */
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-secondary: #8b5cf6;
  --danger: #ef4444;
  --success: #22c55e;
  --border-radius: 12px;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --border-color: #e2e8f0;
  --input-bg: #f1f5f9;
  --surface: #ffffff;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  /* Enforcing Dark Text for Headings */
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: 1.8rem;
  color: #334155;
  /* Dark Slate */
}

h3 {
  font-size: 1.25rem;
  color: #334155;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

/* Layout */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.95);
  /* High opacity white */
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(5px);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  width: auto;
  vertical-align: middle;
}

@media (max-width: 768px) {

  header,
  nav,
  .navbar {
    height: auto !important;
  }

  .nav-content {
    flex-direction: column !important;
    height: auto !important;
    padding: 10px 0;
    gap: 10px;
  }

  .mobile-logo-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
  }

  .logo img {
    height: 60px !important;
    max-width: 90vw;
  }
}

footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  background: #ffffff;
}

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

.card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s, background-color 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1e293b;
  /* Dark Text */
}

.card-text {
  color: #475569;
  /* Slate Grey */
}

/* Tool Interface */
.tool-header {
  text-align: center;
  margin-bottom: 3rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--accent-primary);
}

.tool-subtitle {
  color: #64748b;
  font-size: 1.1rem;
}

.section-box {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.section-box h3,
.section-box h4 {
  color: #1e293b;
  /* Ensure headers inside boxes are dark */
}

.example-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #334155;
  /* Dark Label */
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea,
.form-control,
.form-select {
  width: 100%;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #0f172a;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Buttons */
button.btn,
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--accent-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button.btn:hover,
.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

button.btn-locked {
  background: #475569;
  cursor: pointer;
  position: relative;
}

button.btn-locked::after {
  content: "🔒";
  margin-left: 8px;
}

/* Upload Box */
.file-upload {
  border: 2px dashed var(--border-color);
  padding: 2rem;
  text-align: center;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: border-color 0.2s;
  background: #f8fafc;
}

.file-upload:hover {
  border-color: var(--accent-primary);
}

.result-box {
  background: #f1f5f9;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-top: 2rem;
  text-align: center;
  color: #1e293b;
}

/* Utilities specific */
.converter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: end;
}

/* --- CLEAN & SOLID DESIGN (Footer & Branding) --- */

/* 1. Navbar Brand */
.navbar-brand {
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #212529;
  /* Solid Dark Grey */
  text-shadow: none;
}

/* 2. Footer Brand */
.footer-brand-pro {
  font-weight: 800;
  font-family: 'Segoe UI', Roboto, sans-serif;
  color: #0d6efd;
  /* Official Bootstrap Primary Blue */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 3. Request Tool Line */
.request-tool-line {
  color: #6c757d;
  transition: color 0.3s;
}

.request-tool-line:hover {
  color: #0d6efd;
}

/* 4. Instagram Icon Specifics (Gradient ONLY on Icon) */
.insta-icon i {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* 5. Icon Hover Animation */
.social-icons-footer a i {
  transition: transform 0.2s ease-in-out;
}

.social-icons-footer a:hover i {
  transform: translateY(-3px);
}