body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--bg-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-left {
  display: flex;
  align-items: center;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-color);
  text-decoration: none;
  margin-right: 2rem;
}
.brand .ai-accent {
  color: #007bff;  /* Or your preferred brand blue */
}


.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-right a,
.nav-left a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
  font-size: 1.10rem;
  line-height: 1;
}

.nav-right a:hover,
.nav-left a:hover {
  color: var(--accent-color);
}

.card {
  background-color: var(--card-bg);
  color: var(--text-color);
}

:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --card-bg: #f5f5f5;
  --accent-color: #1D4ED8;
  --warning-color: #DC2626;
  --subtle-text: #6B7280;
  --disabled-bg: #E5E7EB;
  --disabled-text: #9CA3AF;
  --border-color: #ccc;
}
[data-theme="dark"] {
  --bg-color: #0d0d0d;         /* Almost black */
  --text-color: #f1f5f9;       /* Soft white */
  --card-bg: #1a1a1a;          /* Slightly lighter than bg */
  --accent-color: #3b82f6;     /* Your blue buttons */
  --warning-color: #f87171;
  --subtle-text: #9ca3af;
  --disabled-bg: #2e2e2e;
  --disabled-text: #6b7280;
  --border-color: #333333;
}


/*responsinve to other devices*/
/* ==== Global Reset ==== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ==== Base Styles ==== */
html, body {
  width: 100%;
  height: 100%;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
   background-color: var(--bg-color);  /* ✅ uses theme variable */
  color: var(--text-color);           /* ✅ uses theme variable */
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==== Typography ==== */
h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  font-size: 1rem;
  overflow-wrap: break-word;
}

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

/* ==== Layout Helpers ==== */
.flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ==== Utility ==== */
.text-center {
  text-align: center;
}

.hide-on-mobile {
  display: block;
}

.break-word {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}


/* Hamburger icon */
.nav-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/* ==== Media Queries ==== */

/* Tablets and down */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .container {
    padding: 0.75rem;
  }
  .hide-on-mobile {
    display: none;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.25rem;
  }
  h3 {
    font-size: 1.1rem;
  }
  .container {
    padding: 0.5rem;
  }
}

/* Ultra small screens */
@media (max-width: 360px) {
  html {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .nav-right {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .brand {
    font-size: 1rem;
  }
}

/* Responsive navigation behavior */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
  }

  .nav-right {
    display: none;  /* hidden by default on mobile */
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  .nav-right a {
    margin: 0.5rem 0;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-right.active {
    display: flex;
  }
}


/* Hide caret only on NON-editable elements */
body *:not(input):not(textarea):not(select):not([contenteditable="true"]) {
  caret-color: transparent;
}

/* Ensure real fields keep the normal caret */
input, textarea, select, [contenteditable="true"] {
  caret-color: auto;
}
