/* Cysic brand palette */
:root {
  --black: #000000;
  --snow: #fffafa;
  --cyan: #22d3ee;
  --violet: #7c3aed;
  --neutral600: #525252;
  --neutral400: #a8a29e;
  --deep-blue: #1e3a8a;
  --emerald: #059669;
  --rose: #e11d48;
  --amber: #d97706;
  --indigo: #4338ca;
  --dark-purple: #0f0a23;
  --neon-cyan: #00ffff;
  --neon-violet: #8b5cf6;
  --glow-cyan: rgba(34, 211, 238, 0.3);
  --glow-violet: rgba(124, 58, 237, 0.3);
}

/* Base */
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: all 0.5s ease;
  position: relative;
  overflow-x: hidden;
}

/* Custom scrollbar styling for the entire website */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: rgba(15, 10, 35, 0.8);
  border-radius: 6px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border-radius: 6px;
  border: 2px solid rgba(15, 10, 35, 0.8);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: var(--violet);
  border-color: rgba(15, 10, 35, 0.9);
}

/* Firefox scrollbar styling for the entire website */
html,
body {
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) rgba(15, 10, 35, 0.8);
}

/* Also style scrollbars for main content area */
main::-webkit-scrollbar {
  width: 12px;
}

main::-webkit-scrollbar-track {
  background: rgba(15, 10, 35, 0.8);
  border-radius: 6px;
}

main::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border-radius: 6px;
  border: 2px solid rgba(15, 10, 35, 0.8);
}

main::-webkit-scrollbar-thumb:hover {
  background: var(--violet);
  border-color: rgba(15, 10, 35, 0.9);
}

main {
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) rgba(15, 10, 35, 0.8);
}

/* Background Container */
.bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('assets/CYSIC-bg.png') center center/cover no-repeat;
  opacity: 1;
  filter: brightness(1) contrast(1.1);
}

/* Dark mode */
body.dark {
  background: linear-gradient(135deg, var(--dark-purple) 0%, #1a0f3a 25%, #2d1b69 50%, #1e1b4b 75%, #0f0a23 100%);
  color: var(--snow);
}

body.dark::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(30, 58, 138, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

body.dark header { 
  color: var(--cyan);
  background: rgba(15, 10, 35, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark input {
  background: rgba(15, 10, 35, 0.9);
  color: var(--snow);
  border: 2px solid rgba(34, 211, 238, 0.4);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 20px var(--glow-cyan);
}

body.dark input::placeholder { color: rgba(168, 162, 158, 0.7); }
body.dark footer { 
  border-top: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(15, 10, 35, 0.9);
  backdrop-filter: blur(20px);
}

/* Light mode */
body.light {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #94a3b8 75%, #64748b 100%);
  color: #1e1e1e;
}

/* Light theme color overrides */
body.light {
  --snow: #1e1e1e;
  --cyan: #0891b2;
  --violet: #7c3aed;
  --neutral600: #525252;
  --neutral400: #6b7280;
}

body.light::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(5, 150, 105, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

body.light header { 
  color: var(--violet);
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.light input {
  background: rgba(255, 255, 255, 0.95);
  color: #1e2937;
  border: 2px solid rgba(124, 58, 237, 0.4);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 0 20px var(--glow-violet);
}

body.light input::placeholder { color: var(--neutral600); }
body.light footer { 
  border-top: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(20px);
}

/* Light theme table and content styles */
body.light table {
  color: #1e1e1e;
}

body.light table th {
  color: var(--violet);
  background: rgba(124, 58, 237, 0.1);
}

body.light table td {
  color: #1e1e1e;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

body.light .legend-box {
  color: #1e1e1e;
}

body.light .legend-box .status-dot.active {
  background: var(--emerald);
}

body.light .legend-box .status-dot.inactive {
  background: var(--rose);
}

/* Light theme legend text colors */
body.light .legend-box div {
  color: #1e1e1e;
}

body.light .legend-box span {
  color: #1e1e1e;
}

/* Light theme legend background */
body.light .legend-box {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Light theme summary table specific */
body.light #result table {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 10px;
  overflow: hidden;
}

body.light #result table th {
  background: rgba(124, 58, 237, 0.15);
  color: var(--violet);
  font-weight: 600;
}

body.light #result table td {
  color: #1e1e1e;
  background: rgba(255, 255, 255, 0.8);
}

body.light #result table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.9);
}

/* Light theme CYS and CGT column styling */
body.light .result td:nth-child(3),
body.light .result td:nth-child(4) {
  font-family: 'Courier New', monospace;
  color: var(--violet);
  font-weight: 500;
}

/* Light theme hover effects for CYS and CGT columns */
body.light .result tr:hover td:nth-child(3),
body.light .result tr:hover td:nth-child(4) {
  color: var(--neon-violet);
  text-shadow: 0 0 8px var(--glow-violet);
  transition: all 0.2s ease;
}

/* Light theme workers table */
body.light #workersTable {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

body.light #workersTable th {
  background: rgba(124, 58, 237, 0.1);
  color: var(--violet);
}

body.light #workersTable td {
  color: #1e1e1e;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

/* Light theme workers table CYS and CGT column styling */
body.light #workersTable td:nth-child(3),
body.light #workersTable td:nth-child(4) {
  font-family: 'Courier New', monospace;
  color: var(--violet);
  font-weight: 500;
}

/* Light theme hover effects for workers table CYS and CGT columns */
body.light #workersTable tr:hover td:nth-child(3),
body.light #workersTable tr:hover td:nth-child(4) {
  color: var(--neon-violet);
  text-shadow: 0 0 8px var(--glow-violet);
  transition: all 0.2s ease;
}

/* Light theme address cell styling */
body.light .address-cell:hover {
  background: rgba(124, 58, 237, 0.1);
  color: var(--violet);
}

body.light .address-cell::after {
  background: rgba(248, 250, 252, 0.95);
  color: var(--violet);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

body.light .workers-table-header {
  background: rgba(124, 58, 237, 0.1);
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}

body.light .workers-table-header h4 {
  color: var(--violet);
}

/* Light theme input status and other text elements */
body.light .input-status {
  color: #1e1e1e;
}

body.light .input-status.error {
  color: #dc2626;
}

body.light .input-status.warning {
  color: #d97706;
}

body.light .input-status.info {
  color: #2563eb;
}

body.light .input-status.success {
  color: var(--rose);
}

body.light .input-status.success {
  color: var(--emerald);
}

body.light .input-status.loading {
  color: var(--violet);
}

body.light button {
  color: #1e1e1e;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

body.light button:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.6);
  color: var(--violet);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.2);
}

