/* Dracula Theme Colors */
:root {
  --background: #282a36;
  --current-line: #44475a;
  --selection: #44475a;
  --foreground: #f8f8f2;
  --comment: #6272a4;
  --cyan: #8be9fd;
  --green: #50fa7b;
  --orange: #ffb86c;
  --pink: #ff79c6;
  --purple: #bd93f9;
  --red: #ff5555;
  --yellow: #f1fa8c;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: #1a1d29;
  color: var(--foreground);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Particles background */
#particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Header */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(26, 29, 41, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--current-line);
  padding: 1rem 2rem;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.logo-bracket {
  color: var(--purple);
  font-size: 1.5rem;
}

.logo-text {
  color: var(--cyan);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--comment);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.nav-link:hover {
  color: var(--cyan);
  background: rgba(139, 233, 253, 0.1);
}

.nav-link svg {
  width: 18px;
  height: 18px;
}

/* Footer */
.page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(26, 29, 41, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--current-line);
  padding: 0.75rem 2rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--comment);
}

.heart {
  color: var(--pink);
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.footer-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.stat {
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.app {
  min-height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
  padding-bottom: 60px;
}

.terminal-container {
  width: min(1200px, 95vw);
  height: min(700px, 80vh);
  background: #1e1f29;
  border: 1px solid var(--current-line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  resize: none;
  min-width: 320px;
  min-height: 400px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  z-index: 200;
}

.resize-handle {
  position: absolute;
  z-index: 10;
}

.resize-handle.top {
  top: 0;
  left: 10px;
  right: 10px;
  height: 5px;
  cursor: ns-resize;
}

.resize-handle.bottom {
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 5px;
  cursor: ns-resize;
}

.resize-handle.left {
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 5px;
  cursor: ew-resize;
}

.resize-handle.right {
  right: 0;
  top: 10px;
  bottom: 10px;
  width: 5px;
  cursor: ew-resize;
}

.resize-handle.top-left {
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  cursor: nwse-resize;
}

.resize-handle.top-right {
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  cursor: nesw-resize;
}

.resize-handle.bottom-left {
  bottom: 0;
  left: 0;
  width: 10px;
  height: 10px;
  cursor: nesw-resize;
}

.resize-handle.bottom-right {
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  cursor: nwse-resize;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #191a22;
  border-bottom: 1px solid var(--current-line);
  cursor: move;
  user-select: none;
}

.traffic-lights {
  display: flex;
  gap: 8px;
}
.traffic-lights .light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.traffic-lights .red { background: #ff5f56; }
.traffic-lights .yellow { background: #ffbd2e; }
.traffic-lights .green { background: #27c93f; }

.terminal-title {
  color: var(--comment);
  font-size: 13px;
}

.terminal {
  padding: 16px;
  flex: 1;
  overflow: auto;
  background: var(--background);
  line-height: 1.8;
  scroll-behavior: smooth;
}

.line { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.prompt { color: var(--green); }
.path { color: var(--purple); }
.caret { color: var(--cyan); }
.input { 
  flex: 1; 
  min-width: 30px; 
  white-space: pre-wrap; 
  word-break: break-word;
  outline: none;
  border: none;
  background: transparent;
}
.input:focus {
  outline: none;
  border: none;
}

.output { color: var(--foreground); margin-bottom: 2px; }
.output .muted { color: var(--comment); }
.output .ok { color: var(--green); }
.output .error { color: var(--red); }

.token-cmd { color: var(--pink); }
.token-arg { color: var(--orange); }

.hint {
  margin-top: 8px;
  color: var(--comment);
  font-size: 12px;
}

/* Scrollbar styling */
.terminal::-webkit-scrollbar { width: 10px; }
.terminal::-webkit-scrollbar-thumb { background: var(--current-line); border-radius: 6px; }
.terminal::-webkit-scrollbar-track { background: #1e1f29; }

/* Selection */
::selection { background: var(--selection); color: var(--foreground); }

/* Responsive Design */
@media (max-width: 1024px) {
  .terminal-container {
    width: 90vw;
    height: 75vh;
    min-width: 320px;
  }
  
  .page-header {
    padding: 0.75rem 1rem;
  }
  
  .logo {
    font-size: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .nav-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .terminal-container {
    width: 95vw;
    height: 70vh;
    min-width: 280px;
    border-radius: 6px;
    resize: none;
  }
  
  .terminal {
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
  }
  
  .terminal-header {
    padding: 8px 12px;
  }
  
  .terminal-title {
    font-size: 11px;
  }
  
  .traffic-lights .light {
    width: 10px;
    height: 10px;
  }
  
  .page-header {
    padding: 0.5rem 1rem;
  }
  
  .logo {
    font-size: 0.9rem;
  }
  
  .logo-bracket {
    font-size: 1.2rem;
  }
  
  /* Hide text, show only icon */
  .nav-link {
    padding: 0.5rem;
    font-size: 0;
  }
  
  .nav-link svg {
    width: 20px;
    height: 20px;
  }
  
  .page-footer {
    padding: 0.5rem 1rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  .footer-text {
    font-size: 0.75rem;
  }
  
  .footer-stats {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .terminal-container {
    width: 98vw;
    height: 65vh;
    min-width: 280px;
    border-radius: 4px;
  }
  
  .terminal {
    padding: 10px;
    font-size: 13px;
    line-height: 1.5;
  }
  
  .terminal-header {
    gap: 8px;
    padding: 6px 10px;
  }
  
  .terminal-title {
    font-size: 10px;
  }
  
  .traffic-lights {
    gap: 6px;
  }
  
  .traffic-lights .light {
    width: 8px;
    height: 8px;
  }
  
  .page-header {
    padding: 0.5rem 0.75rem;
  }
  
  .logo {
    font-size: 0.8rem;
  }
  
  .logo-bracket {
    font-size: 1rem;
  }
  
  /* Icon only, smaller */
  .nav-link {
    padding: 0.4rem;
  }
  
  .nav-link svg {
    width: 18px;
    height: 18px;
  }
  
  .page-footer {
    padding: 0.4rem 0.75rem;
  }
  
  .footer-text,
  .footer-stats {
    font-size: 0.7rem;
  }
  
  /* Hide particles on very small screens for performance */
  #particles-bg {
    opacity: 0.3;
  }
}
