@font-face {
  font-family: 'SourceSansPro';
  font-style: normal;
  font-weight: 300;
  src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('/static/fonts/SourceSansPro-Light.woff') format('woff');
}

@font-face {
  font-family: 'SourceSansPro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url('/static/fonts/SourceSansPro-Regular.woff') format('woff');
}

@font-face {
  font-family: 'SourceSansPro';
  font-style: normal;
  font-weight: 700;
  src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('/static/fonts/SourceSansPro-Bold.woff') format('woff');
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  src: local('Nunito'), url('/static/fonts/nunito-variable.woff2') format('woff2');
}

@font-face {
  font-family: 'Flux-Regular';
  font-style: normal;
  font-weight: 400;
  src: local('Flux'), local('Flux-Regular'), url('/static/fonts/Flux-Regular.woff') format('woff');
}

@font-face {
  font-family: 'Flux-Regular';
  font-style: normal;
  font-weight: 700;
  src: local('Flux Bold'), local('Flux-Bold'), url('/static/fonts/Flux-Bold.woff') format('woff');
}

html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

:root {
  /* Light theme variables (default) */
  --bg-color: hsl(200, 12%, 91%);
  --text-color: hsl(200, 35%, 25%);
  --color-primary: hsl(207, 90%, 40%); /* Darker for better contrast */
  --outline-color: hsl(188, 100%, 54%);
  --button-bg: linear-gradient(to right, #e0e0e0, #bdbdbd);
  --button-bg-box-shadow-color: hsla(0, 0%, 63%, 0.5);
  --button-bg-primary: linear-gradient(#3776ab 10%, #2b5b84 90%);
  --button-bg-primary-box-shadow-color: hsla(207, 51%, 34%, 0.5);
  --button-bg-secondary: linear-gradient(#ffdf76 10%, #ffd343 90%);
  --button-bg-secondary-box-shadow-color: hsla(46, 100%, 63%, 0.5);
  --button-bg-danger: linear-gradient(#e53e3e 10%, #c53030 90%);
  --button-bg-danger-box-shadow-color: hsla(0, 61%, 48%, 0.5);
  --button-bg-success: linear-gradient(to right, #40a854, #43b05c);
  --button-bg-success-box-shadow-color: hsla(128, 80%, 48%, 0.5);
  --button-action-shadow-color: hsla(200, 15%, 60%, 0.12);
  --underline-color: hsl(200, 35%, 65%);
  --secondary-text-color: hsl(200, 20%, 45%); /* Darker for better contrast */
  --send-icon-hover-color: hsl(208, 51%, 34%);
  /* Password visibility eye; matches shorten send hover by default */
  --password-toggle-hover-color: hsl(208, 51%, 34%);
  --send-spinner-icon-color: hsl(200, 15%, 70%);
  --success-icon-color: hsl(144, 40%, 57%);
  --error-icon-color: hsl(0, 86%, 63%);
  --copy-icon-color: hsl(144, 40%, 57%);
  --copy-icon-bg-color: hsl(144, 100%, 96%);
  --copy-icon-shadow-color: hsla(200, 15%, 60%, 0.12);
  --focus-outline-color: hsla(207, 90%, 61%, 0.5);
  --checkbox-bg-color: hsl(208, 51%, 34%);
  --checkbox-border-color: hsl(200, 20%, 70%);
  --input-shadow-color: hsla(200, 15%, 70%, 0.2);
  --input-hover-shadow-color: hsla(200, 15%, 70%, 0.4);
  --input-label-color: hsl(200, 35%, 25%);
  --table-bg-color: hsl(200, 12%, 95%);
  --table-shadow-color: hsla(200, 20%, 70%, 0.3);
  --table-tr-border-color: hsl(200, 14%, 94%);
  --table-tr-hover-bg-color: hsl(200, 14%, 98%);
  --table-head-tr-border-color: hsl(200, 14%, 90%);
  --table-status-gray-bg-color: hsl(200, 12%, 95%);
  
  /* Input and form specific colors */
  --input-bg-color: hsl(0, 0%, 100%);
  --input-border-color: hsl(0, 0%, 96%);
  --select-arrow-color: hsl(200, 15%, 38%);
  --hr-color: hsl(200, 20%, 82%);
  --dialog-bg-color: hsla(0, 0%, 20%, 0.8);
  --dialog-box-bg-color: hsl(0, 0%, 100%);
  --nav-button-bg-color: hsl(0, 0%, 100%);
  --nav-button-disabled-bg-color: hsl(0, 0%, 96%);
  --nav-button-shadow-color: hsla(0, 0%, 39%, 0.1);
  --nav-button-disabled-shadow-color: hsla(0, 0%, 59%, 0.1);
  
  /* Theme toggle specific */
  --toggle-bg-color: hsl(200, 12%, 90%);
  --toggle-hover-bg-color: hsl(200, 12%, 85%);
  --toggle-handle-color: hsl(0, 0%, 100%);
  --toggle-icon-color: hsl(200, 35%, 25%);
  --toggle-shadow-color: hsla(0, 0%, 0%, 0.1);
  
  /* Action button colors */
  --action-delete-bg-color: hsl(0, 100%, 96%);
  --action-delete-icon-color: hsl(0, 100%, 69%);
  --action-edit-bg-color: hsl(46, 100%, 94%);
  --action-edit-icon-color: hsl(46, 90%, 50%);
  --action-qrcode-bg-color: hsl(0, 0%, 94%);
  --action-qrcode-icon-color: hsl(0, 0%, 35%);
  --action-stats-bg-color: hsl(260, 100%, 96%);
  --action-stats-icon-color: hsl(260, 100%, 69%);
  --action-ban-bg-color: hsl(10, 100%, 96%);
  --action-ban-icon-color: hsl(10, 100%, 40%);
  --action-success-bg-color: hsl(144, 100%, 96%);
  --action-success-icon-color: hsl(144, 40%, 57%);
  
  /* Counter stats */
  --counter-stat-bg-color: hsla(0, 0%, 100%, 0.95); /* More opaque for better contrast */
  --counter-stat-hover-bg-color: hsl(0, 0%, 100%);
  
  /* Table edit row */
  --table-edit-bg-color: hsl(0, 0%, 98%);
}

/* Dark theme variables */
[data-theme="dark"] {
  --bg-color: hsl(220, 13%, 13%);
  --text-color: hsl(210, 10%, 85%);
  --color-primary: hsl(207, 90%, 70%); /* Lighter for better contrast on dark */
  --outline-color: hsl(188, 100%, 65%);
  
  /* Theme button needs dark theme styling */
  --button-bg: linear-gradient(to right, #3a3d42, #313439);
  --button-bg-box-shadow-color: hsla(0, 0%, 0%, 0.3);

  --button-action-shadow-color: hsla(0, 0%, 0%, 0.2);
  --underline-color: hsl(210, 15%, 65%);
  --secondary-text-color: hsl(210, 12%, 70%); /* Lighter for better contrast on dark */
  --send-icon-hover-color: hsl(207, 90%, 70%);
  --password-toggle-hover-color: hsl(207, 90%, 70%);
  --send-spinner-icon-color: hsl(210, 8%, 50%);
  --success-icon-color: hsl(144, 40%, 65%);
  --error-icon-color: hsl(0, 86%, 70%);
  --copy-icon-color: hsl(144, 40%, 65%);
  --copy-icon-bg-color: hsl(144, 50%, 15%);
  --copy-icon-shadow-color: hsla(0, 0%, 0%, 0.2);
  --focus-outline-color: hsla(207, 90%, 70%, 0.5);
  --checkbox-bg-color: hsl(207, 90%, 65%);
  --checkbox-border-color: hsl(210, 15%, 50%);
  --input-shadow-color: hsla(0, 0%, 0%, 0.3);
  --input-hover-shadow-color: hsla(0, 0%, 0%, 0.4);
  --input-label-color: hsl(210, 10%, 85%);
  --table-bg-color: hsl(220, 13%, 18%);
  --table-shadow-color: hsla(0, 0%, 0%, 0.4);
  --table-tr-border-color: hsl(220, 10%, 22%);
  --table-tr-hover-bg-color: hsl(220, 10%, 20%);
  --table-head-tr-border-color: hsl(220, 10%, 25%);
  --table-status-gray-bg-color: hsl(220, 8%, 25%);
  
  /* Input and form specific colors */
  --input-bg-color: hsl(220, 13%, 18%);
  --input-border-color: hsl(220, 10%, 25%);
  --select-arrow-color: hsl(210, 8%, 65%);
  --hr-color: hsl(220, 10%, 25%);
  --dialog-bg-color: hsla(0, 0%, 0%, 0.8);
  --dialog-box-bg-color: hsl(220, 13%, 18%);
  --nav-button-bg-color: hsl(220, 13%, 18%);
  --nav-button-disabled-bg-color: hsl(220, 10%, 15%);
  --nav-button-shadow-color: hsla(0, 0%, 0%, 0.3);
  --nav-button-disabled-shadow-color: hsla(0, 0%, 0%, 0.2);
  
  /* Theme toggle specific */
  --toggle-bg-color: hsl(220, 10%, 25%);
  --toggle-hover-bg-color: hsl(220, 10%, 30%);
  --toggle-handle-color: hsl(220, 13%, 18%);
  --toggle-icon-color: hsl(210, 10%, 85%);
  --toggle-shadow-color: hsla(0, 0%, 0%, 0.3);
  
  /* Action button colors - darker versions for dark theme */
  --action-delete-bg-color: hsl(0, 50%, 15%);
  --action-delete-icon-color: hsl(0, 70%, 65%);
  --action-edit-bg-color: hsl(46, 50%, 15%);
  --action-edit-icon-color: hsl(46, 70%, 65%);
  --action-qrcode-bg-color: hsl(220, 10%, 20%);
  --action-qrcode-icon-color: hsl(210, 8%, 65%);
  --action-stats-bg-color: hsl(260, 50%, 15%);
  --action-stats-icon-color: hsl(260, 70%, 65%);
  --action-ban-bg-color: hsl(10, 50%, 15%);
  --action-ban-icon-color: hsl(10, 70%, 65%);
  --action-success-bg-color: hsl(144, 50%, 15%);
  --action-success-icon-color: hsl(144, 60%, 65%);
  
  /* Counter stats - dark theme versions */
  --counter-stat-bg-color: hsla(0, 0%, 100%, 0.08); /* Slightly more opaque for better contrast */
  --counter-stat-hover-bg-color: hsla(0, 0%, 100%, 0.12);
  
  /* Table edit row - dark theme */
  --table-edit-bg-color: hsl(220, 10%, 18%);
}

/* ANIMATIONS */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes tooltip {
  to { opacity: 0.9; transform: translate(-50%, 0); }
}

@keyframes countUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* CUSTOM TYPOGRAPHY */

/* H tags - Flux font family + 3px larger */
h1, h2, h4, h5, h6 {
  font-family: 'Flux-Regular', 'SourceSansProRegular', Arial, sans-serif;
  font-weight: 700;
}

h3 {
  font-family: 'Flux-Regular', 'SourceSansProRegular', Arial, sans-serif;
  font-weight: 300;
}

/* Table and Input - Monospace fonts */
table, 
input, 
textarea, 
select {
  font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif;
}

/* Logo - Flux Bold + 3px larger */
header a.logo {
  font-family: 'Flux-Regular', 'SourceSansProRegular', Arial, sans-serif;
  font-weight: 700; /* Bold */
  font-size: 25px; /* 22px + 3px */
}

/* Logo Links - Flux Regular + 3px larger */
header ul.logo-links li a {
  font-family: 'Flux-Regular', 'SourceSansProRegular', Arial, sans-serif;
  font-weight: 400; /* Regular */
  font-size: calc(1rem + 3px);
}

/* GENERAL */
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  font: 16px/1.45 'SourceSansPro', 'Nunito', Arial, sans-serif;
  overflow-x: hidden;
  color: var(--text-color);
}

* {
  box-sizing: border-box;
  outline-color: var(--outline-color);

}

*::-moz-focus-inner {
  border: none;
}

.hidden {
  display: none;
}

hr {
  width: 100%;
  height: 2px;
  outline: none;
  border: none;
  background-color: var(--hr-color);
}

span.bold { font-weight: 700; }
span.underline { border-bottom: 2px dotted #999; }

.space-between { 
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.align-center {
  display: flex;
  align-items: center;
}

a {
  color: var(--color-primary);
  border-bottom: 1px dotted transparent;
  text-decoration: none;
  transition: all 0.2s ease-out;
  cursor: pointer;
}

button.link {
  color: var(--color-primary);
  border-bottom: none;
  text-decoration: none;
  transition: all 0.2s ease-out;
  cursor: pointer;
}

button.link .email-text {
  border-bottom: 1px dotted transparent;
  transition: all 0.2s ease-out;
}

a:hover {
  border-bottom-color: var(--color-primary);
}

button.link:hover .email-text {
  border-bottom-color: var(--color-primary);
}

a.wrapper-only {
  color: inherit;
}

a.nav {
  color: inherit;
}

a.nav:hover {
  color: var(--color-primary);
}

a.nav[href="/logout"] {
  color: hsl(0, 84%, 58%);
  border-bottom: 1px dotted transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-weight: 400;
}

a.nav[href="/logout"] .logout-text {
  border-bottom: 1px dotted transparent;
}

a.nav[href="/logout"]:hover {
  color: hsl(0, 78%, 50%);
}

a.nav[href="/logout"]:hover .logout-text {
  border-bottom-color: hsl(0, 78%, 50%);
}

a.button,
button {
  position: relative;
  width: auto;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  line-height: 1;
  word-break: keep-all;
  color: #444;
  border: none;
  border-radius: 12px;
  transition: all 0.4s ease-out;
  cursor: pointer;
  overflow: hidden;
  background: var(--button-bg);
  box-shadow: 0 5px 6px var(--button-bg-box-shadow-color);
}

a.button.primary,
button.primary {
  color: #e6e8ea;
  background: var(--button-bg-primary);
  box-shadow: 0 5px 6px var(--button-bg-primary-box-shadow-color);
}

a.button.secondary,
button.secondary {
  color: #4d4d4d;
  background: var(--button-bg-secondary);
  box-shadow: 0 5px 6px var(--button-bg-secondary-box-shadow-color);
}

a.button.danger,
button.danger {
  color: white;
  background: var(--button-bg-danger);
  box-shadow: 0 5px 6px var(--button-bg-danger-box-shadow-color);
}

a.button.success,
button.success {
  color: white;
  background: var(--button-bg-success);
  box-shadow: 0 5px 6px var(--button-bg-success-box-shadow-color);
}

a.button:focus,
a.button:hover,
button:focus,
button:hover {
  box-shadow: 0 6px 15px var(--button-bg-box-shadow-color);
  transform: translateY(-2px) scale(1.02, 1.02);
}

a.button.primary:focus,
a.button.primary:hover,
button.primary:focus,
button.primary:hover {
  box-shadow: 0 6px 15px var(--button-bg-primary-box-shadow-color);
}

a.button.secondary:focus,
a.button.secondary:hover,
button.secondary:focus,
button.secondary:hover {
  box-shadow: 0 6px 15px var(--button-bg-secondary-box-shadow-color);
}

a.button.danger:focus,
a.button.danger:hover,
button.danger:focus,
button.danger:hover {
  box-shadow: 0 6px 15px var(--button-bg-danger-box-shadow-color);
}

a.button.success:focus,
a.button.success:hover,
button.success:focus,
button.success:hover {
  box-shadow: 0 6px 15px var(--button-bg-success-box-shadow-color);
}

a.button:disabled,
button:disabled { 
  cursor: default;
}
a.button:disabled:hover,
button:disabled:hover { 
  transform: none;
}

/* Disabled styling for login/register buttons only */
#auth-container button:disabled,
#auth-container button.login:disabled,
#auth-container button.signup:disabled {
  opacity: 0.5;
  background-color: var(--nav-button-disabled-bg-color) !important;
  box-shadow: 0 0px 5px var(--nav-button-disabled-shadow-color) !important;
}
#auth-container button:disabled:hover,
#auth-container button.login:disabled:hover,
#auth-container button.signup:disabled:hover {
  box-shadow: 0 0px 5px var(--nav-button-disabled-shadow-color) !important;
}

a.button svg.with-text,
a.button span svg,
button svg.with-text,
button span svg {
  width: 1.1em;
  height: auto;
  margin-right: 0.5rem;
  stroke: white;
  stroke-width: 2;
  vertical-align: middle;
}

a.button.secondary svg.with-text,
a.button.secondary span svg,
button.secondary svg.with-text,
button.secondary span svg {
  stroke: #4d4d4d;
}

a.button.action,
button.action {
  padding: 5px;
  width: 24px;
  height: 24px;
  box-shadow: 0 2px 1px var(--button-action-shadow-color);
}

a.button.action:disabled,
button.action:disabled {
  background: none;
  box-shadow: none;
}

a.button.action svg,
button.action svg {
  width: 100%;
  margin-right: 0;
}



a.button.action.delete,
button.action.delete {
  background: var(--action-delete-bg-color, hsl(0, 100%, 96%));
}

a.button.action.delete svg,
button.action.delete svg {
  stroke-width: 2;
  stroke: var(--action-delete-icon-color, hsl(0, 100%, 69%));
}

a.button.action.edit,
button.action.edit {
  background: var(--action-edit-bg-color, hsl(46, 100%, 94%));
}

a.button.action.edit svg,
button.action.edit svg {
  stroke-width: 2.5;
  stroke: var(--action-edit-icon-color, hsl(46, 90%, 50%));
}

a.button.action.qrcode,
button.action.qrcode {
  background: var(--action-qrcode-bg-color, hsl(0, 0%, 94%));
}

a.button.action.qrcode svg,
button.action.qrcode svg {
  fill: none;
  stroke: var(--action-qrcode-icon-color, hsl(0, 0%, 35%));
  stroke-width: 2;
}

a.button.action.stats,
button.action.stats {
  background: var(--action-stats-bg-color, hsl(260, 100%, 96%));
}

a.button.action.stats svg,
button.action.stats svg {
  stroke-width: 2.5;
  stroke: var(--action-stats-icon-color, hsl(260, 100%, 69%));
}

a.button.action.ban,
button.action.ban {
  background: var(--action-ban-bg-color, hsl(10, 100%, 96%));
}

a.button.action.ban svg,
button.action.ban svg {
  stroke-width: 2;
  stroke: var(--action-ban-icon-color, hsl(10, 100%, 40%));
}

a.button.action.success,
button.action.success {
  background: var(--action-success-bg-color, hsl(144, 100%, 96%));
}

a.button.action.success svg,
button.action.success svg {
  stroke-width: 2;
  stroke: var(--action-success-icon-color, hsl(144, 40%, 57%));
}

/* Action success buttons (unban) should keep tight shadows like other action buttons */
a.button.action.success:hover,
button.action.success:hover {
  box-shadow: 0 2px 1px var(--button-action-shadow-color);
}

a.button.action.password svg,
button.action.password svg,
a.button.action.expired svg,
button.action.expired svg,
a.button.action.banned svg,
button.action.banned svg {
  stroke-width: 2;
  stroke: #999;
}
/* Selected action button styling (same as banned) */
a.button.action.selected,
button.action.selected {
  background: none;
  box-shadow: none;
}

a.button.action.selected svg,
button.action.selected svg {
  stroke-width: 2;
  stroke: #999;
}

/* Action placeholder to maintain consistent cell width */
.action-placeholder {
  display: inline-block;
  width: 24px;
  height: 24px;
  padding: 5px;
  margin-right: 0.5rem;
}

/* QR code icons should use stroke, not fill, even when banned */
button.action.banned svg[viewBox="0 0 24 24"] {
  fill: none;
  stroke: #999;
}

button.nav {
  box-sizing: border-box;
  width: auto;
  height: 28px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 0px 10px var(--nav-button-shadow-color);
  background: none;
  background-color: var(--nav-button-bg-color);
  transition: all 0.2s ease-in-out;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-color);
  font-weight: 400;
}

button.nav:disabled {
  background-color: var(--nav-button-disabled-bg-color);
  box-shadow: 0 0px 5px var(--nav-button-disabled-shadow-color);
  opacity: 0.9;
  color: var(--secondary-text-color);
  cursor: default;
  font-weight: 700;
}

button.nav svg {
  width: 14px;
  height: auto;
}

button.nav svg { stroke-width: 2.5; }

button.nav:hover:not(:disabled) { 
  transform: translateY(-2px);
  box-shadow: 0 3px 15px var(--nav-button-shadow-color);
}
button.nav:disabled:hover { 
  transform: none; 
}

button.table {
  height: 32px;
  padding: 0 1rem;
  font-size: 12px;
  border-radius: 12px;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px var(--button-bg-box-shadow-color);
}

button.table:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--button-bg-box-shadow-color);
}

button.table.primary,
button.primary:focus,
button.primary:hover {
  box-shadow: 0 4px 12px var(--button-bg-primary-box-shadow-color);
}

button.table.secondary,
button.secondary:focus,
button.secondary:hover {
  box-shadow: 0 4px 12px var(--button-bg-secondary-box-shadow-color);
}

button.table.danger,
button.danger:focus,
button.danger:hover {
  box-shadow: 0 4px 12px var(--button-bg-danger-box-shadow-color);
}

button.table.success,
button.success:focus,
button.success:hover {
  box-shadow: 0 4px 12px var(--button-bg-success-box-shadow-color);
}

/* Disabled table button styles - consistent with nav buttons */
button.table:disabled {
  background-color: var(--nav-button-disabled-bg-color);
  box-shadow: 0 0px 5px var(--nav-button-disabled-shadow-color);
  opacity: 0.6;
  /* color: var(--secondary-text-color); */
  cursor: default;
  font-weight: 400;
}

button.table:disabled:hover {
  transform: none;
  box-shadow: 0 0px 5px var(--nav-button-disabled-shadow-color);
}

/* Bulk delete button specific styling */
.bulk-delete-btn,
.admin-bulk-delete-btn {
  height: 28px !important;
}

button.link {
  position: relative;
  width: auto;
  height: auto;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  padding: 0;
  font-size: 1rem;
  font-weight: 400;
  border-radius: 0;
  text-align: left;
  line-height: normal;
  word-break: normal;
  cursor: pointer;
  background: none;
  box-shadow: none;
}

button.link:hover {
  box-shadow: none;
  transform: none;
}

button.link span {
  height: 1rem;
}

button.link svg {
  stroke: var(--color-primary);
}

svg.spinner {
  animation: spin 1s linear infinite;
}

input,
textarea {
  filter: none;
  caret-color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
  box-sizing: border-box;
  width: 240px;
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text-color);
  background-color: var(--input-bg-color);
  border: none;
  border-radius: 12px;
  border-bottom: 5px solid var(--input-border-color);
  border-bottom-width: 5px;
  box-shadow: 0 10px 35px var(--input-shadow-color);
  transition: all 0.5s ease-out;
  /* Force background to stay consistent */
  background-image: none !important;
}


input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
  outline: none;
  box-shadow: 0 20px 35px var(--input-hover-shadow-color);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder {
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--secondary-text-color);
}