/* Light theme workers toggle button hover */
body.light #workersToggle:hover {
  background: rgba(124, 58, 237, 0.15) !important;
  border-color: rgba(124, 58, 237, 0.5) !important;
  color: var(--violet) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  font-size: 1.4rem;
  font-weight: bold;
  margin: 0;
  border-radius: 0;
  position: relative;
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
  min-height: 70px;
}

#themeToggle {
  border: 2px solid currentColor !important;
  background: transparent !important;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
  transition: all 0.3s ease;
  padding: 0 !important;
  border-radius: 50% !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  aspect-ratio: 1 / 1 !important;
}

#themeToggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

header img {
  height: 40px;
  width: auto;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: center;
}

/* Main */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Hero Section */
.hero-section {
  margin-bottom: 2rem;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 1rem;
  box-sizing: border-box;
}

.main-title {
  font-size: 3rem;
  font-weight: 900;
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px var(--glow-cyan);
  letter-spacing: 0.05em;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.2;
}

.main-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  border-radius: 2px;
  box-shadow: 0 0 20px var(--glow-cyan);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--neutral400);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* Checker Container */
.checker-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 0 30px var(--glow-cyan);
  margin-bottom: 2rem;
  position: relative;
  overflow: visible;
  width: 100%;
  max-width: 800px;
}

.checker {
  display: flex;
  gap: 1rem;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  width: 100%;
}

.input-container {
  flex: 1;
  min-width: 250px;
  max-width: 500px;
  width: 100%;
}

.input-status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  min-height: 1.2rem;
  transition: all 0.3s ease;
}

.input-status.error {
  color: #ef4444;
}

.input-status.warning {
  color: #f59e0b;
}

.input-status.info {
  color: #3b82f6;
}

.input-status.success {
  color: #10b981;
}

.input-status.loading {
  color: #3b82f6;
}

.input-status.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #3b82f6;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

