/* Critical Styles */
:root {
  --font-family: "Intel One Mono", monospace;
  --line-height: 1.2rem;
  --border-thickness: 2px;
  --text-color: #000;
  --text-color-alt: #666;
  --background-color: #fff;
  --background-color-alt: #eee;
  --font-weight-normal: 500;
  --font-weight-medium: 600;
  --font-weight-bold: 800;
}

/* Font Loading Optimization */
@font-face {
  font-family: "Intel One Mono";
  src:
    local("Intel One Mono"),
    url("IntelOneMono-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Intel One Mono";
  src:
    local("Intel One Mono Bold"),
    url("IntelOneMono-Bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  background: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 18px;
  line-height: 1.6;
}

body {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 2rem 2ch;
  max-width: calc(min(120ch, round(down, 100%, 1ch)));
}

/* Dark Mode */
/* Dark Mode */
:root.dark {
  --text-color: #fff;
  --text-color-alt: #aaa;
  --background-color: #000;
  --background-color-alt: #111;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #fff;
    --text-color-alt: #aaa;
    --background-color: #000;
    --background-color-alt: #111;
  }
}

/* Grid System */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.grid .card {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Components */
.header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: var(--border-thickness) solid var(--text-color);
  display: flex;
  flex-direction: column;
}

.nav-links {
  margin-top: 1.25rem;
  line-height: 1;
}

.nav-item {
  display: inline;
  white-space: nowrap;
  color: #9966ff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn {
  background: #1f6feb;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: var(--font-weight-bold);
}

.card {
  border: var(--border-thickness) solid var(--text-color);
  padding: 1.5rem;
  border-radius: 4px;
}

/* Utilities */
.mt-2 {
  margin-top: 0.5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mt-8 {
  margin-top: 2rem;
}
.mt-12 {
  margin-top: 3rem;
}

/* Hover States */
.btn:hover {
  background: #3a84ff;
}
.nav-item:hover {
  color: rgb(20, 255, 243);
  background-color: #282828;
}

/* Mobile Responsive */
@media screen and (max-width: 600px) {
  html {
    font-size: 16px;
  }
  body {
    padding: 1rem;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card {
    padding: 1rem;
  }
  .header {
    text-align: center;
    margin-bottom: 1rem;
  }
  .nav-item {
    font-size: 0.9rem;
  }
}

/* Terminal */
.terminal {
  background: #000;
  color: #33ff33;
  padding: 1rem;
  font-size: 0.875rem;
  white-space: pre-wrap;
  border: var(--border-thickness) solid #33ff33;
}

/* Footer */
footer {
  border-top: 1px solid var(--gray-800);
}

footer a {
  color: var(--gray-400);
  transition: color 0.2s;
}

footer a:hover {
  color: var(--emerald-400);
  text-decoration: none;
}

a {
  color: #9966ff;
  text-decoration: none;
}

a:hover {
  color: rgb(20, 255, 243);
  background-color: #282828;
}

/* Domain Migration Popup */
.migration-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}

.migration-popup {
  background: #111;
  border: var(--border-thickness) solid #9966ff;
  border-radius: 8px;
  padding: 2.5rem 2rem 1.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 40px rgba(153, 102, 255, 0.2);
  animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.migration-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.migration-title {
  font-size: 1.4rem;
  color: #fff;
  margin: 0 0 0.75rem;
  font-weight: var(--font-weight-bold);
}

.migration-text {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 0.5rem;
}

.migration-text strong {
  color: #9966ff;
}

.migration-countdown {
  color: #666;
  font-size: 0.8rem;
  margin: 0 0 1.25rem;
}

.migration-countdown span {
  color: rgb(20, 255, 243);
  font-weight: var(--font-weight-bold);
}

.migration-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.migration-btn {
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: var(--font-weight-bold);
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  border: var(--border-thickness) solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.migration-btn-go {
  background: #9966ff;
  color: #fff;
  border-color: #9966ff;
}

.migration-btn-go:hover {
  background: #b388ff;
  border-color: #b388ff;
  color: #fff;
  box-shadow: 0 0 16px rgba(153, 102, 255, 0.4);
}

.migration-btn-close {
  background: transparent;
  color: #666;
  border-color: #333;
}

.migration-btn-close:hover {
  color: #fff;
  border-color: #666;
  background: #1a1a1a;
}

.migration-progress-bar {
  width: 100%;
  height: 3px;
  background: #222;
  border-radius: 2px;
  overflow: hidden;
}

.migration-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #9966ff, rgb(20, 255, 243));
  border-radius: 2px;
  transition: width 1s linear;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media screen and (max-width: 600px) {
  .migration-popup {
    padding: 2rem 1.25rem 1.25rem;
  }
  .migration-actions {
    flex-direction: column;
  }
  .migration-btn {
    width: 100%;
    text-align: center;
  }
}

::selection {
  color: white;
  background: blueviolet;
}