/* Fix for autocomplete/autofill background override */
input[type="text"]:-webkit-autofill,
input[type="email"]:-webkit-autofill,
input[type="password"]:-webkit-autofill,
input[type="text"]:-webkit-autofill:hover,
input[type="email"]:-webkit-autofill:hover,
input[type="password"]:-webkit-autofill:hover,
input[type="text"]:-webkit-autofill:focus,
input[type="email"]:-webkit-autofill:focus,
input[type="password"]:-webkit-autofill:focus,
input[type="text"]:-webkit-autofill:active,
input[type="email"]:-webkit-autofill:active,
input[type="password"]:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg-color) inset !important;
  -webkit-text-fill-color: var(--text-color) !important;
  background-color: var(--input-bg-color) !important;
/*  border-bottom-color: var(--input-border-color) !important; */
  transition: background-color 5000s ease-in-out 0s !important;
}

/* Additional fix for when autofill state changes during editing */
input[type="text"]:not(:-webkit-autofill),
input[type="email"]:not(:-webkit-autofill),
input[type="password"]:not(:-webkit-autofill) {
  background-color: var(--input-bg-color) !important;
  color: var(--text-color) !important;
}

.error input[type="text"],
.error input[type="email"],
.error input[type="password"],
.error input[type="number"],
.error textarea {
  border-bottom-color: #fa0a0acc;
  box-shadow: 0 10px 15px hsla(0, 100%, 75%, 0.2);
}

/* Password visibility toggle */
.password-wrapper {
  position: relative;
  display: block;
  width: 240px;
  max-width: 100%;
  box-sizing: border-box;
}

label > .password-wrapper {
  margin-top: 0.5rem;
}

label > .password-wrapper input[type="password"],
label > .password-wrapper input[type="text"] {
  margin-top: 0;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  padding-right: 48px;
  width: 100%;
  box-sizing: border-box;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 45%;
  transform: translateY(-50%);
  margin: 0 !important;
  width: auto;
  height: auto;
  min-height: unset;
  padding: 4px;
  border: none;
  border-radius: 4px;
  background: none !important;
  box-shadow: none !important;
  transition: none !important;
  color: var(--secondary-text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  overflow: visible;
}

.password-toggle:hover,
.password-toggle:focus,
.password-toggle:focus-visible,
.password-toggle:active {
  box-shadow: none !important;
  transform: translateY(-50%) !important;
  background: none !important;
  transition: none !important;
}

.password-toggle:hover {
  color: var(--password-toggle-hover-color);
}

.password-toggle:focus-visible {
  outline: 3px solid var(--focus-outline-color);
  outline-offset: 2px;
}

.password-toggle .eye-icon {
  display: block;
  transition: none !important;
}

.password-toggle .eye-closed {
  display: none;
}

.password-toggle.visible .eye-open {
  display: none;
}

.password-toggle.visible .eye-closed {
  display: block;
}

form#login-signup label > .password-wrapper {
  margin-top: 1rem;
  width: 100%;
}

form#login-signup label > .password-wrapper input[type="password"],
form#login-signup label > .password-wrapper input[type="text"] {
  margin-top: 0;
}

.dialog .content .password-wrapper {
  width: 320px;
  max-width: 100%;
}

#new-password-form label .password-wrapper {
  width: 280px;
  max-width: 100%;
}

#new-password form label > .password-wrapper {
  width: 100%;
  margin-top: 1rem;
}

#new-password form label > .password-wrapper input[type="password"],
#new-password form label > .password-wrapper input[type="text"] {
  margin-top: 0;
}

#protected form label .password-wrapper {
  width: 100%;
}

select {
  position: relative;
  width: 240px;
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
  box-sizing: border-box;
  letter-spacing: 0.05em;
  color: var(--text-color);
  background-color: var(--input-bg-color);
  box-shadow: 0 10px 35px var(--input-shadow-color);
  border: none;
  border-radius: 12px;
  border-bottom: 5px solid var(--input-border-color);
  border-bottom-width: 5px;
  transition: all 0.5s ease-out;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%235c666b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-position: right 1.2em top 50%, 0 0;
  background-size: 1em auto, 100%;
}

select:focus {
  outline: none;
  box-shadow: 0 20px 35px var(--input-hover-shadow-color)
}

.error select {
  border-bottom-color: #fa0a0acc;
  box-shadow: 0 10px 15px hsla(0, 100%, 75%, 0.2);
}

input[type="checkbox"] {
  position: relative;
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: var(--input-bg-color);
  border: 1px solid var(--checkbox-border-color);
  box-shadow: 0 2px 4px var(--toggle-shadow-color);
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

input[type="checkbox"]:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 6px var(--toggle-shadow-color);
}

input[type="checkbox"]:focus {
  outline: 3px solid var(--focus-outline-color);
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  display: block;
  border-radius: 2px;
  background-color: var(--checkbox-bg-color);
  box-shadow: 0 2px 4px #32323233;
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: all 0.1s ease-in-out;
}

input[type="checkbox"]:checked:after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Disabled checkbox styling */
input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type="checkbox"]:disabled::after {
  background-color: var(--secondary-text-color);
  opacity: 0.3;
}

input[type="checkbox"]:disabled:checked::after {
  background-color: var(--secondary-text-color);
  opacity: 0.5;
}

input.table-input,
select.table-input {
  width: auto;
  height: 32px;
  font-size: 13px;
  padding: 0 1.5rem;
  border-radius: 12px;
  border-bottom-width: 2px;
}

select.table-input {
  width: 150px;
}

input.table-input::placeholder {
  font-size: 13px;
}

select:has(option[value=""]:checked) {
  letter-spacing: 0.05em;
  color: #888;
}

label {
  display: flex;
  color: var(--input-label-color);
  font-size: 1rem;
  flex-direction: column;
  align-items: flex-start;
  font-weight: 700;
}

label input,
label textarea {
  margin-top: 0.5rem;
}

label.checkbox { 
  flex-direction: row;
  align-items: center;
  cursor: pointer;
  font-weight: 400;
}

label.checkbox input[type="checkbox"] {
  margin: 0 0.75rem 2px 0;
}

p.error,
p.success {
  display: flex;
  align-items: center;
  font-weight: 400;
  animation: fadein 0.3s ease-in-out;
}

p.error { color: red; margin: 0.5rem 0 0 0; }
p.success { color: #0ea30e; margin: 0.5rem 0 0 0; }

table {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--input-bg-color);
  border-radius: 12px;
  box-shadow: 0 6px 15px var(--table-shadow-color);
  text-align: center;
  overflow: auto;
}

table tr {
  flex: 1 1 auto;
}

table tr,
table th,
table td,
table thead,
table tfoot {
  display: flex;
  overflow: hidden;
}

table tbody,
table tr {
  overflow: visible;
}

table tbody,
table thead,
table tfoot {
  flex-direction: column;
}

table tr {
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--table-tr-border-color);
}

table th,
table td {
  flex-basis: 0;
  padding: 0.75rem;
}

table td {
  position: relative;
  white-space: nowrap;
  font-size: 15px;
  align-items: center;
}

table tbody {
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
  animation: fadein 0.3s ease-in-out;
}

table tbody + tfoot {
  border: none;
}

table thead {
  background-color: var(--table-bg-color);
  border-top-right-radius: 12px;
  border-top-left-radius: 12px;
  font-weight: 700;
}

table thead tr {
  border-bottom: 1px solid var(--table-head-tr-border-color);
}