input {
  padding: 1rem 1.5rem;
  border-radius: 15px;
  width: 100%;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  font-weight: 500;
  box-sizing: border-box;
}

input:focus {
  transform: translateY(-3px);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.3),
    0 0 30px var(--glow-cyan);
  border-color: var(--cyan);
}

/* Buttons */
button {
  padding: 1rem 2rem;
  border: none;
  border-radius: 15px;
  background: var(--cyan);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  min-width: 120px;
  box-shadow: 0 8px 25px rgba(34, 211, 238, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

button:hover { 
  background: var(--violet);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(124, 58, 237, 0.5);
}

button:active { 
  transform: translateY(0px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}



/* Result */
.result {
  margin-top: 1.5rem; 
  font-size: 1rem;
  padding: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 0 30px var(--glow-cyan);
  max-width: 100%;
  width: 100%;
}

.result table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  min-width: 100%;
  table-layout: auto;
}

.result th,
.result td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: nowrap;
}

/* First column (Node Type) - flexible width */
.result th:first-child,
.result td:first-child {
  min-width: 60px;
  white-space: normal;
}

/* Second column (Total Tasks) - compact */
.result th:nth-child(2),
.result td:nth-child(2) {
  min-width: 60px;
  text-align: center;
}

.result th {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.result td {
  font-size: 0.95rem;
  color: inherit;
}

/* Specific styling for CYS and CGT columns in summary table */
.result td:nth-child(3),
.result td:nth-child(4) {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  text-align: center;
  padding-right: 1rem;
  color: var(--cyan);
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* Responsive column handling for summary table */
.result th:nth-child(3),
.result th:nth-child(4) {
  min-width: 80px;
  max-width: 120px;
  text-align: center;
}

.result td:nth-child(3),
.result td:nth-child(4) {
  min-width: 80px;
  max-width: 120px;
  text-align: center;
}

.result th:last-child,
.result td:last-child {
  min-width: 50px;
  max-width: 70px;
}

/* Ensure text wrapping for long content */
.result td {
  word-break: break-word;
  overflow-wrap: break-word;
}



.result tr:last-child td {
  border-bottom: none;
}

.result tr:hover {
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

/* Hover effects for CYS and CGT columns in summary table */
.result tr:hover td:nth-child(3),
.result tr:hover td:nth-child(4) {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--glow-cyan);
  transition: all 0.2s ease;
}



/* Status indicators */
.result .status-active {
  color: #10b981;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.result .status-inactive {
  color: #ef4444;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Status dot styling */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.status-dot.active {
  background-color: #10b981;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
}

.status-dot.inactive {
  background-color: #ef4444;
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
}

.result .tasks-count {
  color: var(--cyan);
  font-weight: 600;
  text-shadow: 0 0 10px var(--glow-cyan);
}


/* Legend box */
.legend-box {
  margin-top: 1.5rem;
  padding: 1.2rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  font-size: 0.9rem;
  color: inherit;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.2),
    0 0 20px var(--glow-cyan);
  text-align: center;
}

.legend-box div {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.legend-box div:last-child {
  margin-bottom: 0;
}

.legend-box .status-dot {
  height: 10px;
  width: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.8rem;
  box-shadow: 0 0 8px currentColor;
}

.legend-box .status-dot.active {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.legend-box .status-dot.inactive {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}


/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  margin: 0;
  border-radius: 0;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.socials { 
  margin: 0.8rem 0; 
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.socials a {
  color: var(--cyan);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: rgba(34, 211, 238, 0.1);
  white-space: nowrap;
}

.socials a:hover { 
  background: rgba(34, 211, 238, 0.2);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--glow-cyan);
}

.disclaimer { 
  margin-top: 0.8rem; 
  font-size: 0.8rem; 
  color: var(--neutral400);
  opacity: 0.8;
  max-width: 800px;
  line-height: 1.4;
}

/* Support section styling */
.support-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0.8rem 0;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.support-section:hover {
  opacity: 1;
}

.support-text {
  font-size: 0.8rem;
  color: var(--neutral400);
  font-weight: 400;
}

.eth-address {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.4rem 0.8rem;
  color: var(--cyan);
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.eth-address:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.eth-address:active {
  transform: translateY(0px);
}

/* ETH container and label styling */
.eth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.eth-label {
  color: var(--cyan);
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.eth-address i {
  font-size: 0.7rem;
  opacity: 0.8;
}

.address-text {
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Workers table styling */
#workersTable {
  background: rgba(15, 10, 35, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 15px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px var(--glow-cyan);
  overflow: hidden;
  font-size: 0.9rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 2rem;
}

.workers-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(34, 211, 238, 0.1);
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
}

.workers-table-header h4 {
  margin: 0;
  color: var(--cyan);
  font-size: 1rem;
  font-weight: 600;
}

.close-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.2s ease;
  padding: 0;
  min-width: 24px;
  min-height: 24px;
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
  transform: scale(1.1);
}

#workersTable table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  table-layout: fixed;
  min-width: 100%;
}

#workersTable th,
#workersTable td {
  padding: 0.75rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#workersTable th:first-child,
#workersTable td:first-child {
  min-width: 50px;
  max-width: 70px;
}

#workersTable th:nth-child(2),
#workersTable td:nth-child(2) {
  min-width: 80px;
  max-width: 120px;
}

#workersTable th:nth-child(3),
#workersTable td:nth-child(3) {
  min-width: 70px;
  max-width: 90px;
}

#workersTable th:nth-child(4),
#workersTable td:nth-child(4) {
  min-width: 70px;
  max-width: 90px;
}

