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

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #07090e;
  color: #f1f5f9;
  font-family: 'JetBrains Mono', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Background grid */
.bg-grid {
  position: absolute;
  inset: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 1;
}

/* Ambient radial glow in center */
.ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  max-width: 95vw;
  max-height: 95vh;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(167, 139, 250, 0.05) 35%, rgba(7, 9, 14, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

/* Perfectly Centered Viewport Wrapper */
.viewport-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 900px;
  max-height: 100vh;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: auto;
}

/* Brand Section */
.brand-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
}

.brand-title {
  font-size: clamp(2.5rem, 6.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #ffffff;
  user-select: none;
}

.brand-name {
  color: #f8fafc;
}

.brand-tld {
  color: #38bdf8;
  transition: all 0.25s ease;
}

.brand-title:hover .brand-tld {
  color: #7dd3fc;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse-glow 2s infinite ease-in-out;
}

.status-text {
  font-size: 0.68rem;
  font-weight: 500;
  color: #94a3b8;
}

/* Fancy Terminal Window */
.terminal-window {
  width: 100%;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.85), 0 0 35px -10px rgba(56, 189, 248, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.3s ease;
  text-align: left;
}

.terminal-window:hover {
  border-color: rgba(56, 189, 248, 0.28);
}

/* Terminal Title Bar */
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(15, 21, 35, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.control-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.control-dot.close { background: #ef4444; }
.control-dot.minimize { background: #f59e0b; }
.control-dot.maximize { background: #10b981; }

.terminal-title {
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.03em;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.5rem;
}

.terminal-action-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  letter-spacing: 0.08em;
}

/* Terminal Body */
.terminal-body {
  height: clamp(230px, 44vh, 370px);
  padding: 1rem 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: clamp(0.74rem, 1.4vw, 0.83rem);
  line-height: 1.5;
  scroll-behavior: smooth;
}

.terminal-body::-webkit-scrollbar {
  width: 4px;
}
.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.term-line {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  word-break: break-word;
  animation: fadeInLine 0.15s ease-out;
}

.term-time {
  color: #475569;
  font-size: 0.7rem;
  flex-shrink: 0;
  user-select: none;
}

.term-text {
  color: #cbd5e1;
}

/* Terminal Prompt Line */
.terminal-prompt-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(8, 11, 18, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.prompt-text {
  color: #94a3b8;
  font-weight: 500;
}

/* Blinking Cursor */
.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: #38bdf8;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

/* Syntax Color Tokens */
.hl-prompt { color: #38bdf8; font-weight: 600; }
.hl-green { color: #34d399; font-weight: 600; }
.hl-cyan { color: #38bdf8; }
.hl-purple { color: #c084fc; font-weight: 500; }
.hl-yellow { color: #fbbf24; }
.hl-blue { color: #60a5fa; }
.hl-dim { color: #64748b; }

/* Keyframe Animations */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; transform: scale(0.85); }
}

@keyframes fadeInLine {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}