table tfoot {
  background-color: var(--table-bg-color);
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
}

table tr.loading-placeholder {
  flex: 1 1 auto;
  justify-content: center;
  animation: fadein 0.3s ease-in-out;
}

table tr.loading-placeholder td {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 300;
}

table select {
  margin-right: 1rem;
}

table .tab { 
  display: flex; 
  align-items: center;
}

table .tab a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  height: 28px;
  margin: 0 0.5rem;
  font-size: 12px;
  color: var(--text-color);
  border: none;
  border-radius: 12px;
  background-color: var(--nav-button-bg-color);
  cursor: pointer;
  box-shadow: 0 0px 10px var(--nav-button-shadow-color);
  font-weight: 400;
  transition: all 0.2s ease-in-out;
}

table .tab a:first-child { margin-left: 0; }

table .tab a.active {
  background-color: var(--nav-button-disabled-bg-color);
  box-shadow: 0 0px 5px var(--nav-button-disabled-shadow-color);
  color: var(--secondary-text-color);
  font-weight: 700;
  opacity: 0.9;
  cursor: default;
}

table .tab a:not(.active):hover {
  transform: translateY(-2px);
}

.dialog {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: var(--dialog-bg-color);
  z-index: 1000;
  animation: fadein 0.2s ease-in-out;
}

.dialog.open { display: flex; }

.dialog .box {
  min-width: 450px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  background-color: var(--dialog-box-bg-color);
  border-radius: 8px;
  animation: fadein 0.2s ease-in-out;
}

.dialog.qrcode .box {
  min-width: auto;
  padding: 0;
}

.dialog .content-wrapper {
  display: flex;
  flex-direction: column;
}

.dialog .loading {
  display: none;
  width: 24px;
  height: 24px;
  margin: 3rem 0;
  animation: fadein 0.2s ease-in-out;
}

.dialog.htmx-request .loading {
  display: block;
}

.dialog.htmx-request .content-wrapper {
  display: none;
}

.dialog .loading svg {
  animation: spin 1s linear infinite;
}

.dialog .content {
  display: flex;
  flex-direction: column;
  animation: fadein 0.2s ease-in-out;
}

.dialog .content h2 {
  font-weight: 700 !important;
  margin-bottom: 0.5rem !important;
  margin-top: 0;
}

.dialog .content .buttons {
  display: flex;
  align-items: center;
  margin-top: 1.5rem;
}

.dialog .content .buttons button { margin-right: 2rem; }
.dialog .content .buttons button:last-of-type { margin-right: 0; }

.dialog .content {
  align-items: center;
}

.dialog .content #dialog-error {
  margin-top: 1rem;
  margin-bottom: -1rem;
}

.dialog .content .icon {
  width: 48px;
  height: 48px;
  border-radius: 100%;
  padding: 5px;
  margin-bottom: 1.5rem;
  border: 2px solid;
}

.dialog .content .icon svg {
  width: 100%;
  height: auto;
}

.dialog .content .icon.success {
  border-color: var(--success-icon-color);
}

.dialog .content .icon.success svg {
  stroke-width: 2;
  stroke: var(--success-icon-color);
}

.dialog .content .icon.error {
  border-color: var(--error-icon-color);
}

.dialog .content .icon.error svg {
  stroke-width: 1.5;
  stroke: var(--error-icon-color);
}

.dialog .content svg.spinner {
  display: none;
  width: 24px;
  margin: 0.5rem 0;
}
.dialog .content.htmx-request svg.spinner { display: block; }
.dialog .content.htmx-request button { display: none; }

.dialog .content label { margin: 0.5rem 0; }

.dialog .content p,
.dialog .content b,
.dialog .content strong {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.dialog .content p {
  max-width: 100%;
}

.dialog .content input[type="text"],
.dialog .content input[type="password"],
.dialog .content input[type="email"],
.dialog .content input[type="number"],
.dialog .content select {
  width: 320px;
  height: 48px;
}

.inputs { display: flex; align-items: flex-start; margin-bottom: 1rem; }
.inputs label { flex: 0 0 0; margin-right: 1rem; }
.inputs label:last-child { margin-right: 0; }

/* Override flex for inputs containing textarea */
.inputs:has(textarea) { display: block; }
.inputs:has(textarea) label { display: block; width: 100%; margin-right: 0; }


.search-input-wrapper {
  position: relative;
}

.search-input-wrapper button {
  position: absolute;
  display: none;
  right: 0;
  top: 50%;
  width: auto;
  height: auto;
  padding: 3px;
  margin: 0;
  background-color: transparent;
  background: none;
  box-shadow: none;
  transform: translateY(-50%);
  cursor: pointer;
  margin-right: 0.25rem;
  transition: all 0.2s ease-in-out;
}

.search-input-wrapper button:hover {
  transform: translateY(-55%);
}

.search-input-wrapper svg {
  width: 0.9rem;
  height: auto;
  stroke-width: 2;
  stroke: #888;
}

[data-tooltip] {
  position: relative;
  overflow: visible;
}

[data-tooltip]:before,
[data-tooltip]:after {
  position: absolute;
  left: 50%;
  display: none;
  font-size: 11px;
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, -0.5rem);
}

[data-tooltip]:before {
  content: "";
  border: 4px solid transparent;
  top: -4px;
  border-bottom-width: 0;
  border-top-color: #333;
  z-index: 1001;
}

[data-tooltip]:after {
  content: attr(data-tooltip);
  top: -25px;
  text-align: center;
  min-width: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 5px 7px;
  border-radius: 4px;
  box-shadow: 0 1em 2em -0.5em #00000059;
  background: #333;
  color: #fff;
  z-index: 1000;
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  display: block;
}

[data-tooltip]:before,
[data-tooltip]:after,
[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  animation: tooltip 300ms ease-out forwards;
}

/* DISTINCT */

.main-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-direction: column;
}

.section-container {
  max-width: 90%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 1rem 0 3rem 0;
}

/* Banned Page Icon */
.banned-icon {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 3rem 0 2rem 0;
}

.banned-icon svg {
  width: 4rem;
  height: 4rem;
  color: #e53e3e;
  stroke: #e53e3e;
  filter: drop-shadow(0 2px 4px #e53e3e33);
}

/* Expired Page Icon */
.expired-icon {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 3rem 0 2rem 0;
}

.expired-icon svg {
  width: 4rem;
  height: 4rem;
  color: var(--secondary-text-color);
  stroke: var(--secondary-text-color);
  filter: drop-shadow(0 2px 4px var(--secondary-text-color)33);
}

/* Python Powered Badge */
.python-powered {
  display: flex;
  width: 100%;
  margin-bottom: 2rem;
}

.python-powered a {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border-bottom: none !important;
}

.python-powered a:hover {
  transform: translateY(-2px);
  opacity: 0.8;
  border-bottom: none !important;
}

.python-powered img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 4px #0000001a);
  transition: filter 0.2s ease;
}

.python-powered a:hover img {
  filter: drop-shadow(0 4px 8px #00000033);
}

.htmx-spinner .spinner { display: none; }
.htmx-spinner.htmx-request button svg { display: none; }
.htmx-spinner.htmx-request .spinner { display: block; }

/* LOGIN & SIGNUP */

form#login-signup {
  max-width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  margin: 1rem 0 0;
}

form#login-signup label { margin-bottom: 2rem; }

form#login-signup input {
  width: 100%;
  height: 72px;
  margin-top: 1rem;
  font-size: 16px;
}

form#login-signup .buttons-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

form#login-signup .buttons-wrapper button {
  height: 56px;
  flex: 0 0 48%;
  padding: 0 1rem 2px;
  margin: 0;
}

form#login-signup .buttons-wrapper button.full { flex-basis: 100%; }

form#login-signup a.forgot-password {
  align-self: flex-start;
  font-size: 14px;
}

form#login-signup svg.spinner {  display: none; }
form#login-signup.htmx-request:not(.signup) .login svg { display: none; } 
form#login-signup.htmx-request:not(.signup) .login svg.spinner { display: block; } 
form#login-signup.htmx-request.signup .signup svg { display: none; } 
form#login-signup.htmx-request.signup .signup svg.spinner { display: block; } 
form#login-signup.htmx-request .error { opacity: 0; }

form#login-signup p.error {
  margin-bottom: 0;
}

/* Turnstile CAPTCHA styling */
.turnstile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 1rem 0;
}

.turnstile-wrapper .cf-turnstile {
  transform-origin: center;
}

.turnstile-wrapper p.error {
  margin: 0.5rem 0 0 0;
  text-align: center;
}

.auth-disclaimer {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--secondary-text-color);
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.auth-disclaimer a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: all 0.2s ease-out;
}

.auth-disclaimer a:hover {
  color: var(--send-icon-hover-color);
  border-bottom-color: var(--color-primary);
}

/* Turnstile theme control - CSS controlled like other elements */
:root .turnstile-theme-controlled,
[data-theme="light"] .turnstile-theme-controlled {
  filter: none;
}

[data-theme="dark"] .turnstile-theme-controlled {
  filter: invert(1) hue-rotate(180deg);
}


.admin-form-title {
  font-size: 26px;
  font-weight: 300;
  margin: 0 0 3rem;
  text-align: center;
}

.login-signup-message {
  flex: 1 1 auto;
  margin-top: 3rem;
}

.login-signup-message h1 {
  font-weight: 300;
  font-size: 24px;
}

/* HEADER */

header {
  box-sizing: border-box;
  margin: 0;
  width: 1232px;
  max-width: 100%;
  padding: 0 32px;
  height: 100px;
  justify-content: space-between;
  align-items: center;
  display: flex;
}

header .logo-wrapper {
  display: flex;
  align-items: center;
}

header a.logo {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 25px; /* Updated to 22px + 3px */
  font-weight: 700; /* Bold for Flux */
  text-decoration: none;
  border: none;
  margin: 0;
  padding: 0;
}

header a.logo:hover { border: none; color: inherit; }

header .logo img {
  margin: 0;
  padding: 0;
  width: 192px;
  height: 70px;
  object-fit: contain;
}

header ul.logo-links {
  list-style: none;
  display: flex;
  align-items: flex-end;
  margin: 0 0 0 0.5rem;
  padding: 0;
}

header ul.logo-links li {
  padding: 2px 0 0;
  margin: 0 0 0 32px;
}

header ul.logo-links li a {
  font-size: calc(1rem + 3px); /* 1rem + 3px */
}

header nav ul {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav ul li {
  margin: 0 0 0 1rem;
  padding: 0;
}

/* header nav ul li:last-child { margin-left: 0; } */

/* SHORTENER */

main {
  width: 800px;
  max-width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
}

main #shorturl {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 6rem 0 1rem;
}

main #shorturl h1 {
  margin: 0;
  border-bottom: 2px dotted transparent;
  font-weight: 300;
  font-size: 2rem;
}

main #shorturl h1.link {
  cursor: pointer;
  border-bottom-color: var(--underline-color);
  transition: opacity 0.3s ease-in-out;
  animation: fadein 0.2s ease-in-out;
}

main #shorturl h1.link:hover {
  opacity: 0.8;
}

.shorturl-result {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.homepage-description {
  text-align: center;
  margin: 1rem 0;
}


.mobile-break {
  display: none;
}

.clipboard {
  width: 35px;
  height: 35px;
  display: flex;
  margin-right: 1rem;
}

.clipboard button {
  width: 100%;
  height: 100%;
  display: flex;
  margin: 0;
  padding: 7px;
  box-shadow: none;
  outline: none;
  border: none;
  background: none;
  border-radius: 100%;
  background-color: var(--copy-icon-bg-color);
  transition: transform 0.4s ease-out;
  box-shadow: 0 2px 1px var(--copy-icon-shadow-color);
  cursor: pointer;
  animation: fadein 0.2s ease-in-out;
}

.clipboard.small { width: 24px; height: 24px; }
.clipboard.small button { width: 24px; height: 24px; padding: 5px; }

.clipboard button:hover,
.clipboard button:focus {
  transform: translateY(-2px) scale(1.02, 1.02);
}

.clipboard button:focus {
  outline: 3px solid var(--focus-outline-color);
}

.clipboard svg {
  stroke: var(--copy-icon-color);
  width: 100%;
  height: auto;
}

.clipboard svg.copy {
  stroke-width: 2.5;
}

.clipboard svg.check {
  display: none;
  padding: 3px;
  stroke-width: 3;
  animation: fadein 0.2s ease-in-out;
}

.clipboard.copied button {
  background-color: transparent;
  box-shadow: none;
}


.clipboard.copied button { display: none; }
.clipboard.copied svg.check { display: block; }

main form {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

main form input#target {
  position: relative;
  width: 100%;
  height: 72px;
  display: flex;
  padding: 0 84px 0 40px;
  font-size: 20px;
}

main form input#target::placeholder {
  font-size: 17px;
}

main form p.error {
  font-size: 13px;
  margin-left: 0.5rem;
}

main form .target-wrapper p.error {
  font-size: 15px;
  margin-left: 1rem;
  margin-bottom: 0;
}

main form .target-wrapper {
  position: relative;
  width: 100%;
  height: auto;
}

main form button.submit {
  box-sizing: content-box;
  position: absolute;
  cursor: pointer;
  width: 28px;
  height: auto;
  right: 0;
  top: 16px;
  padding: 4px;
  margin: 0 2rem 0;
  background: none;
  box-shadow: none;
  outline: none;
  border: none;
}

main form button.submit:focus,
main form button.submit:hover {
  outline: none;
}

main form button.submit svg.send {
  width: 100%;
  fill: #aaa;
  animation: fadein 0.3s ease-in-out;
  transition: fill 0.2s ease-in-out;
  vertical-align: top;
}

main form button.submit:hover svg.send {
  fill: var(--send-icon-hover-color);
}

main form button.submit svg.spinner {
  display: none;
  fill: none;
  stroke: var(--send-spinner-icon-color);
  stroke-width: 2;
  vertical-align: middle;
}

main form.htmx-request button.submit svg.send { display: none; }
main form.htmx-request button.submit svg.spinner { display: block; }

main form label#advanced {
  margin: 2rem 0 0 1rem;
  align-self: flex-start;
}

main form label#advanced input {
  width: 1.1rem;
  height: 1.1rem;
  margin-bottom: 2px;
}

#advanced-options {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}

#advanced-options.hidden { display: none; }

.advanced-input-wrapper {
  width: 100%;
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.advanced-input-wrapper label {
  flex: 1 1 0;
  padding-right: 1rem;
}

.advanced-input-wrapper label.expire-in { flex: 1 1 0; }
.advanced-input-wrapper label.description { flex: 1 1 0; }

.advanced-input-wrapper label:last-child { padding-right: 0; }

.advanced-input-wrapper label input,
.advanced-input-wrapper label select,
.advanced-input-wrapper label .url-input-wrapper {
  width: 100%;
  margin-top: 0.5rem;
}

.advanced-input-wrapper label .password-wrapper {
  width: 100%;
}

.advanced-input-wrapper label .password-wrapper input[type="password"],
.advanced-input-wrapper label .password-wrapper input[type="text"] {
  margin-top: 0;
}

/* MAIN TABLE */

#main-table-wrapper {
  width: 1200px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-items: flex-start;
  padding: 0 1rem;
  margin: 4rem 0;
}