#workersTable th:last-child,
#workersTable td:last-child {
  min-width: 50px;
  max-width: 70px;
}

#workersTable th {
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

/* Center-align CYS and CGT headers in workers table */
#workersTable th:nth-child(3),
#workersTable th:nth-child(4) {
  text-align: center;
}

#workersTable td {
  color: inherit;
}

/* Specific styling for CYS and CGT columns */
#workersTable td:nth-child(3),
#workersTable td:nth-child(4) {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  text-align: center;
  padding-right: 0.5rem;
  color: var(--cyan);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

/* Specific styling for STATUS column to prevent wrapping */
#workersTable td:last-child {
  white-space: nowrap;
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Handle long addresses with text wrapping */
#workersTable td:nth-child(2) {
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: left;
}

/* Address cell styling for click-to-copy functionality */
.address-cell {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.address-cell:hover {
  background: rgba(34, 211, 238, 0.1);
  color: var(--cyan);
  transform: translateY(-1px);
}

.address-cell:active {
  transform: translateY(0);
}

/* Tooltip for address cells */
.address-cell::after {
  content: "Click to copy";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 10, 35, 0.95);
  color: var(--cyan);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.address-cell:hover::after {
  opacity: 1;
}

#workersTable tr:last-child td {
  border-bottom: none;
}

#workersTable tr:hover {
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

/* Hover effects for CYS and CGT columns */
#workersTable tr:hover td:nth-child(3),
#workersTable tr:hover td:nth-child(4) {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--glow-cyan);
  transition: all 0.2s ease;
}

/* Responsive adjustments for workers table */
@media (max-width: 768px) {
  #workersTable {
    right: 10px;
    bottom: 40px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    font-size: 0.8rem;
  }
  
  .workers-table-header {
    padding: 0.75rem 1rem;
  }
  
  .workers-table-header h4 {
    font-size: 0.9rem;
  }
  
  #workersTable th,
  #workersTable td {
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
  }
  
  /* Make columns more compact on tablets */
  #workersTable th:first-child,
  #workersTable td:first-child {
    min-width: 60px;
    max-width: 80px;
  }
  
  #workersTable th:nth-child(2),
  #workersTable td:nth-child(2) {
    min-width: 100px;
    max-width: 140px;
  }
  
  #workersTable th:nth-child(3),
  #workersTable td:nth-child(3) {
    min-width: 80px;
    max-width: 110px;
  }
  
  #workersTable th:nth-child(4),
  #workersTable td:nth-child(4) {
    min-width: 80px;
    max-width: 110px;
  }
  
  #workersTable th:last-child,
  #workersTable td:last-child {
    min-width: 60px;
    max-width: 80px;
  }
  
  /* Tablet button adjustments */
  #workersToggle {
    min-width: 130px !important;
    max-width: 180px !important;
    font-size: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  #workersTable {
    right: 5px;
    bottom: 20px;
    width: calc(100vw - 10px);
    max-width: calc(100vw - 10px);
  }
  
  .workers-table-header {
    padding: 0.6rem 0.75rem;
  }
  
  #workersTable th,
  #workersTable td {
    padding: 0.4rem 0.3rem;
    font-size: 0.75rem;
  }
  
  /* Make columns even more compact on mobile */
  #workersTable th:first-child,
  #workersTable td:first-child {
    min-width: 50px;
    max-width: 60px;
  }
  
  #workersTable th:nth-child(2),
  #workersTable td:nth-child(2) {
    min-width: 80px;
    max-width: 110px;
  }
  
  #workersTable th:nth-child(3),
  #workersTable td:nth-child(3) {
    min-width: 65px;
    max-width: 85px;
  }
  
  #workersTable th:nth-child(4),
  #workersTable td:nth-child(4) {
    min-width: 65px;
    max-width: 85px;
  }
  
  #workersTable th:last-child,
  #workersTable td:last-child {
    min-width: 50px;
    max-width: 60px;
  }
  
  /* Mobile button adjustments */
  #workersToggle {
    min-width: 120px !important;
    max-width: 160px !important;
    font-size: 0.8rem !important;
    padding: 0.5rem 1rem !important;
  }
}



