@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

:root {
  /* Lipgloss-inspired color palette */
  --primary: #F25D94;
  --secondary: #FFAAB7;
  --accent: #04B575;
  --muted: #9CA3AF;
  --text: #FAFAFA;
  --text-dim: #D1D5DB;
  --bg-primary: #0D1117;
  --bg-secondary: #161B22;
  --bg-tertiary: #21262D;
  --border: #30363D;
  --border-bright: #F25D94;
  --shadow: rgba(242, 93, 148, 0.25);
  --terminal-bg: rgba(13, 17, 23, 0.95);
}

* {
  box-sizing: border-box;
}

body, html {
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 25% 25%, var(--bg-secondary) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, var(--bg-tertiary) 0%, transparent 50%);
  background-attachment: fixed;
  font-family: 'JetBrains Mono', 'Source Code Pro', monospace;
  color: var(--text);
  position: relative;
  min-height: 100vh;
}

/* Subtle animated background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(242, 93, 148, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(4, 181, 117, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 170, 183, 0.02) 0%, transparent 50%);
  animation: float 30s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

.terminal {
  height: 100%;
  padding: 24px;
  position: relative;
}

#terminal {
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--terminal-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    0 0 0 1px var(--shadow);
  backdrop-filter: blur(12px);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Subtle terminal glow effect */
#terminal::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 9px;
  z-index: -1;
  opacity: 0.1;
  filter: blur(2px);
}

/* Terminal header accent */
#terminal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
  opacity: 0.6;
}

/* Xterm.js overrides for glow theme */
.xterm {
  font-family: 'JetBrains Mono', 'Source Code Pro', monospace !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

.xterm .xterm-viewport {
  background: transparent !important;
}

.xterm .xterm-screen {
  background: transparent !important;
}

/* Lipgloss-inspired terminal colors */
.xterm-color-1 { color: var(--primary) !important; }
.xterm-color-2 { color: var(--accent) !important; }
.xterm-color-3 { color: var(--secondary) !important; }
.xterm-color-4 { color: #7C3AED !important; }
.xterm-color-5 { color: var(--primary) !important; }
.xterm-color-6 { color: #06B6D4 !important; }
.xterm-color-7 { color: var(--text) !important; }
.xterm-color-8 { color: var(--muted) !important; }

/* Refined cursor styling */
.xterm .xterm-cursor {
  background-color: var(--primary) !important;
  animation: cursor-pulse 1.2s ease-in-out infinite;
}

@keyframes cursor-pulse {
  0%, 100% { 
    opacity: 1;
  }
  50% { 
    opacity: 0.3;
  }
}

/* Clean selection styling */
.xterm .xterm-selection div {
  background-color: rgba(242, 93, 148, 0.2) !important;
}

/* Clean scrollbar styling */
.xterm .xterm-viewport::-webkit-scrollbar {
  width: 6px;
}

.xterm .xterm-viewport::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

.xterm .xterm-viewport::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.xterm .xterm-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Responsive design for better large screen support */
@media (min-width: 1400px) {
  .terminal {
    padding: 48px;
  }
  
  #terminal {
    max-width: 1400px;
    padding: 32px;
  }
}

@media (max-width: 768px) {
  .terminal {
    padding: 16px;
  }
  
  #terminal {
    padding: 20px;
    border-radius: 6px;
    max-width: none;
  }
  
  .xterm {
    font-size: 13px !important;
  }
}

@media (max-width: 480px) {
  .terminal {
    padding: 8px;
  }
  
  #terminal {
    padding: 16px;
  }
  
  .xterm {
    font-size: 12px !important;
  }
}

/* Text glow animations */
@keyframes glow-pulse {
  0%, 100% { 
    opacity: 1;
    text-shadow: 0 0 20px currentColor;
  }
  50% { 
    opacity: 0.8;
    text-shadow: 0 0 30px currentColor, 0 0 40px currentColor;
  }
}

@keyframes subtle-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-2px); }
}

.glow-text {
  animation: glow-pulse 2s ease-in-out infinite;
  text-shadow: 0 0 20px currentColor;
}

/* Terminal content animations */
.xterm .xterm-rows > div {
  animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
  from { 
    opacity: 0;
    transform: translateY(5px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle hover effects */
#terminal:hover {
  border-color: var(--border-bright);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    0 0 0 1px var(--shadow),
    0 0 20px rgba(242, 93, 148, 0.1);
  transition: all 0.3s ease;
}

/* Clean text selection */
::selection {
  background: rgba(242, 93, 148, 0.3);
  color: var(--text);
}

::-moz-selection {
  background: rgba(242, 93, 148, 0.3);
  color: var(--text);
}