#main-table-wrapper h2 {
  font-weight: 300;
  margin: 1rem 0;
}

#main-table-wrapper table thead,
#main-table-wrapper table tbody,
#main-table-wrapper table tfoot {
  min-width: 1000px;
}

#main-table-wrapper tr {
  padding: 0 0.5rem;
}

#main-table-wrapper th,
#main-table-wrapper td {
  padding: 1rem;
}

#main-table-wrapper td {
  font-size: 1rem;
}


#main-table-wrapper table .selection { flex: 0 0 auto; justify-content: center; align-items: center; }
#main-table-wrapper table .bulk-actions { flex: 3 3 0; justify-content: flex-end; align-items: center; }

#main-table-wrapper table .original-url { flex: 6.5 6.5 0; }
#main-table-wrapper table .created-at { flex: 3 3 0; }
#main-table-wrapper table .short-link { flex: 5 5 0; }
#main-table-wrapper table .views { flex: 2 2 0; justify-content: flex-end; }
#main-table-wrapper table .actions { flex: 4.5 4.5 0; justify-content: flex-end; overflow: visible; }
#main-table-wrapper table .actions a.button,
#main-table-wrapper table .actions button { margin-right: 0.5rem; }
#main-table-wrapper table .actions a.button:last-child,
#main-table-wrapper table .actions button:last-child { margin-right: 0; }

#main-table-wrapper table .users-id { flex: 1 1 0; justify-content: flex-end; }
#main-table-wrapper table .users-email { flex: 5 5 0; }
#main-table-wrapper table .users-created-at { flex: 3 3 0; }
#main-table-wrapper table .users-updated-at { flex: 3 3 0; }
#main-table-wrapper table .users-verified { flex: 3 3 0; overflow: visible; }
#main-table-wrapper table .users-role { flex: 2 2 0; overflow: visible; }
#main-table-wrapper table .users-links-count { flex: 2 2 0; justify-content: flex-end; overflow: visible; }
#main-table-wrapper table .users-actions { flex: 2.5 2.5 0; }

#main-table-wrapper table .domains-id { flex: 1 1 0; justify-content: flex-end; }
#main-table-wrapper table .domains-address { flex: 6.5 6.5 0; }
#main-table-wrapper table .domains-homepage { flex: 4 4 0; }
#main-table-wrapper table .domains-created-at { flex: 3 3 0; }
#main-table-wrapper table .domains-links-count { flex: 2 2 0; justify-content: flex-end; overflow: visible; }
#main-table-wrapper table .domains-actions { flex: 2 2 0; }

#main-table-wrapper table .hosts-id { flex: 1 1 0; justify-content: flex-end; }
#main-table-wrapper table .hosts-domain { flex: 8 8 0; }
#main-table-wrapper table .hosts-ip { flex: 5 5 0; }
#main-table-wrapper table .hosts-created-at { flex: 3 3 0; }
#main-table-wrapper table .hosts-actions { flex: 2 2 0; }

#main-table-wrapper table td.original-url,
#main-table-wrapper table td.created-at,
#main-table-wrapper.admin-table-wrapper table td.short-link,
#main-table-wrapper table td.users-email,
#main-table-wrapper table td.domains-address,
#main-table-wrapper table td.hosts-domain,
#main-table-wrapper table td.users-created-at, 
#main-table-wrapper table td.users-verified { 
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

table .short-link-wrapper { display: flex; align-items: center; }

#main-table-wrapper table td .description {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 14px;
  color: #888;
}
#main-table-wrapper table td .description a {
  color: #aaa;
  border-bottom-color: #aaa;
}
#main-table-wrapper table td .description svg {
  stroke: #aaa;
  stroke-width: 2;
  width: 0.85em;
  margin-right: 0.25rem;
}
#main-table-wrapper table td .description span { color: #aaa; }
#main-table-wrapper table td .description a:hover { border-bottom-color: transparent; }

#main-table-wrapper table .status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  margin-top: 0.25rem;
}

#main-table-wrapper table .status:first-child {
  margin-top: 0;
}

#main-table-wrapper table .status.gray { background-color: var(--table-status-gray-bg-color); }
#main-table-wrapper table .status.green { 
  background-color: hsl(102.4, 100%, 93.3%); 
  color: hsl(120, 60%, 20%);
}
#main-table-wrapper table .status.red { 
  background-color: hsl(0, 100%, 96.7%); 
  color: hsl(0, 60%, 25%);
}
#main-table-wrapper table .status.blue { 
  background-color: hsl(210, 100%, 95%); 
  color: hsl(210, 60%, 25%);
}
#main-table-wrapper table .status.orange { 
  background-color: hsl(30, 100%, 93%); 
  color: hsl(25, 70%, 28%);
}

#main-table-wrapper table tr.no-data {
  flex: 1 1 auto; 
  justify-content: center;
  animation: fadein 0.3s ease-in-out;
}

#main-table-wrapper table.htmx-request tbody tr { opacity: 0.5; }
#main-table-wrapper table tr.loading-placeholder { opacity: 0.6 !important; }

#main-table-wrapper table tr.loading-placeholder td,
#main-table-wrapper table tr.no-data td {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 300;
}

#main-table-wrapper table tr.loading-placeholder svg.spinner {
  width: 1rem;
  height: auto;
  margin-right: 0.5rem;
  stroke-width: 1.5;
  vertical-align: middle;
}

#main-table-wrapper table thead tr.controls { justify-content: space-between; }
#main-table-wrapper table thead tr.controls.with-filters { align-items: flex-end; }
#main-table-wrapper table tfoot tr.controls { justify-content: flex-end; }

#main-table-wrapper table th.search {
  flex: 1 1 auto;
  align-items: center;
}

#main-table-wrapper table th.filters {
  flex: 1 1 auto;
  flex-direction: column;
  align-items: start;
}

#main-table-wrapper table th.filters > div {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

#main-table-wrapper table th.filters > div:last-child { margin-bottom: 0; }

#main-table-wrapper table th.nav {
  flex: 0 0 auto;
  align-items: center;
}

#main-table-wrapper table tr.controls .checkbox {
  margin-left: 1rem;
  font-size: 15px;
}

#main-table-wrapper table .limit,
#main-table-wrapper table .pagination {
  display: flex;
  align-items: center;
}

#main-table-wrapper table button.nav { margin-right: 0.75rem; }
#main-table-wrapper table button.nav:last-child { margin-right: 0; }

#main-table-wrapper table .nav-divider {
  height: 20px;
  width: 1px;
  opacity: 0.4;
  background-color: #888;
  margin: 0 1.5rem;
}

#main-table-wrapper table tbody tr:hover:not(.edit) {
  background-color: var(--table-tr-hover-bg-color);
}

#main-table-wrapper table tbody td.right-fade:after,
#domains-table tbody td.right-fade:after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 16px;
  background: linear-gradient(to left, var(--input-bg-color), transparent);
}

#main-table-wrapper table tbody tr:hover:not(.edit) td.right-fade:after,
#domains-table tbody tr:hover:not(.edit) td.right-fade:after {
  background: linear-gradient(to left, var(--table-tr-hover-bg-color), transparent);
}

/* Left fade effect for right-aligned columns */
#main-table-wrapper table tbody td.left-fade:after,
#domains-table tbody td.left-fade:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 16px;
  background: linear-gradient(to right, var(--input-bg-color), transparent);
}

#main-table-wrapper table tbody tr:hover:not(.edit) td.left-fade:after,
#domains-table tbody tr:hover:not(.edit) td.left-fade:after {
  background: linear-gradient(to right, var(--table-tr-hover-bg-color), transparent);
}

#main-table-wrapper table .clipboard { margin-right: 0.5rem; }
#main-table-wrapper table .clipboard svg.check { width: 24px; }

#main-table-wrapper table tr.edit {
  background-color: var(--table-edit-bg-color, #fafafa);
}

#main-table-wrapper table tr.edit td { 
  width: 100%;
  padding: 2rem 1.5rem;
  flex-basis: auto;
}
#main-table-wrapper table tr.edit td form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#main-table-wrapper table tr.edit td form > div {
  width: 100%;
  display: flex;
  align-items: start;
}

#main-table-wrapper table tr.edit label { margin: 0 0.5rem 1rem; }
#main-table-wrapper table tr.edit label:first-child { margin-left: 0; }
#main-table-wrapper table tr.edit label:last-child { margin-right: 0; }

#main-table-wrapper table tr.edit input {
  height: 44px;
  font-size: 15px;
}

#main-table-wrapper table tr.edit input,
#main-table-wrapper table tr.edit input + p,
#main-table-wrapper table tr.edit .password-wrapper,
#main-table-wrapper table tr.edit .password-wrapper + p {
  width: 240px;
  max-width: 100%;
  font-size: 14px;
  text-wrap: wrap;
  text-align: left;
}

#main-table-wrapper table tr.edit input[name="target"],
#main-table-wrapper table tr.edit input[name="description"],
#main-table-wrapper table tr.edit input[name="target"] + p,
#main-table-wrapper table tr.edit input[name="description"] + p {
  width: 420px;
}

#main-table-wrapper table tr.edit button {
  height: 38px;
  margin-right: 1rem;
}

#main-table-wrapper table tr.edit button:last-child { margin-right: 0; }

#main-table-wrapper table tr.edit form {
  animation: fadein 0.3s ease-in-out;
}

#main-table-wrapper table tr.edit form.no-animation { animation: none; }

#main-table-wrapper table tr.edit { display: none; }
#main-table-wrapper table tr.edit.show { display: flex; }
#main-table-wrapper table tr.edit td.loading { display: none; }
#main-table-wrapper table tr.edit.htmx-request td.loading { display: block; }
#main-table-wrapper table tr.edit td.loading svg { width: 16px; height: 16px; }

#main-table-wrapper table tr.edit form.htmx-request button .reload { display: none; }
#main-table-wrapper table tr.edit form button .loader { display: none; }
#main-table-wrapper table tr.edit form.htmx-request button .loader { display: inline-block; }

#main-table-wrapper table tr.edit form .response p { margin: 2rem 0 0; }

#main-table-wrapper table tr.edit p.no-data {
  width: 100%;
  text-align: center;
}

.dialog .ban-checklist {
  display: flex;
  align-items: center;
}

.dialog .ban-checklist label { margin: 1rem 1.5rem 1rem 0; }
.dialog .ban-checklist label:last-child { margin-right: 0; }
.dialog .ban-checklist label.disabled { 
  opacity: 0.5; 
  cursor: not-allowed; 
}
.dialog .ban-checklist label.disabled input[type="checkbox"] { 
  cursor: not-allowed; 
}

#main-table-wrapper tr.category { justify-content: space-between; align-items: center; }
#main-table-wrapper th.category-total { flex: 1 1 auto; }
#main-table-wrapper th.category-total p { margin: 0; font-size: 15px; font-weight: 400; }
#main-table-wrapper th.category-tab { flex: 2 2 auto; justify-content: flex-end; }

/* ADMIN */

table .search-input-wrapper {
  margin-right: 1rem;
}

input.search.admin {
  max-width: 200px;
}

.content.admin-create form {
  display: flex;
  flex-direction: column;
}

.content.admin-create .checkbox-wrapper {
  display: flex;
  align-items: center;
}

.content.admin-create .checkbox-wrapper label { margin-right: 1rem; }

.content.admin-create .buttons { justify-content: center; }
.content.admin-create .buttons button { flex: 1 1 auto; }

.content.admin-edit form {
  display: flex;
  flex-direction: column;
}

.content.admin-edit .buttons { justify-content: center; }
.content.admin-edit .buttons button { flex: 1 1 auto; }

.content.admin-edit .quota-fields,
.content.admin-create .quota-fields {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 320px;
}
.content.admin-edit .quota-fields input[type="number"],
.content.admin-create .quota-fields input[type="number"] {
  flex: 1;
  width: auto;
  min-width: 0;
  height: 48px;
}
.content.admin-edit .quota-separator,
.content.admin-create .quota-separator {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary-text-color);
  flex-shrink: 0;
  line-height: 48px;
}



/* FOOTER */

footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  font-size: 13px;
  text-align: center;
}

footer p {
  margin: 0;
}

footer .footer-nav {
  margin-bottom: 1rem;
  font-size: clamp(0.8rem, 2.5vw, 13px);
  white-space: nowrap;
}

footer .footer-trademark {
  margin-bottom: 0.5rem;
}

footer .footer-copyright {
  margin-bottom: 0;
}

/* Make separators non-selectable throughout the site */
.separator {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Scale separators with footer nav font size */
footer .footer-nav .separator {
  font-size: inherit;
}

footer button.link {
  font-family: 'SourceSansPro', 'Nunito', Arial, sans-serif;
  display: inline-block;
  font-size: 13px;
}

footer button.link .spinner {
  display: none;
  width: 1em;
  margin: 0 0.25rem 0 0;
  vertical-align: middle;
}

footer button.link.htmx-request .spinner { 
  display: inline-block;
  vertical-align: middle;
}

/* Status indicator */
.status-link {
  display: inline-flex;
  padding: 0;
  align-items: baseline;
  gap: 0.25rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e; /* Green color for operational status */
  display: inline-block;
  position: relative;
}

/* Optional: Add a subtle pulse animation for "live" feeling */
.status-indicator::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #22c55e;
  opacity: 0.3;
  animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.1;
  }
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

/* SETTINGS */

#settings {
  width: 600px;
  max-width: 100%;
  padding: 0 16px;
  overflow: hidden;
}

h1.settings-welcome {
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

p.settings-user {
  font-size: 16px;
  color: var(--secondary-text-color);
  margin: 0 0 1rem 0;
}

p.settings-user span {
  font-weight: 600;
  color: var(--color-primary);
}



/* SETTINGS - DOMAIN */

#domains-table { margin-top: 1rem; }
#domains-table .domain { flex: 3 3 0; }
#domains-table .homepage { flex: 3 3 0; }
#domains-table .actions { flex: 1 1 0; justify-content: flex-end; padding-right: 1rem; }
#domains-table .actions button { margin-right: 0.5rem; }
#domains-table .actions button:last-child { margin-right: 0; }
#domains-table .actions .action-placeholder { margin-right: 0.5rem; }
#domains-table .no-entry { flex: 1 1 0; opacity: 0.8; }

.add-domain-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 1.5rem 0 2rem;
}

.add-domain-wrapper > .spinner { 
  width: 20px; 
  display: none; 
  margin: 1rem 0 0 1rem; 
}
.add-domain-wrapper.htmx-request > button { display: none; }
.add-domain-wrapper.htmx-request > .spinner { display: block; }

form#add-domain { margin-top: 1rem; }
form#add-domain .buttons-wrapper { display: flex; }
form#add-domain button { margin-right: 1rem; }
form#add-domain .spinner { width: 20px; display: none; }
form#add-domain.htmx-request .buttons-wrapper { display: none; }
form#add-domain.htmx-request .spinner { display: block; }
form#add-domain .error { font-size: 0.85rem; }

/* SETTINGS - API */

#apikey-wrapper { margin-bottom: 1.5rem; }

#apikey {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

#apikey p {
  font-weight: 700;
  border-bottom: 1px dotted #999;
  transition: opacity 0.2s ease-in-out;
  cursor: pointer;
  line-break: anywhere;
}

#apikey p:hover {
  opacity: 0.8;
}

