:root {
  /* Background layers */
  --bg-main: #0f1417;
  --bg-panel: #161d22;
  --bg-panel-soft: #1d252b;

  /* Borders & dividers */
  --border-soft: rgba(255,255,255,0.06);

  /* Text */
  --text-main: #e6edf3;
  --text-muted: #9fb0bf;

  /* Accents */
  --accent-cool: #4ea8de;
  --accent-warm: #a5d8ff;
}

* {
  box-sizing: border-box;
  font-family: 'JetBrains Mono', monospace;
}

body {
  margin: 0 !important;
  color: var(--text-main);
  width: 100%;
  height: 100%;
}

a {
  color: var(--text-main);
  text-decoration: none;
}

a:hover {
  color: var(--accent-cool);
}

strong { font-weight: bold; }

small,
.rss-date,
.rss-description,
.date {
  color: var(--text-muted);
}

span {
  font-size: 1rem;
  font-weight: 900;
}

/* Utility */
.hidden { display: none !important; }
.visible { display: block !important; }

.green { color: #72ff72; }
.red { color: #ff1a1a; }

/* Animation utilities */
.animated { opacity: 0; }

@keyframes fadeIn {
  0% { opacity: 0; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(10px); }
  50% { opacity: 0.7; transform: translateY(-5px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes levitate-hover {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

/* Text animation helpers (reusable if you keep that effect) */
.animated-text { display: inline-block; }
.word { display: inline-block; }

.text-wrapper {
  position: relative;
  display: inline-block;
  padding-top: 0.2em;
  padding-right: 0.05em;
  padding-bottom: 0.1em;
  overflow: hidden;
}

.letter {
  display: inline-block;
  line-height: 1em;
  transform-origin: 0 0;
}

/* Buttons (generic) */
/* Generic button style – matches project-image-icon look */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--text-main, #e6edf3);
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

button:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

button:active {
  transform: translateY(0px) scale(0.97);
  box-shadow: none;
  background: rgba(255,255,255,0.18);
}

/* Form buttons: same style, just full-width */
form button {
  width: 100%;
}

/* Image button is just a slightly smaller variant */
.project-image-icon {
  font-size: 0.85rem;
  padding: 6px 10px;
}

.project-image-icon i {
  font-size: 0.9em;
  opacity: 0.85;
}
button.button-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(25, 32, 37, 0.65); /* slightly darker glass */
  color: var(--text-main, #e6edf3);
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

button.button-dark:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(28, 36, 42, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.55);
}

button.button-dark:active {
  transform: translateY(0px) scale(0.97);
  box-shadow: none;
  background: rgba(28, 36, 42, 1);
}


/* Popup / modal functionality */
.popup-container-outer {
  display: none;
  width: 100%;
  height: 100%;
  inset: 0;
  position: fixed;
  background-color: rgba(0, 0, 0, 0.75);
}

.popup-container {
  width: 100%;
  max-width: 800px;
  z-index: 1000;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  max-height: 90%;
  overflow-y: auto;
  color: black;
}

.demo-active { max-width: 1200px !important; }

.popup-container img {
  max-width: 100%;
  max-height: 500px;
  border-radius: 10px;
}

#popup-image-holder {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 200px;
}

#popup-image {
  max-width: 100%;
  max-height: 500px;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.popup-navigation {
  position: absolute;
  display: flex;
  justify-content: space-between;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
}

.popup-overlay {
  position: absolute;
  top: 5%;
  right: 2%;
  background-color: rgba(255, 255, 255, 0.9);
  color: black;
  padding: 10px;
  border-radius: 10px;
  z-index: 10;
}

#prev-button, #next-button {
  pointer-events: auto;
  border: none;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.9);
  color: black;
  transition: all 0.3s ease;
  position: relative;
  mix-blend-mode: difference;
}

#prev-button { left: 20px; }
#next-button { right: 20px; }

.popup-track-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.popup-track {
  display: flex;
  transition: transform 0.3s ease-in-out;
}

.popup-track img.popup-image-slide {
  height: auto;
  object-fit: contain;
  min-width: 100%;
}

.popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.popup-demo {
  width: 100%;
  height: 70vh;
  margin-top: 15px;
}

.popup-demo iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Forms (generic) */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #131516;
  border: 1px solid #2a2e33;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
}

form label {
  font-size: 0.9rem;
  font-weight: bold;
  color: #e8e6e3;
  margin-bottom: 4px;
  display: block;
}

form input,
form textarea,
form select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  background: #1b1e21;
  border: 1px solid #444;
  border-radius: 8px;
  color: #e8e6e3;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

form input:focus,
form textarea:focus,
form select:focus {
  border-color: #7cd1ff;
  box-shadow: 0 0 0 2px rgba(124,209,255,0.35);
  outline: none;
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

form button {
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #7cd1ff, #a78bfa);
  color: #121416;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

form button:active {
  transform: translateY(0);
  box-shadow: none;
}

.admin-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form .form-row-inline {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.admin-form .form-row-inline .form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Responsive iframe helper */
.iframe-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.iframe-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* “reveal” effect used by JS */
.float-up {
  opacity: 0;
  transform: translateY(10px);
  transition: transform 400ms ease, opacity 400ms ease;
}

.float-up.loaded {
  opacity: 1;
  transform: translateY(0);
}
.project-container {
  /* make the highlight change smooth */
  transition:
    outline-color 0.5s ease-in-out,
    outline-width 0.5s ease-in-out,
    box-shadow 0.5s ease-in-out;
}
.project-title .link {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.project-highlight {
  outline: 3px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}
.status-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.uptime-spark {
  display: flex;
  gap: 2px;
  align-items: center;
  height: 10px;
}

.uptime-bar {
  width: 6px;
  height: 10px;
  border-radius: 2px;
  opacity: 0.9;
}

.uptime-bar.up { background: #27c56b; }
.uptime-bar.down { background: #e14b4b; }
.uptime-bar.warn {
  background: #f5c542;
}

.uptime-spark.empty {
  opacity: 0.4;
}
.status-right {
  display: flex;
  flex-direction: row;
  gap: 15px;
  align-items: center;
}
.uptime-bar.nodata {
  background: #3a444c;
  opacity: 0.5;
}
#color-controls {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

#color-controls label {
  color: var(--text-main);
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: 0.2px;
  /* width: 35%; */
}

#color-controls input[type="range"] {
  -webkit-appearance: none;
  /* width: 65%; */
  height: 4px;
  background: var(--border-soft);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

#color-controls input[type="range"]:hover {
  background: rgba(255,255,255,0.18);
}

#color-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent-cool);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

#color-controls input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--accent-warm);
  transform: scale(1.05);
}
/* --- Scrollbars tuned for dark glass UI --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent; /* blends with container */
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08); /* subtle */
  border-radius: 8px;
  backdrop-filter: blur(2px);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.16);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
::webkit-scrollbar-button { 
     display:none !important;
    }