/* Responsive */
@media (max-width: 1200px) {
  .hero-section {
    max-width: 95vw;
    padding: 0 1rem;
  }
  
  .main-title {
    font-size: 2.5rem;
  }
  
  .result {
    max-width: 95vw;
    margin: 1rem;
  }
}

@media (max-width: 992px) {
  .main-title {
    font-size: 2.2rem;
  }
  
  .checker {
    flex-direction: column;
    align-items: stretch;
  }
  
  .input-container {
    max-width: 100%;
  }
  
  button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .header-content {
    justify-content: flex-start;
  }
  
  .main-title {
    font-size: 1.8rem;
  }
  
  .subtitle {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  #themeToggle {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    font-size: 1.2rem;
  }
  
  main {
    padding: 1rem;
    margin-top: 0.5rem;
  }
  
  .hero-section {
    margin-bottom: 1.5rem;
  }
  
  .checker-container {
    padding: 1.5rem;
    margin: 0 0 1.5rem 0;
    width: 100%;
    border-radius: 15px;
  }
  
  input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .result {
    max-width: 100%;
    margin: 1rem 0;
    border-radius: 15px;
    overflow-x: auto;
  }
  
  .result table {
    min-width: 100%;
  }
  
  .result th,
  .result td {
    padding: 0.75rem 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Compact columns for mobile */
  .result th:nth-child(3),
  .result td:nth-child(3) {
    min-width: 70px;
    max-width: 100px;
    font-size: 0.8rem;
  }
  
  .result th:nth-child(4),
  .result td:nth-child(4) {
    min-width: 70px;
    max-width: 100px;
    font-size: 0.8rem;
  }
  
  .result th:last-child,
  .result td:last-child {
    min-width: 40px;
    max-width: 60px;
    font-size: 0.8rem;
  }
  
  /* Ensure first two columns are compact on mobile */
  .result th:first-child,
  .result td:first-child {
    min-width: 50px;
    max-width: 80px;
    font-size: 0.8rem;
  }
  
  .result th:nth-child(2),
  .result td:nth-child(2) {
    min-width: 50px;
    max-width: 80px;
    font-size: 0.8rem;
  }
  
  footer {
    padding: 1rem;
  }
  
  .socials {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .socials a {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0.8rem;
    flex-wrap: wrap;
  }
  
  header img {
    height: 35px;
  }
  
  .main-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .main-title::after {
    width: 70px;
    bottom: -5px;
  }
  
  .subtitle {
    font-size: 0.9rem;
  }
  
  #themeToggle {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    font-size: 1rem;
  }
  
  main {
    padding: 0.8rem;
  }
  
  .checker-container {
    padding: 1.2rem;
  }
  
  input {
    padding: 0.9rem 1.2rem;
  }
  
  button {
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .result th,
  .result td {
    padding: 0.6rem 0.6rem;
    font-size: 0.85rem;
  }
  
  /* Ultra-compact summary table for very small screens */
  .result th:nth-child(3),
  .result td:nth-child(3) {
    min-width: 60px;
    max-width: 80px;
    font-size: 0.75rem;
  }
  
  .result th:nth-child(4),
  .result td:nth-child(4) {
    min-width: 60px;
    max-width: 80px;
    font-size: 0.75rem;
  }
  
  .result th:last-child,
  .result td:last-child {
    min-width: 35px;
    max-width: 50px;
    font-size: 0.75rem;
  }
  
  .result th:first-child,
  .result td:first-child {
    min-width: 45px;
    max-width: 70px;
    font-size: 0.75rem;
  }
  
  .result th:nth-child(2),
  .result td:nth-child(2) {
    min-width: 45px;
    max-width: 70px;
    font-size: 0.75rem;
  }
  
  .legend-box {
    padding: 1rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .legend-box div {
    margin-bottom: 0.6rem;
  }
  
  footer {
    padding: 1rem 0.8rem;
  }
  
  .disclaimer {
    font-size: 0.75rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 360px) {
  .header-content {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .main-title {
    font-size: 1.3rem;
  }
  
  .checker-container {
    padding: 1rem;
  }
  
  /* Ultra-compact table for very small screens */
  #workersTable {
    width: calc(100vw - 5px);
    right: 2px;
    bottom: 10px;
  }
  
  #workersTable th,
  #workersTable td {
    padding: 0.3rem 0.2rem;
    font-size: 0.7rem;
  }
  
  /* Minimal column widths for very small screens */
  #workersTable th:first-child,
  #workersTable td:first-child {
    min-width: 45px;
    max-width: 55px;
  }
  
  #workersTable th:nth-child(2),
  #workersTable td:nth-child(2) {
    min-width: 70px;
    max-width: 100px;
  }
  
  #workersTable th:nth-child(3),
  #workersTable td:nth-child(3) {
    min-width: 55px;
    max-width: 75px;
  }
  
  #workersTable th:nth-child(4),
  #workersTable td:nth-child(4) {
    min-width: 55px;
    max-width: 75px;
  }
  
  #workersTable th:last-child,
  #workersTable td:last-child {
    min-width: 45px;
    max-width: 55px;
  }
}