form#generate-apikey .spinner { display: none; }
form#generate-apikey.htmx-request svg { display: none; }
form#generate-apikey.htmx-request .spinner { display: block; }

/* SETTINGS - CHANGE PASSWORD */

#change-password-wrapper { margin-bottom: 1.5rem; }

form#change-password { margin-top: 1.5rem; }
form#change-password button { margin-top: 1rem; }
form#change-password .spinner { display: none; }
form#change-password.htmx-request svg { display: none; }
form#change-password.htmx-request .spinner { display: block; }

/* SETTINGS - CHANGE EMAIL */

#change-email-wrapper { margin-bottom: 1.5rem; }

form#change-email { margin-top: 1.5rem; }
form#change-email button { margin-top: 1rem; }
form#change-email .spinner { display: none; }
form#change-email.htmx-request svg { display: none; }
form#change-email.htmx-request .spinner { display: block; }


/* SETTINGS - DELETE ACCOUNT */

#delete-account-wrapper { margin-bottom: 1.5rem; }

form#delete-account { margin-top: 1.5rem; }
form#delete-account button { margin-top: 1rem; }
form#delete-account .spinner { display: none; }
form#delete-account.htmx-request svg { display: none; }
form#delete-account.htmx-request .spinner { display: block; }

/* SETTINGS - RESERVED URLS (ADMIN ONLY) */

#reserved-urls-wrapper { margin-bottom: 1.5rem; }

.reserved-urls-info {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background-color: var(--input-bg-color);
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
}

.reserved-urls-info span {
  font-weight: 600;
  color: var(--color-primary);
}

.reserved-urls-info small {
  display: block;
  margin-top: 0.25rem;
  color: var(--secondary-text-color);
  font-size: 0.85em;
}

form#reserved-urls { margin-top: 1.5rem; }
form#reserved-urls label { display: block; width: 100%; }
form#reserved-urls button { margin-top: 1rem; }
form#reserved-urls .spinner { display: none; }
form#reserved-urls.htmx-request svg { display: none; }
form#reserved-urls.htmx-request .spinner { display: block; }

#reserved-urls-textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-color);
  background-color: var(--input-bg-color);
  border: none;
  border-radius: 12px;
  border-bottom: 5px solid var(--input-border-color);
  box-shadow: 0 10px 35px var(--input-shadow-color);
  transition: all 0.5s ease-out;
  resize: none;
  box-sizing: border-box;
}

#reserved-urls-textarea:focus {
  outline: none;
  box-shadow: 0 20px 35px var(--input-hover-shadow-color);
}

.error #reserved-urls-textarea {
  border-bottom-color: #fa0a0acc;
  box-shadow: 0 10px 15px hsla(0, 100%, 75%, 0.2);
}

#reserved-urls-textarea::placeholder {
  color: var(--secondary-text-color);
  opacity: 0.7;
}

/* SETTINGS - INTERSTITIAL URLS (ADMIN ONLY) */

#interstitial-urls-wrapper { margin-bottom: 1.5rem; }

form#interstitial-urls { margin-top: 1.5rem; }
form#interstitial-urls label { display: block; width: 100%; }
form#interstitial-urls button { margin-top: 1rem; }
form#interstitial-urls .spinner { display: none; }
form#interstitial-urls.htmx-request svg { display: none; }
form#interstitial-urls.htmx-request .spinner { display: block; }

#interstitial-urls-textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-color);
  background-color: var(--input-bg-color);
  border: none;
  border-radius: 12px;
  border-bottom: 5px solid var(--input-border-color);
  box-shadow: 0 10px 35px var(--input-shadow-color);
  transition: all 0.5s ease-out;
  resize: none;
  box-sizing: border-box;
}

#interstitial-urls-textarea:focus {
  outline: none;
  box-shadow: 0 20px 35px var(--input-hover-shadow-color);
}

.error #interstitial-urls-textarea {
  border-bottom-color: #fa0a0acc;
  box-shadow: 0 10px 15px hsla(0, 100%, 75%, 0.2);
}

#interstitial-urls-textarea::placeholder {
  color: var(--secondary-text-color);
  opacity: 0.7;
}

/* SPONSORS */

.sponsors-centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sponsors-centered h4,
.sponsors-centered p,
.sponsors-centered div,
.sponsors-centered a {
  text-align: center;
}

.sponsors-centered .sponsor-grid {
  text-align: center;
}

.sponsors-centered .sponsor-grid__sponsor-name,
.sponsors-centered .sponsor-grid__sponsor-activity,
.sponsors-centered .sponsor-grid__sponsor-activity p {
  text-align: center;
}

/* STATS */

#stats-section {
  width: 1200px;
  max-width: 100%;
  padding: 0 16px;
}

.loading-stats { 
  width: 100%;
  flex: 1 1 0;
  margin-top: -5rem;
  display: flex; 
  align-items: center; 
  justify-content: center;
}
.loading-stats .spinner {
  width: 1.25rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.stats-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

.stats-info > h2 { 
  font-weight: 300; 
  font-size: 27px; 
  margin: 0 0 1rem 0;
}

.stats-columns {
  display: flex;
  gap: 2rem;
  width: 100%;
}

.stats-column {
  flex: 1;
  min-width: 0;
}

.stats-column p {
  margin: 0 0 0.5rem 0;
}

.stats-content {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.stats-content.right-fade:after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 16px;
  background: linear-gradient(to left, var(--bg-color), transparent);
}

.stats-content a,
.stats-content p {
  font-size: 16px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  display: block;
}

.stats-content a {
  display: inline-block;
}

.stats-content a {
  color: var(--color-primary);
  text-decoration: none;
}

#stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background-color: var(--input-bg-color);
  border-radius: 12px;
  box-shadow: 0 6px 15px var(--table-shadow-color);
  overflow: hidden;
  padding: 0;
}

.stats-head {
  width: 100%;
  display: flex;
  align-items: center;
  background-color: var(--table-bg-color);
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.total-number { font-weight: 700; }

.stats-nav { display: flex; align-items: center; }

.stats-nav button { margin-right: 0.75rem; }
.stats-nav button:last-child { margin-right: 0; }

.stats-period {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.75rem 1.5rem;
}

.stats-period h2 {
  font-size: 24px;
  font-weight: 300;
  margin: 1rem 0 0;
}

.stats-period span.total-in-period {
  font-weight: 700;
  border-bottom: 1px dotted var(--underline-color);
}

p.last-update {
  font-size: 14px;
  color: var(--secondary-text-color);
  margin: 0.75rem 0 0;
}

#stats canvas {
  width: 100%;
  margin: 2rem 0;
}

.stats-columns-wrapper {
  display: flex;
}

.stats-columns-wrapper > div {
  flex: 1 1 50%;
}

svg.map { width: 100%; }

svg.map path {
  fill: hsl(200, 15%, 92%);
  stroke: #fff;
  transition: all 0.1s ease-in-out;
}

svg.map path.color-1 { fill: hsl(261, 46%, 90%); }
svg.map path.color-2 { fill: hsl(261, 46%, 86%); }
svg.map path.color-3 { fill: hsl(261, 46%, 82%); }
svg.map path.color-4 { fill: hsl(261, 46%, 76%); }
svg.map path.color-5 { fill: hsl(261, 46%, 72%); }
svg.map path.color-6 { fill: hsl(261, 46%, 68%); }
svg.map path.active { stroke: hsl(261, 46%, 50%); stroke-width: 1.5; }

#map-tooltip {
  position: fixed;
}

#map-tooltip.visible::before,
#map-tooltip.visible::after {
  display: block !important;
}

#map-tooltip:before {
  border-top-color: var(--input-bg-color);
}

#map-tooltip:after {
  box-shadow: 0 1em 2em -0.5em var(--toggle-shadow-color);
  background: var(--input-bg-color);
  color: var(--text-color);
}



.stats-error {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stats-error p { margin-top: -3rem; display: flex; align-items: center; }
.stats-error p svg { width: 1.2rem; margin: 0 0.5rem 0.1rem 0; }


/* 404 - NOT FOUND */

#notfound {
  width: 800px;
  align-items: center;
}

#notfound h2 { 
  font-size: 28px;
  font-weight: 300;
  text-align: center;
}

/* BANNED */

#banned { width: 1200px; align-items: center; text-align: center }
#banned h2 { font-weight: 400; }
#banned h4 { font-weight: 400; margin: 0; }

/* EXPIRED */

#expired { width: 1200px; align-items: center; text-align: center }
#expired h2 { font-weight: 400; }
#expired h4 { font-weight: 400; margin: 0; }

/* REPORT */

/* Report Page Styling - Consistent with About/Features/Terms */
#report { 
  width: 600px; 
}

/* Main heading */
#report h3 {
  font-size: 2rem;
  color: var(--text-color);
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

/* Section headings */
#report h4 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 2rem 0 1.25rem 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: 2rem;
}

#report h4:first-of-type {
  margin-top: 2rem;
}

/* Paragraph styling */
#report p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  margin: 0 0 1.25rem 0;
  /* max-width: 65ch; */
}

#report p.error {
  color: red !important;
  margin: 0.5rem 0 0 0;
  font-size: 1rem;
}

#report p strong {
  font-weight: 600;
  color: var(--text-color);
}

/* Global Card System for All Content Pages */
.content-card {
  padding: 1.5rem;
  background: var(--table-bg-color);
  border-radius: 12px;
  border: 1px solid var(--table-tr-border-color);
  transition: all 0.2s ease;
}

.content-card:hover {
  background: var(--table-tr-hover-bg-color);
  box-shadow: 0 2px 8px #0000000d;
}

.content-card-compact {
  padding: 1rem;
  background: var(--table-bg-color);
  border-radius: 8px;
  border: 1px solid var(--table-tr-border-color);
  transition: all 0.2s ease;
}

.content-card-highlight {
  padding: 1.75rem;
  margin: 0 0 1.25rem 0;
  background: linear-gradient(135deg, var(--table-bg-color), var(--table-tr-hover-bg-color));
  border-radius: 12px;
  border-left: 3px solid var(--color-primary);
  transition: all 0.2s ease;
}

/* Card Grid Systems */
.content-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.content-grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Python Terminal Effect - Global Classes */
.python-terminal {
  font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif !important;
  font-weight: normal !important;
  font-size: 0.9rem !important; /* Smaller font size */
  letter-spacing: 0.5px;
  color: var(--success-icon-color) !important; /* Use theme-aware green */
  width: 300px;
  margin: 0 auto;
}

.py-prompt {
  color: var(--color-primary); /* Use theme-aware blue */
  font-weight: bold;
  margin-right: 0.5rem;
}

.py-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: var(--text-color);
  animation: blink 1s infinite;
  vertical-align: baseline;
}

.py-line {
  margin: 0.2rem 0;
  line-height: 1.4;
}

.py-dots {
  color: var(--text-color);
  display: inline-block;
  width: 3ch; /* Fixed width for exactly 3 dots */
  text-align: left;
}

/* Python Syntax Highlighting - Official Python.org Terminal Colors */
.py-module {
  color: #0969DA; /* Python.org blue for modules */
  font-weight: 500;
}

.py-function {
  color: #8250DF; /* Python.org purple for functions */
  font-weight: 500;
}

.py-string {
  color: #0A3069; /* Python.org dark blue for strings */
  font-style: italic; /* Italic for strings */
}

.py-bracket {
  color: #24292F; /* Python.org dark gray for brackets */
  font-weight: bold;
}

.py-operator {
  color: #24292F; /* Python.org dark gray for operators */
  font-weight: bold;
}

.py-comment {
  color: #6E7781; /* Python.org gray for comments */
  font-style: italic; /* Italic for comments */
}

.py-success {
  color: #1A7F37; /* Python.org green for success messages */
  font-style: italic; /* Italic for emphasis */
}

.py-warning {
  color: #D1242F; /* Python.org red for warnings/termination */
  font-style: italic; /* Italic for emphasis */
}

/* Dark theme adjustments - Python.org dark theme colors */
[data-theme="dark"] .py-module {
  color: #79C0FF; /* Python.org dark theme blue */
}

[data-theme="dark"] .py-function {
  color: #D2A8FF; /* Python.org dark theme purple */
}

[data-theme="dark"] .py-string {
  color: #A5D6FF; /* Python.org dark theme light blue */
}

[data-theme="dark"] .py-bracket {
  color: #F0F6FC; /* Python.org dark theme light gray */
}

[data-theme="dark"] .py-operator {
  color: #F0F6FC; /* Python.org dark theme light gray */
}

[data-theme="dark"] .py-comment {
  color: #8B949E; /* Python.org dark theme gray */
}

/* Fullscreen Python Code Overlay */
.terminal-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-color);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 35vh;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Professional Python Code Display */
.terminal-fullscreen-overlay .python-terminal {
  width: auto !important;
  max-width: 600px;
  margin: 0 !important;
  font-size: 1.2rem !important;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace !important;
  line-height: 1.6 !important;
  text-align: left;
}

/* Python.org Official Colors for Professional Look */
.terminal-fullscreen-overlay .py-prompt {
  color: var(--color-primary) !important;
  font-weight: 600;
}

.terminal-fullscreen-overlay .py-module {
  color: #0969DA !important; /* Python.org blue */
  font-weight: 500;
}

.terminal-fullscreen-overlay .py-function {
  color: #8250DF !important; /* Python.org purple */
  font-weight: 500;
}

.terminal-fullscreen-overlay .py-string {
  color: #0A3069 !important; /* Python.org dark blue */
  font-style: italic;
}

.terminal-fullscreen-overlay .py-bracket,
.terminal-fullscreen-overlay .py-operator {
  color: var(--text-color) !important;
  font-weight: 600;
}

.terminal-fullscreen-overlay .py-comment {
  color: #6E7781 !important; /* Python.org gray */
  font-style: italic;
}

.terminal-fullscreen-overlay .py-success {
  color: #1A7F37 !important; /* Python.org green */
  font-weight: 500;
}

.terminal-fullscreen-overlay .py-warning {
  color: #D1242F !important; /* Python.org red */
  font-weight: 500;
}

.terminal-fullscreen-overlay .py-cursor {
  background-color: var(--color-primary) !important;
  animation: blink 1s infinite;
}

/* Dark theme adjustments - Python.org dark theme colors */
[data-theme="dark"] .terminal-fullscreen-overlay .py-module {
  color: #79C0FF !important;
}

[data-theme="dark"] .terminal-fullscreen-overlay .py-function {
  color: #D2A8FF !important;
}

[data-theme="dark"] .terminal-fullscreen-overlay .py-string {
  color: #A5D6FF !important;
}

[data-theme="dark"] .terminal-fullscreen-overlay .py-comment {
  color: #8B949E !important;
}

[data-theme="dark"] .terminal-fullscreen-overlay .py-success {
  color: #7EE787 !important;
}

[data-theme="dark"] .terminal-fullscreen-overlay .py-warning {
  color: #F85149 !important;
}

/* Fix dots positioning in fullscreen */
.terminal-fullscreen-overlay .py-dots {
  width: 3ch !important; /* Fixed width for exactly 3 dots */
  text-align: left !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .terminal-fullscreen-overlay .python-terminal {
    font-size: 1rem !important;
    max-width: 90%;
  }
}

[data-theme="dark"] .py-success {
  color: #7EE787; /* Python.org dark theme green */
}

