:root {
  --ibi-cyan: #00c5ff;
  --ibi-cyan-dark: #007ea4;
  --header-bg: #000000;
  --page-bg: #f1f6f9;
  --surface: #ffffff;
  --surface-alt: #eaf3f7;
  --text: #14202a;
  --text-muted: #5b6973;
  --line: #d7e3e9;
  --shadow: 0 12px 32px rgba(9, 31, 45, 0.08);
  --card-shadow: 0 10px 22px rgba(9, 31, 45, 0.06);
  --focus-ring: rgba(0, 197, 255, 0.4);
}

[data-theme="dark"] {
  --page-bg: #071017;
  --surface: #101d26;
  --surface-alt: #162832;
  --text: #eef8fc;
  --text-muted: #a1b4be;
  --line: #213741;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.32);
  --card-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: "Roboto", Arial, sans-serif;
  background: var(--page-bg);
}

body {
  min-width: 280px;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--page-bg);
  font-family: "Roboto", Arial, sans-serif;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 28px;
  padding: 28px clamp(16px, 5vw, 64px) 42px;
  background: var(--header-bg);
  color: #ffffff;
}

.site-header::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% -18%, rgba(0, 197, 255, 0.2), transparent 48%),
    linear-gradient(105deg, transparent 42%, rgba(0, 197, 255, 0.05) 50%, transparent 58%);
  pointer-events: none;
}

.top-controls {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid rgba(0, 197, 255, 0.42);
  border-radius: 999px;
  color: var(--ibi-cyan);
  background: rgba(0, 197, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 500;
}

.version-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}

.theme-text {
  color: #d3e0e6;
  font-size: 0.91rem;
  font-weight: 500;
}

.theme-checkbox {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.toggle-track {
  width: 50px;
  height: 28px;
  padding: 3px;
  display: block;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #24313a;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.toggle-thumb {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 180ms ease;
}

.theme-checkbox:focus-visible + .toggle-track {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.theme-checkbox:checked + .toggle-track {
  border-color: var(--ibi-cyan);
  background: var(--ibi-cyan-dark);
}

.theme-checkbox:checked + .toggle-track .toggle-thumb {
  transform: translateX(22px);
}

.brand-section {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 36px);
  width: min(1040px, 100%);
}

.company-logo {
  display: block;
  flex: 0 0 auto;
  width: clamp(106px, 15vw, 148px);
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0, 197, 255, 0.2));
}

.brand-copy {
  text-align: left;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--ibi-cyan);
  font-size: clamp(0.72rem, 1.5vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ibi-cyan);
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 12px 0 0;
  color: #c5d4dc;
  font-size: clamp(0.95rem, 2vw, 1.08rem);
}

.clock-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(470px, 100%);
  padding: 16px 22px 18px;
  border: 1px solid rgba(0, 197, 255, 0.23);
  border-radius: 18px;
  background: rgba(7, 17, 23, 0.72);
}

.clock-label {
  margin-bottom: 5px;
  color: #99adb7;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.clock-time {
  margin: 0;
  color: var(--ibi-cyan);
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.clock-date {
  margin: 6px 0 0;
  color: #e5edf1;
  font-size: clamp(0.87rem, 2.2vw, 0.96rem);
}

.main-content {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 38px) clamp(14px, 4vw, 30px) 42px;
}

.tools-section {
  padding: clamp(14px, 2.5vw, 24px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: clamp(17px, 3vw, 22px) clamp(18px, 3.5vw, 26px);
  border-radius: 17px;
  background: #000000;
}

h2 {
  margin: 0;
  color: var(--ibi-cyan);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
}

.tools-count {
  margin: 0;
  padding: 9px 13px;
  border: 1px solid rgba(0, 197, 255, 0.26);
  border-radius: 999px;
  color: #c7dbe3;
  font-size: 0.85rem;
  white-space: nowrap;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 17px);
}

.tool-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 104px;
  padding: 20px 17px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tool-card::before {
  position: absolute;
  left: -1px;
  top: 21px;
  bottom: 21px;
  width: 3px;
  border-radius: 4px;
  content: "";
  background: var(--ibi-cyan);
  opacity: 0;
  transition: opacity 180ms ease;
}

.tool-card:hover {
  border-color: rgba(0, 197, 255, 0.48);
  box-shadow: 0 15px 28px rgba(0, 141, 187, 0.13);
  transform: translateY(-2px);
}

.tool-card:hover::before,
.tool-card:focus-visible::before {
  opacity: 1;
}

.tool-card:focus-visible {
  border-color: var(--ibi-cyan);
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.tool-number {
  position: absolute;
  top: 8px;
  right: 13px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(0, 197, 255, 0.3);
  border-radius: 12px;
  color: var(--ibi-cyan-dark);
  background: rgba(0, 197, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

[data-theme="dark"] .tool-icon {
  color: var(--ibi-cyan);
}

.tool-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.tool-name {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.28;
}

.tool-description {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.launch-icon {
  align-self: end;
  margin-top: 24px;
  color: var(--ibi-cyan-dark);
  font-size: 1.23rem;
  font-weight: 700;
}

[data-theme="dark"] .launch-icon {
  color: var(--ibi-cyan);
}

.site-footer {
  padding: 0 18px 27px;
  color: var(--text-muted);
  font-size: 0.84rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 25px;
    padding: 17px 15px 30px;
  }

  .top-controls {
    align-items: flex-start;
  }

  .version-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 7px 11px;
  }

  .theme-text {
    display: none;
  }

  .brand-section {
    flex-direction: column;
    gap: 16px;
  }

  .brand-copy {
    text-align: center;
  }

  .company-logo {
    width: 112px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 14px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 91px;
    padding: 19px 16px 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition: none !important;
  }
}