/* ============================================
   ERROR HANDLING & USER FEEDBACK STYLES
   ============================================ */

.error-container {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(239, 68, 68, 0.2);
  animation: slideIn 0.3s ease-out;
}

.error-container.info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(59, 130, 246, 0.2);
}

.error-container.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(245, 158, 11, 0.2);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.error-icon {
  font-size: 1.5rem;
  color: #ef4444;
  flex-shrink: 0;
}

.error-container.info .error-icon {
  color: #3b82f6;
}

.error-container.warning .error-icon {
  color: #f59e0b;
}

.error-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: inherit;
}

.error-suggestions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light .error-suggestions {
  border-top-color: rgba(0, 0, 0, 0.1);
}

.suggestions-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.suggestions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.suggestions-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.85;
}

.suggestions-list li:last-child {
  margin-bottom: 0;
}

.suggestions-list li i {
  color: var(--cyan);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

body.light .suggestions-list li i {
  color: var(--violet);
}

.error-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.retry-button {
  padding: 0.75rem 1.5rem;
  background: rgba(34, 211, 238, 0.15);
  border: 2px solid rgba(34, 211, 238, 0.4);
  border-radius: 12px;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.retry-button:hover {
  background: rgba(34, 211, 238, 0.25);
  border-color: rgba(34, 211, 238, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.3);
}

.retry-button:active {
  transform: translateY(0);
}

body.light .retry-button {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--violet);
}

body.light .retry-button:hover {
  background: rgba(124, 58, 237, 0.25);
  border-color: rgba(124, 58, 237, 0.6);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

/* Enhanced input status error styling */
.input-status.error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.input-status.error::before {
  content: '⚠️';
  font-size: 1rem;
}

.input-status.success::before {
  content: '✓';
  font-size: 1rem;
  margin-right: 0.25rem;
}

/* Loading state improvements */
.input-status.loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Toast notification styles (for future use) */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(15, 10, 35, 0.95);
  border: 2px solid rgba(34, 211, 238, 0.4);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  color: var(--snow);
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  z-index: 10000;
  animation: toastSlideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 400px;
}

body.light .toast {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(124, 58, 237, 0.4);
  color: #1e1e1e;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
}

.toast.warning {
  border-color: rgba(245, 158, 11, 0.4);
}