[data-theme="dark"] .py-warning {
  color: #F85149; /* Python.org dark theme red */
}

/* Blinking cursor animation */
@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* CSS Terminal Animation - Line by line reveal */
@keyframes reveal-line {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Loading dots animation */
@keyframes loading-dots {
  0%, 33% {
    content: ".";
  }
  34%, 66% {
    content: "..";
  }
  67%, 100% {
    content: "...";
  }
}

/* Terminal line animations with delays */
.py-line-1 {
  animation: reveal-line 0.1s ease-in-out 0.1s both;
}

.py-line-2 {
  animation: reveal-line 0.1s ease-in-out 0.8s both;
}

.py-line-3 {
  animation: reveal-line 0.1s ease-in-out 1.5s both;
}

.py-line-4 {
  animation: reveal-line 0.1s ease-in-out 1.7s both;
}

/* Loading dots with continuous animation */
.py-dots::after {
  content: ".";
  animation: loading-dots 1.5s infinite 1.5s;
}

/* Initially hide all lines */
.py-line {
  opacity: 0;
}


/* Responsive Grid Adjustments */
@media (max-width: 768px) {
  .content-grid-2,
  .content-grid-auto {
    grid-template-columns: 1fr;
  }
  
  .content-card {
    padding: 1.25rem;
  }
  
  .content-card-highlight {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .content-card,
  .content-card-compact {
    padding: 1rem;
  }
  
  .content-card-highlight {
    padding: 1.25rem;
  }
}

/* Links styling for all content pages */
#terms a:not(.button),
#about a:not(.button),
#sponsors a:not(.button),
#report a:not(.button) {
  color: var(--color-primary);
  border-bottom: 1px dotted transparent;
  text-decoration: none;
  transition: all 0.2s ease-out;
}

#terms a:not(.button):hover,
#about a:not(.button):hover,
#sponsors a:not(.button):hover,
#report a:not(.button):hover {
  border-bottom-color: var(--color-primary);
}

/* Special styling for terms summary links - only underline the strong text */
#terms .terms-summary a {
  border-bottom: none !important;
}

#terms .terms-summary a strong {
  border-bottom: 1px dotted transparent;
  transition: all 0.2s ease-out;
}

#terms .terms-summary a:hover strong {
  border-bottom-color: var(--color-primary);
}

/* Form styling */
#report form {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
}

#report form .inputs-wrapper { 
  display: flex;
  align-items: flex-end;
}

#report form label {
  font-weight: 500;
  color: var(--text-color);
}

#report form input {
  margin-top: 0.5rem;
}

#report form button { 
  margin: 0 0 0.2rem 1rem; 
}

#report form .spinner { display: none; }
#report form.htmx-request svg { display: none; }
#report form.htmx-request .spinner { display: block; }

/* URL input wrapper for report form */
.url-input-wrapper {
  display: flex;
  align-items: stretch;
  margin-top: 0.5rem;
}

.url-prefix {
  background: var(--table-bg-color);
  border: none;
  border-radius: 12px 0 0 12px;
  border-bottom: 5px solid var(--input-border-color);
  padding: 0 12px;
  height: 44px;
  display: flex;
  align-items: center;
  font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif;
  font-size: 15px;
  color: var(--secondary-text-color);
  box-shadow: 0 10px 35px var(--input-shadow-color);
  white-space: nowrap;
  flex-shrink: 0;
}

/* URL input border radius classes */
.url-input-wrapper .left {
  border-radius: 12px 0 0 12px;
  margin-top: 0;
  width: 78px;
  padding: 0 0 0 24px;
  flex-shrink: 0;
  text-align: right;
}

.url-input-wrapper .right {
  border-radius: 0 12px 12px 0;
  margin-top: 0;
  flex: 1;
  width: 160px;
  padding: 0 24px 0 0;
  height: 44px;
}

#main-table-wrapper .url-input-wrapper {
  width: 100%;
}

#main-table-wrapper .url-input-wrapper .left {
  width: 75px;
  padding: 0;
  text-align: right;
}

#main-table-wrapper .url-input-wrapper .right {
  flex: 1;
  padding: 0 1.5rem 0 0;
  width: 345px;
}

#main-table-wrapper table tr.edit input[name="description"] {
  width: 496px;
  max-width: 100%;
}

/* Email section styling */
#report-email,
#contact-email {
  box-sizing: border-box;
  width: 240px;
  height: 44px;
  padding: 0 24px;
  font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif;
  font-size: 15px;
  letter-spacing: 0.05em;
  background: var(--input-bg-color);
  border: none;
  border-radius: 12px;
  border-bottom: 5px solid var(--input-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

#report-email button.link,
#contact-email button.link,
#report-email a,
#contact-email a {
  font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text-color);
  transform: none !important;
  transition: color 0.2s ease-out, border-bottom-color 0.2s ease-out;
}

#report-email a:hover,
#contact-email a:hover {
  transform: none !important;
  border-bottom-color: var(--color-primary);
}

#report-email .spinner,
#contact-email .spinner { 
  display: none; 
  width: 1em;
  height: 1em;
  margin: 0 0.5rem 0 0;
  vertical-align: middle;
}

#report-email .htmx-request svg,
#contact-email .htmx-request svg { display: none; }

#report-email .htmx-request .spinner,
#contact-email .htmx-request .spinner { 
  display: inline-block;
  vertical-align: middle;
}

.eye-icon svg { stroke-width: 2; }

/* AUTH & RESET PASSWORD */

#auth {
  width: 420px;
  align-items: flex-start;
}

#auth h2 { margin-bottom: 0.5rem; }
#auth p { margin-bottom: 1.5rem; }

#reset-password form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

#reset-password form .inputs-wrapper { 
  display: flex;
  align-items: flex-end;
  margin-top: 2rem;
}

#reset-password form label { flex: 0 0 280px; }
#reset-password form label input { width: 100%; }
#reset-password form button { margin: 0 0 0.2rem 1rem; }

#new-password h2 { margin-bottom: 0.5rem; }
#new-password p { margin-bottom: 1.5rem; }

#new-password-form label { margin-bottom: 1.5rem; }
#new-password-form label input { width: 280px; }

#new-password form {
  width: 420px;
  max-width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

#new-password form label { margin-bottom: 2rem; }

#new-password form input {
  width: 100%;
  height: 72px;
  margin-top: 1rem;
  font-size: 16px;
}

#new-password form > button[type="submit"] {
  height: 56px;
  padding: 0 1rem 2px;
  margin: 0;
}

/* VERIFY USER */
/* VERIFY CHANGE EMAIL */
/* RESET PASSWORD TOKEN */

.verify-page {
  align-items: center;
}

.verify-page h2,
.verify-page h3 { 
  display: flex;
  align-items: center;
  text-align: center;
  font-weight: 300;
}

.verify-page h2 svg, 
.verify-page h3 svg {
  width: 1.15em;
  height: auto;
}

/* URL INFO */

#url-info {
  width: 1200px;
  align-items: center;
  text-align: center;
  padding: 0 16px;
}

#url-info h3 { font-weight: 300; margin: 0; }
#url-info p { line-break: anywhere; }

/* PROTECTED */

#protected { width: 600px; }

#protected form { width: 100%; margin-top: 1rem; }
#protected form .inputs-wrapper {  width: 100%; display: flex; align-items: flex-end; }
#protected form label { flex: 0 0 280px; }
#protected form label input { width: 100%; }
#protected form button { margin: 0 0 0.2rem 1rem; }
#protected form .spinner { display: none; }
#protected form.htmx-request svg { display: none; }
#protected form.htmx-request .spinner { display: block; }

/* TERMS */

#terms { width: 600px; }

/* Terms of Service - Modern UI/UX Typography & Layout */

/* Main Typography Hierarchy */
#terms h3 {
  font-size: 2rem;
  color: var(--text-color);
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

#terms h4 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 1rem 0 1.25rem 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: 2rem; /* Smooth anchor scrolling offset */
}

#terms h4:first-of-type {
  margin-top: 2rem; /* Less space for first section */
}

/* Paragraph Styling */
#terms p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  margin: 0 0 1.25rem 0;
  /* max-width: 65ch; */ /* Optimal reading line length */
}

#terms p:last-child {
  margin-bottom: 0;
}

/* Enhanced List Styling */
#terms ul {
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
}

#terms ul li {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  position: relative;
}

#terms ul li::marker {
  color: var(--color-primary);
  font-weight: 600;
}

#terms ul li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
#terms ul ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
}

#terms ul ul li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Links within content */
#terms p a,
#terms li a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
}

#terms p a:hover,
#terms li a:hover {
  color: var(--send-icon-hover-color);
  border-bottom-color: var(--color-primary);
}

/* Special Content Blocks */
#terms .terms-effective-date {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--secondary-text-color);
  margin: 0 0 1.25rem 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.effective-date-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.effective-date-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: var(--secondary-text-color);
  stroke-width: 2;
}

#terms .terms-intro {
  background: var(--table-bg-color);
  padding: 1.75rem;
  border-radius: 12px;
  border: 1px solid var(--input-border-color);
  border-left: 4px solid var(--color-primary);
  margin: 0 0 1rem 0;
  box-shadow: 0 2px 8px #0000000a;
}

#terms .terms-intro p {
  margin-bottom: 0;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Table of Contents */
#terms .terms-summary {
  background: var(--table-bg-color);
  padding: 1rem 1rem 1rem 2rem;
  border-radius: 12px;
  border: 1px solid var(--table-tr-border-color);
  margin: 0 0 2rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#terms .terms-summary p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 1rem 0;
}

#terms .terms-summary ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

#terms .terms-summary li {
  margin: 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--table-tr-border-color);
  transition: background-color 0.2s ease;
}

#terms .terms-summary li:last-child {
  border-bottom: none;
}

#terms .terms-summary a {
  color: var(--color-primary);
  text-decoration: none !important;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline;
  padding: 0;
  border-radius: 4px;
}

#terms .terms-summary a:hover {
  color: var(--send-icon-hover-color);
  background-color: transparent;
}

#terms .terms-summary strong {
  font-weight: 600;
}

/* Short Version Callouts */
#terms .terms-short {
  background: linear-gradient(135deg, var(--action-success-bg-color), rgba(var(--success-icon-color), 0.02));
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border-left: 3px solid var(--success-icon-color);
  margin: 0 0 1.5rem 0;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#terms .terms-short p {
  margin: 0;
  color: var(--text-color);
}

#terms .terms-short strong {
  font-weight: 600;
  color: var(--success-icon-color);
}

/* Trademark Notice */
#terms .terms-trademark {
  background: var(--table-bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 3px solid var(--color-primary);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--secondary-text-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Enhanced Background Colors with Theme Support */
#terms .terms-intro {
  background: linear-gradient(135deg, 
    var(--table-bg-color), 
    rgba(55, 118, 171, 0.03)  /* Light theme: subtle blue */
  );
}

[data-theme="dark"] #terms .terms-intro {
  background: linear-gradient(135deg, 
    var(--table-bg-color), 
    rgba(64, 156, 255, 0.04)  /* Dark theme: subtle light blue */
  );
}

#terms .terms-summary {
  background: linear-gradient(135deg, 
    var(--table-bg-color), 
    rgba(55, 118, 171, 0.02)
  );
}

[data-theme="dark"] #terms .terms-summary {
  background: linear-gradient(135deg, 
    var(--table-bg-color), 
    rgba(64, 156, 255, 0.02)
  );
}

#terms .terms-short {
  background: linear-gradient(135deg, 
    var(--action-success-bg-color), 
    rgba(72, 187, 120, 0.02)  /* Light theme: subtle green */
  );
}

[data-theme="dark"] #terms .terms-short {
  background: linear-gradient(135deg, 
    var(--action-success-bg-color), 
    rgba(104, 211, 145, 0.03)  /* Dark theme: subtle light green */
  );
}

#terms .terms-trademark {
  background: linear-gradient(135deg, 
    var(--table-bg-color), 
    rgba(55, 118, 171, 0.015)
  );
}

[data-theme="dark"] #terms .terms-trademark {
  background: linear-gradient(135deg, 
    var(--table-bg-color), 
    rgba(64, 156, 255, 0.015)
  );
}



/* Back to Top Button - Matching Theme Toggle Shape & Primary Button Colors */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--button-bg-primary);
  color: #e6e8ea;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 6px var(--button-bg-primary-box-shadow-color);
  transition: all 0.2s ease, opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  z-index: 1000;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  padding: 0;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 6px 15px var(--button-bg-primary-box-shadow-color);
  transform: translateY(-2px) scale(1.02, 1.02);
}

.back-to-top:focus {
  outline: 2px solid var(--focus-outline-color);
  outline-offset: 2px;
}

.back-to-top:active {
  transform: translateY(0) scale(1, 1);
  box-shadow: 0 5px 6px var(--button-bg-primary-box-shadow-color);
}

/* Arrow icon using CSS */
.back-to-top::before {
  content: '↑';
  line-height: 1;
  font-size: 14px;
  font-weight: 900;
}

/* Responsive Typography & Enhanced Mobile Experience */
@media (max-width: 768px) {
  #terms h3 {
    font-size: 1.75rem;
    line-height: 1.25;
  }
  
  #terms h4 {
    font-size: 1.25rem;
    margin: 2.5rem 0 1rem 0;
    line-height: 1.3;
  }
  
  #terms p {
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: none; /* Remove character limit on mobile */
  }
  
  #terms .terms-intro,
  #terms .terms-summary {
    padding: 1.25rem;
    border-radius: 10px;
  }
  
  #terms .terms-short {
    padding: 0.875rem 1rem;
    border-radius: 6px;
  }
  
  #terms .terms-trademark {
    padding: 1.25rem;
    border-radius: 6px;
  }
  
  #terms ul {
    padding-left: 1.25rem;
  }
  
  /* Mobile back to top button */
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  /* Enhanced table of contents for mobile */
  #terms .terms-summary ul {
    gap: 0.5rem;
    padding-left: 0.5rem; /* Add left padding for mobile */
  }
  
  #terms .terms-summary li {
    padding: 0.75rem 0.75rem 0.75rem 0;
  }
  
  #terms .terms-summary a {
    padding: 0;
    font-size: 0.95rem;
  }
  
  #report h3 {
    font-size: 1.75rem;
    line-height: 1.25;
  }
  
  #report h4 {
    font-size: 1.25rem;
    margin: 2.5rem 0 1rem 0;
    line-height: 1.3;
  }
  
  #report p {
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: none;
  }
  
  .section-container {
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  #terms h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  #terms h4 {
    font-size: 1.125rem;
    margin: 2rem 0 0.75rem 0;
  }
  
  #terms p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  #terms .terms-summary {
    padding-left: 2rem;
  }

  #terms .terms-intro,
  #terms .terms-summary,
  #terms .terms-trademark {
    padding: 1rem;
    border-radius: 8px;
  }
  
  #terms .terms-short {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  #terms ul {
    padding-left: 1rem;
  }
  
  #terms ul li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  /* Smaller back to top on very small screens */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  
  /* Compact table of contents */
  #terms .terms-summary ul {
    padding-left: 0.75rem; /* More padding for very small screens */
  }
  
  #terms .terms-summary p {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  #terms .terms-summary a {
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  #report h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  #report h4 {
    font-size: 1.125rem;
    margin: 2rem 0 0.75rem 0;
  }
  
  #report p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  
  .section-container {
    margin-bottom: 1.5rem;
  }
}

