/* Disable system cursor */
* { cursor: none !important; }

/* =====================
   THEME VARIABLES
===================== */

:root {
  --bg-main: #0b1020;
  --bg-card: #151a2e;
  --bg-header: #0f172a;
  --text: #e5e7eb;
  --accent: #38bdf8;
  --border: rgba(255,255,255,0.15);
}

/* Dark */
[data-theme="dark"] {
  --bg-main: radial-gradient(circle at top, #1e293b, #020617);
  --bg-card: #0f172a;
  --bg-header: #020617;
  --text: #e5e7eb;
  --accent: #38bdf8;
}

/* Blue */
[data-theme="blue"] {
  --bg-main: linear-gradient(135deg, #020617, #1e3a8a);
  --bg-card: #020617;
  --bg-header: #020617;
  --text: #e0e7ff;
  --accent: #6366f1;
}

/* Green */
[data-theme="green"] {
  --bg-main: linear-gradient(135deg, #022c22, #064e3b);
  --bg-card: #022c22;
  --bg-header: #022c22;
  --text: #ecfdf5;
  --accent: #34d399;
}

/* Orange */
[data-theme="orange"] {
  --bg-main: linear-gradient(135deg, #431407, #7c2d12);
  --bg-card: #431407;
  --bg-header: #431407;
  --text: #ffedd5;
  --accent: #fb923c;
}

/* =====================
   BASE
===================== */

/* Ensure footer stays at bottom even when content is short */



html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* =====================
   HEADER
===================== */

main {
  flex: 1;
  display: block;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
}

nav button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.25s ease;
}

nav button:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-2px);
}

/* =====================
   THEME DOTS
===================== */

.themes span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
  border: 1px solid var(--border);
}
.themes span:nth-child(1){background:#0f172a;}
.themes span:nth-child(2){background:#6366f1;}
.themes span:nth-child(3){background:#34d399;}
.themes span:nth-child(4){background:#fb923c;}

/* Theme selector hover feedback */
.themes span {
  transition: 
    border 0.1s ease,
    transform 0.25s ease;
}

.themes span:hover {
  border: 1px solid #ffffff;
  transform: scale(1.15);
}


/* =====================
   VIEWS
===================== */

.view {
  display: none;
  padding: 60px 20px;
}

.view.active {
  display: block;
}

.container {
  max-width: 900px;
  margin: auto;
}

/* =====================
   SEARCH INPUTS
===================== */

.search-row {
  display: flex;
  gap: 16px;
}

select, input {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

/* =====================
   RESULT CARD
===================== */

.result {
  margin-top: 30px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================
   STATES LIST (FIXED)
===================== */

.states-grid {
  display: block;
}

.states-grid span {
  display: block;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px; /* VERY LITTLE rounding */
}

/* Hover effect for state list items */
.states-grid span {
  transition: 
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.states-grid span:hover {
  background-color: var(--accent);
  color: #000;
  transform: translateX(4px);
}


/* =====================
   INFO SECTION
===================== */

.info-list {
  max-width: 700px;
  margin: auto;
  line-height: 1.8;
}

/* =====================
   FOOTER (BOTTOM FIX)
===================== */

footer {
  margin-top: auto;
  flex-direction: column;
  text-align: center;
  padding: 10px;
  border-top: 1px solid var(--border);
  background: var(--bg-header);
}

/* =====================
   CURSOR
===================== */

.cursor {
  width: 16px; /* slightly bigger */
  height: 16px;
  border-radius: 50%;
  background: white;
  position: fixed;
  pointer-events: none;
  mix-blend-mode: difference;
  z-index: 9999;
}


/* Active nav button indicator */
nav button {
  position: relative;
}

nav button.active::after {
  content: "";
  position: absolute;
  left: 15%;
  bottom: -6px;
  width: 70%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}


/* =====================
   MOBILE RESPONSIVENESS
===================== */

@media (max-width: 768px) {

  /* Header layout */
  .header {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }

  /* Left section (title + theme dots) */
  .header .left {
    width: 100%;
  }

  /* Navigation buttons */
  nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  nav button {
    flex: 1 1 calc(50% - 8px); /* 2 buttons per row */
    text-align: center;
    padding: 10px;
  }

  /* Active underline fix for mobile */
  nav button.active::after {
    bottom: -4px;
  }

  /* Search inputs stack */
  .search-row {
    flex-direction: column;
  }

  select, input {
    width: 100%;
  }

  /* Cursor: disable on touch devices */
  .cursor {
    display: none;
  }
}