/* ABOUT */

#about { width: 600px; }

/* About Page - Modern UI/UX Typography & Layout (Same as Terms) */

/* Main Typography Hierarchy */
#about h3 {
  font-size: 2rem;
  color: var(--text-color);
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

#about h4 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 1rem 0 1.25rem 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: 2rem;
}

#about h4:first-of-type {
  margin-top: 2rem;
}

/* Paragraph Styling */
#about p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  margin: 0 0 1.25rem 0;
  /* max-width: 65ch; */
}

#about p:last-child {
  margin-bottom: 0;
}

/* Enhanced List Styling */
#about ul {
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
}

#about ul li {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  position: relative;
}

#about ul li::marker {
  color: var(--color-primary);
  font-weight: 600;
}

#about ul li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
#about ul ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
}

#about ul ul li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Links within content */
#about p a,
#about li a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
}

#about p a:hover,
#about li a:hover {
  color: var(--send-icon-hover-color);
  border-bottom-color: var(--color-primary);
}

#about .features-grid,
#about .benefits-list,
#about .icon-list,
#about .integration-section,
#about .cta-section {
  max-width: 100%;
}

#about .features-grid {
  grid-template-columns: 1fr; /* Single column within 600px constraint */
}

/* About Page Responsive Styles */
@media (max-width: 768px) {
  #about h3 {
    font-size: 1.75rem;
    line-height: 1.25;
  }
  
  #about h4 {
    font-size: 1.25rem;
    margin: 2.5rem 0 1rem 0;
    line-height: 1.3;
  }
  
  #about p {
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: none;
  }
  
  #about ul {
    padding-left: 1.25rem;
  }
}

@media (max-width: 480px) {
  #about h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  #about h4 {
    font-size: 1.125rem;
    margin: 2rem 0 0.75rem 0;
  }
  
  #about p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  
  #about ul {
    padding-left: 1rem;
  }
  
  #about ul li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
}


/* SPONSORS */

#sponsors { width: 1000px; }

/* Sponsors Page - Modern UI/UX Typography & Layout */

/* Main Typography Hierarchy */
#sponsors h3 {
  font-size: 2rem;
  color: var(--text-color);
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

#sponsors h4 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 2rem 0 1.25rem 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: 2rem;
}

#sponsors h4:first-of-type {
  margin-top: 2rem;
}

.content-card p:first-child {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
}

/* Paragraph Styling */
#sponsors p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  margin: 0 0 1.25rem 0;
  /* max-width: 65ch; */
}

#sponsors p:last-child {
  margin-bottom: 0;
}

/* Enhanced List Styling */
#sponsors ul {
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
}

#sponsors ul li {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  position: relative;
}

#sponsors ul li::marker {
  color: var(--color-primary);
  font-weight: 600;
}

#sponsors ul li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
#sponsors ul ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
}

#sponsors ul ul li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

#sponsors .features-grid,
#sponsors .benefits-list,
#sponsors .icon-list,
#sponsors .integration-section,
#sponsors .cta-section {
  max-width: 100%;
}

#sponsors .features-grid {
  grid-template-columns: repeat(2, 1fr); /* Two columns within 600px constraint */
  gap: 1rem;
}


.content-card p:first-child {
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.content-card p:first-child strong {
  font-weight: 600;
  color: var(--text-color);
}


/* Sponsors Page Responsive Styles */
@media (max-width: 768px) {
  #sponsors h3 {
    font-size: 1.75rem;
    line-height: 1.25;
  }
  
  #sponsors h4 {
    font-size: 1.25rem;
    margin: 2.5rem 0 1rem 0;
    line-height: 1.3;
  }
  
  #sponsors h5 {
    font-size: 1rem;
  }
  
  #sponsors p {
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: none;
  }
  
  #sponsors ul {
    padding-left: 1.25rem;
  }
  
  #sponsors .features-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
}

@media (max-width: 480px) {
  #sponsors h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  #sponsors h4 {
    font-size: 1.125rem;
    margin: 2rem 0 0.75rem 0;
  }
  
  #sponsors h5 {
    font-size: 0.95rem;
  }
  
  #sponsors p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  
  #sponsors ul {
    padding-left: 1rem;
  }
  
  #sponsors ul li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
}

/* Features Page Responsive Styles */
@media (max-width: 768px) {
  #report h5, #about h5 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  #features h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  #features h4 {
    font-size: 1.125rem;
    margin: 2rem 0 0.75rem 0;
  }
  
  #features h5, #report h5, #about h5 {
    font-size: 0.95rem;
  }
  
  #features p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  
  #features ul {
    padding-left: 1rem;
  }
  
  #features ul li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  

}


/* Responsive styles matching nav button responsiveness */
@media (max-width: 768px) {
  

  #terms .terms-summary {
    padding: 0 0 0 2rem;
  }
}

/* ERROR PAGE */

#error-page { align-items: center; text-align: center; }
#error-page h2 { margin: 0; }


/* BANNED LINK STYLES */

  /* Red color for banned link text */
  a.banned-link,
  span.banned-link {
    color: hsl(0, 84%, 58%) !important;
    text-decoration: none;
    border-bottom: 1px dotted transparent !important;
  }
  
  /* Only links should have hover effects, not spans */
  a.banned-link:hover {
    color: hsl(0, 78%, 50%) !important;
    border-bottom-color: hsl(0, 78%, 50%) !important;
  }

/* EXPIRED LINK STYLES */

  /* Gray/muted color for expired links */
  a.expired-link {
    color: var(--secondary-text-color) !important;
    opacity: 0.7;
    text-decoration: none;
    border-bottom: 1px dotted transparent !important;
  }
  
  a.expired-link:hover {
    opacity: 0.9;
    border-bottom-color: var(--secondary-text-color) !important;
  }

  /* Expired status text styling */
  .expired {
    color: var(--secondary-text-color);
    font-weight: 500;
  }



/* SPONSOR GRID STYLES - Using content-card styling */

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.sponsor-grid__sponsor {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: #ffffff !important;
  border-radius: 12px;
  border: 1px solid #e5e7eb !important;
  transition: all 0.2s ease;
}

.sponsor-grid__sponsor:hover {
  background: #f9fafb !important;
  box-shadow: 0 2px 8px #0000000d;
}

.sponsor-grid__sponsor-img {
  align-items: center;
  display: flex;
  height: 200px;
  justify-content: center;
  margin: 0 auto;
  max-width: 100%;
  width: 250px;
}

.sponsor-grid__sponsor-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 2rem;
}

.sponsor-grid__sponsor-description {
  flex: 1;
  margin-bottom: 1rem;
}

.sponsor-grid__sponsor-name {
  font: 16px / 1.45 'SourceSansPro', 'Nunito', Arial, sans-serif;
  font-weight: 600;
  color: #1f2937 !important;
  margin: 0 0 0.75rem 0;
}

.sponsor-grid__sponsor-activity {
  color: #4b5563 !important;
  line-height: 1.7;
}

.sponsor-grid__sponsor-activity p {
  font-size: 1rem;
  line-height: 1.7;
  color: #4b5563 !important;
  margin: 0 0 1.25rem 0;
}

.sponsor-grid__sponsor-link {
  align-self: center;
  margin-top: auto;
}

/* Responsive adjustments for sponsor grid - fixed 3-column layout */
@media (max-width: 1024px) {
  .sponsor-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sponsor-grid {
    grid-template-columns: 1fr;
  }
}

/* RESPONSIVE STYLES */

@media only screen and (max-width: 768px) {
  html, body { font-size: 14px; }
  
  /* Shortener form responsive - shrink like sponsors */
  main {
    width: 100%;
    max-width: 600px;
    padding: 0 1.5rem;
  }
  
  main form {
    width: 100%;
    max-width: 100%;
  }
  
  /* Main form inputs - homepage shortener and login forms only */
  main form input#target {
    height: 58px;
    font-size: 15px;
    padding: 0 58px 0 26px;
  }
  
  form#login-signup input[type="text"],
  form#login-signup input[type="email"],
  form#login-signup input[type="password"] {
    height: 58px;
    font-size: 15px;
  }
  
  /* Keep other inputs at their original mobile size */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  select  {
    font-size: 14px;
    padding: 0 16px;
    height: 38px;
    letter-spacing: 0.04em;
    border-bottom-width: 4px;
  }

  #report-email,
  #contact-email {
    font-size: 14px;
    padding: 0 16px;
    height: 38px;
    letter-spacing: 0.04em;
    border-bottom-width: 4px;
  }

  #report-email,
  #contact-email {
    font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif;
  }

  #report-email button.link,
  #contact-email button.link,
  #report-email a,
  #contact-email a {
    font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif;
    font-size: 14px;
    letter-spacing: 0.04em;
  }

  label input { margin-top: 0.25rem; }

  #main-table-wrapper table tr.edit input[name="description"] { width: 407px !important; }
  #main-table-wrapper .url-input-wrapper { margin-top: 0.25rem; }
  #main-table-wrapper .url-input-wrapper .left { width: 60px; }
  #main-table-wrapper .url-input-wrapper .right { width: 260px; padding: 0 1rem 0 0; }

  input[type="text"]::placeholder,
  input[type="email"]::placeholder,
  input[type="password"]::placeholder { font-size: 13px; letter-spacing: 0.04em; }
  
  table tr { padding: 0 0.25rem; } 
  table th,
  table td { padding: 0.5rem; }
  table td { font-size: 14px; }
  table tr.loading-placeholder td { font-size: 16px; }
  
  a.button,
  button { height: 32px; padding: 0 22px; font-size: 12px; }
  a.button.action,
  button.action { padding: 4px; width: 20px; height: 20px; }
  .action-placeholder { width: 20px; height: 20px; padding: 4px; }
  button.nav { height: 26px; padding: 0 7px; font-size: 11px; }

  .dialog .box { min-width: 300px; padding: 2rem 1.25rem; }
  .dialog.qrcode .box { padding: 0; }
  .dialog .loading { width: 20px; height: 20px; margin: 2rem 0; }
  .dialog .content .buttons { margin-top: 1rem; }

  header { padding: 1rem; height: 70px; }
  header a.logo { font-size: 23px; }
  header ul.logo-links { display: none; }
  header .logo img { margin-right: 8px; width: 150px; height: 55px; }
  header nav ul li { margin-left: 0.5rem; }
  header nav ul li a.button { height: 28px; padding: 0 1rem; font-size: 11px; }
  a.nav[href="/logout"] { font-size: 11px; }

  form#login-signup label { margin-bottom: 1.5rem; }
  form#login-signup input { margin-top: 0.75rem; }
  form#login-signup label > .password-wrapper { margin-top: 0.75rem; }
  form#login-signup label > .password-wrapper input { margin-top: 0; }
  .auth-disclaimer { 
    font-size: 11px; 
    line-height: 1.3;
  }
  form#login-signup .buttons-wrapper { margin-bottom: 1.5rem; }
  form#login-signup .buttons-wrapper button { height: 44px; }
  form#login-signup a.forgot-password { font-size: 13px; }
  /* .login-signup-message { margin-top: 1.5rem; } */ 
  .login-signup-message h1 { font-size: 23px; }

  main #shorturl h1 { font-size: calc(1.6rem + 3px); }
  .clipboard { width: 30px; height: 30px; margin-right: 0.5rem; }
  .homepage-description { 
    line-height: 1.4; 
  }
  .mobile-break {
    display: inline;
  }
  .clipboard svg.check { padding: 2px; }
  main form input#target { height: 58px; padding: 0 58px 0 26px; font-size: 15px; }
  main form input#target::placeholder { font-size: 14px; }
  main form p.error { font-size: 12px; margin-left: 0.25rem; }
  main form .target-wrapper p.error { font-size: 13px; margin-left: 0.5rem; }
  main form button.submit { width: 22px; top: 13px; margin: 0 1rem 0; }
  main form label#advanced { margin-top: 1.5rem; }
  main form label#advanced input { margin-bottom: 3px; }
  #main-table-wrapper h2 { margin: 0.5rem 0; }
  #main-table-wrapper table thead,
  #main-table-wrapper table tbody,
  #main-table-wrapper table tfoot { min-width: 800px; }
  #main-table-wrapper tr { padding: 0 0.25rem; }
  #main-table-wrapper th,
  #main-table-wrapper td { padding: 0.75rem; }
  #main-table-wrapper table .actions a.button,
  #main-table-wrapper table .actions button { margin-right: 0.3rem; }
  #main-table-wrapper table td p.description { font-size: 12px; }
  #main-table-wrapper table tr.no-data td { font-size: 16px; }
  #main-table-wrapper.admin-table-wrapper table th.nav { flex-direction: column; align-items: flex-end; }
  #main-table-wrapper.admin-table-wrapper table th .nav-divider { display: none; }
  #main-table-wrapper.admin-table-wrapper table th .limit { margin-bottom: 1rem; }
  table .tab a { padding: 0 7px; height: 26px; }
  #main-table-wrapper th.category-total p { font-size: 13px; }
  #main-table-wrapper table thead tr.controls.with-filters { align-items: flex-start; }
  #main-table-wrapper table th select, input.table-input { height: 28px; font-size: 12px; padding: 0 1rem; }
  #main-table-wrapper table th select { background-position: right 0.7em top 50%, 0 0; }
  .search-input-wrapper button { padding: 2px; margin-right: 0.15rem; }
  #main-table-wrapper table th input.search.admin { max-width: 150px; padding: 0 1.5rem 0 1rem; }
  #main-table-wrapper table th select.table-input { max-width: 120px; }
  #main-table-wrapper table th button.table { height: 28px; }
  #main-table-wrapper table th input::placeholder { font-size: 12px; }
  #main-table-wrapper table tr.controls .checkbox { font-size: 13px; }
  #main-table-wrapper table button.nav { margin-right: 0.5rem; }
  #main-table-wrapper table .nav-divider { height: 18px; margin: 0 1rem; }
  #main-table-wrapper table tbody td.right-fade:after { width: 14px; }
  #main-table-wrapper table tbody td.left-fade:after { width: 14px; }
  #main-table-wrapper table tr.edit td { padding: 1.25rem 1rem; }
  #main-table-wrapper table tr.edit label { margin: 0 0.25rem 0.5rem; }
  #main-table-wrapper table tr.edit input { height: 38px; font-size: 13px; }
  #main-table-wrapper table tr.edit input,
  #main-table-wrapper table tr.edit input + p,
  #main-table-wrapper table tr.edit .password-wrapper,
  #main-table-wrapper table tr.edit .password-wrapper + p { width: 200px; }
  #main-table-wrapper table tr.edit input[name="target"],
  #main-table-wrapper table tr.edit input[name="description"],
  #main-table-wrapper table tr.edit input[name="target"] + p,
  #main-table-wrapper table tr.edit input[name="description"] + p { width: 320px; }
  #main-table-wrapper table tr.edit button { height: 32px; margin-right: 0.5rem; }
  #main-table-wrapper table tr.edit td.loading svg { width: 14px; height: 14px; }
  #main-table-wrapper table tr.edit form .response p { margin: 1rem 0 0; }
  .dialog .ban-checklist label { margin: 0.5rem 1rem 0.5rem 0; }

  footer { font-size: 12px; }
  footer button.link { font-size: 12px; }

  h1.settings-welcome { font-size: 21px; }
  .add-domain-wrapper { margin: 1rem 0 1rem; }
  .add-domain-wrapper > .spinner { width: 18px; margin: 0.5rem 0 0 0.5rem;  }
  form#add-domain { margin-top: 0.75rem; }
  form#add-domain button { margin-right: 0.5rem; }

  .stats-info > h2 { font-size: 21px; margin-bottom: 0.75rem; }
  
  .stats-columns { 
    flex-direction: column; 
    gap: 1rem; 
  }
  
  .stats-column p { 
    margin: 0 0 0.25rem 0; 
  }
  
  .stats-content a,
  .stats-content p { 
    font-size: 13px; 
    white-space: nowrap;
    overflow: hidden;
  }
  
  .stats-content.right-fade:after {
    background: linear-gradient(to left, var(--bg-color), transparent);
  }
  .stats-head { padding: 0rem 1rem; }
  .stats-head p { font-size: 0.9rem; }
  .stats-nav button { margin-right: 0.5rem; }
  .stats-period { padding: 0.5rem 1rem; }
  .stats-period h2 { font-size: 21px;  margin: 0.5rem 0 0; }
  p.last-update { font-size: 12px; }
  #stats canvas { margin: 1rem 0; }
  .stats-columns-wrapper { flex-direction: column; }
  .stats-columns-wrapper > div { flex-basis: 100%; }

  #notfound h2 { font-size: 23px; }



  #report form { margin-top: 1.5rem; }
  #report form .inputs-wrapper { flex-direction: column; align-items: flex-start; }
  #report form button { margin: 0.75rem 0 0.2rem 0; }
  
  /* Mobile responsive for URL input wrapper */
  .url-input-wrapper .left {
    font-size: 14px;
    height: 38px;
    border-radius: 12px 0 0 12px;
    margin-top: 0;
    width: 66px;
    padding: 0 0 0 16px;
    flex-shrink: 0;
    text-align: right;
  }
  
  .url-input-wrapper .right {
    font-size: 14px;
    height: 38px;
    border-radius: 0 12px 12px 0;
    margin-top: 0;
    flex: 1;
    width: 160px;
    padding: 0 16px 0 0;
  }

  #reset-password form .inputs-wrapper { flex-direction: column; align-items: flex-start; margin-top: 1rem; }
  #reset-password form label { flex-basis: 0; width: 280px; }
  #reset-password form button { margin: 0.75rem 0 0.2rem 0; }

  #new-password form label { margin-bottom: 1.5rem; }
  #new-password form input {
    height: 58px;
    margin-top: 0.75rem;
    font-size: 15px;
  }
  #new-password form > button[type="submit"] { height: 44px; }

  .verify-page h2,
  .verify-page h3 { display: flex; flex-direction: row; }

  #protected form { margin-top: 0.5rem; }
  #protected form .inputs-wrapper {  flex-direction: column; align-items: flex-start; }
  #protected form label { flex-basis: 0; width: 280px; }
  #protected form button { margin: 0.75rem 0 0.2rem 0; }
}

@media only screen and (max-width: 640px) {
  table tr.loading-placeholder { justify-content: flex-start; }
  
  .inputs { flex-direction: column; margin-bottom: 0.75rem; }
  .inputs label { margin: 0 0 0.75rem; }
  .inputs label:last-child { margin: 0; }
  
  .advanced-input-wrapper { flex-direction: column; margin-bottom: 0; }
  .advanced-input-wrapper label { width: 100%; margin-bottom: 0.75rem; padding-right: 0; }
  .advanced-input-wrapper label input,
  .advanced-input-wrapper label select { margin-top: 0.5rem; }
  form#add-domain .spinner { width: 18px; }

  #apikey-wrapper { max-width: 100%; }
  #apikey p { font-size: 0.85rem; }
  #apikey .clipboard { width: 22px; height: 22px; }
}

/* Sortable table columns */
.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.sortable:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.sort-indicator {
  margin-left: 0.5rem;
}

/* Ensure all sortable columns have proper alignment */
#main-table-wrapper table thead .views,
#main-table-wrapper table thead .users-links-count,
#main-table-wrapper table thead .domains-links-count {
  justify-content: initial;
}

/* Center align all ID column headers */
#main-table-wrapper table thead .users-id,
#main-table-wrapper table thead .domains-id,
#main-table-wrapper table thead .hosts-id {
  justify-content: center;
}

/* Usage quota row styling */
#main-table-wrapper table tr.usage { justify-content: flex-start; align-items: center; }
#main-table-wrapper table th.usage-item { flex: 0 0 auto; margin-right: 0.5rem; }
#main-table-wrapper table th.usage-item-title { margin-right: 0; }
#main-table-wrapper table th.usage-item p { display: flex; align-items: center; margin: 0; font-size: 15px; font-weight: 400; }

.usage-count { font-weight: 700; font-size: 14px; }
.usage-count.green { color: var(--success-icon-color) }
.usage-count.red { color: var(--error-icon-color) }
.usage-count.yellow { color: #d3a809 }
/* SPONSORS */

.sponsors {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  text-align: center;
  width: 100%;
  margin: 0;
  gap: clamp(2.8rem, 2.5vw, 2rem);
  overflow-x: auto;
}

.sponsors-title {
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  margin: 0 0 1rem;
  padding: 0;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-basis: 100%;
  display: none;
}

.sponsors-sponsor {
  line-height: 1.4;
  background-color: transparent;
  color: var(--text-color);
  display: inline-grid;
  grid-template-rows: fit-content(40%);
  opacity: .95;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  border-bottom: none !important;
  flex-shrink: 0;
  min-width: 0;
}

.sponsors-sponsor:hover {
  transform: translateY(-2px);
  text-decoration: none !important;
  border-bottom: none !important;
}

.sponsors-image {
  border-style: none;
  vertical-align: middle;
  justify-self: center;
  width: clamp(40px, 8vw, 100px);
  height: clamp(16px, 3.2vw, 40px);
  object-fit: contain;
  opacity: .88;
  flex-shrink: 0;
}

.sponsors-name {
  line-height: 1.4;
  text-align: center;
  align-self: end;
  color: var(--text-color);
  font-size: clamp(0.6rem, 1.5vw, 0.75rem);
  font-weight: 600;
  margin-top: clamp(4px, 1vw, 10px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sponsors-service {
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  align-self: end;
  color: var(--text-color); /* Match other text colors */
  font-size: .75rem;
  max-width: 100px;
}



/* Mobile responsive - allow wrapping and remove services */
@media only screen and (max-width: 768px) {
  .sponsors {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  
  .sponsors-service {
    display: none;
  }
}

@media only screen and (max-width: 600px) {
  .sponsors {
    gap: clamp(1.4rem, 5vw, 2rem);
  }
}

@media only screen and (max-width: 430px) {
  .sponsors {
    gap: clamp(0.9rem, 3vw, 1.5rem)
  }
  
  /* Extra small screens - optimize homepage and login forms only */
  main form input#target { 
    height: 52px; 
    padding: 0 52px 0 20px; 
    font-size: 14px; 
  }
  
  form#login-signup input[type="text"],
  form#login-signup input[type="email"],
  form#login-signup input[type="password"] {
    height: 52px;
    font-size: 14px;
  }
  
  main form button.submit { 
    width: 20px; 
    top: 11px; 
    margin: 0 0.75rem 0; 
  }
}

/* COUNTER SECTION */
.counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  text-align: center;
  width: 100%;
  margin-top: 4rem;
  animation: fadein 0.8s ease-out;
}

.counter-title {
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  margin: 0 0 1rem;
  padding: 0;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-basis: 100%;
  display: none;
}

.counter-stats {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  gap: 2rem;
  max-width: 800px;
  width: 100%;
}

.counter-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 160px;
  padding: 1rem;
  background: var(--counter-stat-bg-color, rgba(255, 255, 255, 0.7));
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--input-shadow-color);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s ease-in-out;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: calc(var(--delay, 0) * 0.15s);
  will-change: transform;
}

.counter-stat:nth-child(1) { --delay: 1; }
.counter-stat:nth-child(2) { --delay: 2; }
.counter-stat:nth-child(3) { --delay: 3; }
.counter-stat:nth-child(4) { --delay: 4; }

.counter-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--input-hover-shadow-color);
  background: var(--counter-stat-hover-bg-color, rgba(255, 255, 255, 0.9));
}

.counter-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: Consolas, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif;
  min-height: 2rem; /* keeps height stable before JS fills */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease-in-out;
}

.counter-stat:hover .counter-number {
  animation: pulse 0.6s ease-in-out;
}

.counter-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-color); /* Use primary text color for better contrast */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-align: center;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .counter,
  .counter-stat,
  .counter-number {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .counter-title { font-size: 0.9rem; margin: 0 0 1.5rem; }
  .counter-stats { gap: 1.5rem; }
  .counter-stat { width: 120px; padding: 0.8rem; }
  .counter-number { font-size: 1.6rem; }
  .counter-label { font-size: 0.75rem; }
}

@media (max-width: 600px) {
  .counter { padding: 1.5rem; }
  
  .counter-stats {
    gap: 0.8rem;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .counter-stat {
    width: calc(50% - 0.4rem);
    flex: none;
  }
}

/* Ultra-small screens: full width rows to prevent cramping */
@media (max-width: 360px) {
  .counter-stat { width: 100% !important; }
}

/* Keyframes */
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* THEME TOGGLE COMPONENT - Matches Navigation Button Style */
.theme-toggle-simple {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  word-break: keep-all;
  color: var(--text-color);
  border: none;
  border-radius: 12px;
  transition: all 0.4s ease-out;
  cursor: pointer;
  overflow: hidden;
  background: var(--button-bg);
  box-shadow: 0 5px 6px var(--button-bg-box-shadow-color);
}

.theme-toggle-simple:hover {
  box-shadow: 0 6px 15px var(--button-bg-box-shadow-color);
  transform: none;
}

.theme-toggle-simple:focus {
  outline: 2px solid var(--focus-outline-color);
  outline-offset: 2px;
  transform: none;
}

.theme-toggle-simple:active {
  box-shadow: 0 5px 6px var(--button-bg-box-shadow-color);
  transform: none;
}



.theme-icon svg {
  width: 100%;
  height: 100%;
}

/* Theme icon base styles - no animation by default */
.theme-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform-origin: center;
  margin-left: -8px;
  margin-top: -8px;
  color: var(--toggle-icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Light mode: show sun, hide moon */
:root .theme-icon-sun,
[data-theme="light"] .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

:root .theme-icon-moon,
[data-theme="light"] .theme-icon-moon {
  opacity: 0;
  transform: rotate(180deg) scale(0.5);
}

/* Dark mode: hide sun, show moon */
[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: rotate(-180deg) scale(0.5);
}

[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Animation class - only applied during user interactions */
.theme-toggle-animated .theme-icon {
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.theme-toggle-animated {
  transition: transform 0.2s ease;
}

/* Smooth theme transition - only for theme-related properties */
:root,
body,
.dialog,
.dialog .box,
input[type="text"],
input[type="email"],
input[type="password"],
select,
table,
table tr,
button.nav,
input[type="checkbox"],
.counter-stat,
button.action,
table .tab a {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Disable transitions during theme switch to prevent flash */
.theme-switching * {
  transition: none !important;
}

/* THEME-AWARE IMAGES - CSS controlled like theme button */
/* Logo images - show/hide based on data-theme */
:root .logo-light,
[data-theme="light"] .logo-light {
  display: block;
}

:root .logo-dark,
[data-theme="light"] .logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

/* Sponsor images - show/hide based on data-theme */
:root .sponsors-light,
[data-theme="light"] .sponsors-light {
  display: block;
}

:root .sponsors-dark,
[data-theme="light"] .sponsors-dark {
  display: none;
}

[data-theme="dark"] .sponsors-light {
  display: none;
}

[data-theme="dark"] .sponsors-dark {
  display: block;
}

/* Theme toggle responsive adjustments - Match button heights */
@media only screen and (max-width: 768px) {
    .theme-toggle-simple {
      height: 28px;
      width: 28px;
      font-size: 11px;
    }
  
  .theme-icon {
    width: 11px;
    height: 11px;
    margin-left: -5.5px;
    margin-top: -5.5px;
  }
}

/* Content Pages Styles */
.content-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.content-page .container {
  max-width: 800px;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--secondary-text-color);
  margin: 0;
}

.content-section {
  margin-bottom: 2rem;
}

.content-section h2 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--table-tr-border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card {
  padding: 1.5rem;
  background: var(--table-bg-color);
  border-radius: 8px;
  border: 1px solid var(--table-tr-border-color);
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

/* New Component-Based Classes */
.icon-list {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.25rem 0;
}

.icon-list-item {
  display: block;
}


.inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  flex-shrink: 0;
  vertical-align: middle;
}

.inline-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: var(--color-primary);
  stroke-width: 2;
}

/* Play icon specific fill colors */
.inline-icon svg[fill="currentColor"] {
  fill: var(--color-primary);
  stroke: none;
}

a.button span svg[fill="currentColor"],
button span svg[fill="currentColor"] {
  fill: white;
  stroke: none;
}

/* Legacy Classes (to be removed after migration) */
.benefits-list {
  display: grid;
  gap: 1rem;
}

.benefit {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.benefit-icon {
  font-size: 1.2rem;
  color: var(--success-icon-color);
  flex-shrink: 0;
}

.benefit-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke: var(--success-icon-color);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: var(--color-primary);
  stroke-width: 2;
}

/* New Component Classes */
.icon-list-item p {
  margin: 0;
  color: var(--secondary-text-color);
}

.icon-list-item p:first-child {
  margin: 0 !important;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
}

.icon-list-item p:first-child strong {
  font-weight: 600;
  color: var(--text-color);
}

/* Legacy Classes */
.benefit p {
  margin: 0;
  color: var(--secondary-text-color);
}

.benefit p:first-child {
  margin: 0 !important;
  font-weight: 600;
  color: var(--text-color);
}

.benefit p:first-child strong {
  font-weight: 600;
  color: var(--text-color);
}

.cta-section {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem;
  background: var(--table-bg-color);
  border-radius: 8px;
}

.integration-section ul {
  margin-bottom: 2rem;
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

/* Contrast improvements for accessibility */
/* Ensure footer links have adequate contrast */
footer a,
footer button.link {
  color: var(--color-primary) !important; /* Use link hover color for all states */
}

footer a:hover,
footer button.link:hover {
  color: var(--color-primary) !important;
  border-bottom-color: var(--color-primary) !important;
}

/* Status link improvements */
.status-link {
  color: var(--color-primary) !important; /* Use same color as other footer links */
  display: inline; /* Ensure it only follows text height, not adjacent elements */
  vertical-align: baseline; /* Align with text baseline */
}

.status-link:hover {
  color: var(--color-primary) !important;
}

/* Custom domain maintenance notice */
.maintenance-notice {
  margin-bottom: 1.5rem;
}

.maintenance-notice h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
  font-size: 1.25rem;
  font-weight: 600;
}

.maintenance-message {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  padding: 1rem;
  color: #721c24;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.maintenance-message strong {
  color: #a71e2a;
  display: block;
  margin-bottom: 0.5rem;
}




