/* ===================================
   Terminal Site Styles - Minimalistic
   buildwithmisbah.cc
   =================================== */

/* CSS Variables - Minimalistic Theme */
:root {
  --primary-color: #6b7280;
  --secondary-color: #9ca3af;
  --accent-color: #4f46e5;
  --error-red: #ef4444;
  --warning-yellow: #f59e0b;
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --bg-dark: rgba(0, 0, 0, 0.95);
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: #374151;
  --terminal-font: "Monaco", "Consolas", "Courier New", monospace;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--terminal-font);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Canvas Background */
#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.4;
  transition: opacity 0.5s ease;
}

#canvas.interactive {
  opacity: 1;
  z-index: 5;
  cursor: grab;
}

#canvas.interactive:active {
  cursor: grabbing;
}

/* Loading Screen */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.terminal-loader {
  text-align: center;
}

.loader-text {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 20px;
  display: block;
  letter-spacing: 0.1em;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: var(--border-color);
  overflow: hidden;
  margin: 0 auto 10px;
}

.loader-progress {
  height: 100%;
  background: var(--accent-color);
  width: 0;
  animation: loadProgress 2s ease-out forwards;
}

.loader-status {
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0.6;
}

@keyframes loadProgress {
  to { width: 100%; }
}

/* Navigation - Minimalistic */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  padding: 20px 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

nav.hidden {
  opacity: 0;
  pointer-events: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-icon {
  display: none;
}

/* 3D Scene Control - Minimalistic */
.scene-control {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0.5;
}

.scene-control:hover {
  opacity: 1;
  border-color: var(--text-secondary);
}

.scene-control.active {
  background: var(--bg-secondary);
  border-color: var(--accent-color);
  opacity: 1;
  transform: scale(1.1);
}

.scene-control svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  transition: all 0.3s ease;
}

.scene-control:hover svg {
  stroke: var(--text-primary);
}

.scene-control.active svg {
  stroke: var(--accent-color);
  animation: rotate3d 2s linear infinite;
}

@keyframes rotate3d {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.control-hint {
  display: none;
}

/* Main Terminal */
.terminal-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 50px;
  position: relative;
  z-index: 1;
  transition: all 0.5s ease;
}

.terminal-main.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.terminal-container {
  max-width: 800px;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.terminal-container.maximized {
  position: fixed;
  top: 80px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: none;
  width: auto;
  z-index: 999;
}

.terminal-container.minimized {
  transform: scale(0.95);
  opacity: 0.9;
}

/* Terminal Header */
.terminal-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.terminal-actions {
  display: none;
}

/* Terminal Content */
.terminal-content {
  padding: 30px;
  min-height: 400px;
  max-height: 500px;
  overflow-y: auto;
  background: transparent;
  color: var(--text-primary);
}

.terminal-content::-webkit-scrollbar {
  width: 6px;
}

.terminal-content::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.terminal-output {
  margin-bottom: 20px;
}

.terminal-line {
  margin-bottom: 10px;
  line-height: 1.4;
}

/* ASCII Art */
.ascii-art {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1;
  display: block;
  margin-bottom: 20px;
  white-space: pre;
  font-family: monospace;
}

/* Message Types */
.system-message {
  color: var(--text-secondary);
}

.info-message {
  color: var(--text-muted);
}

.error-message {
  color: var(--error-red);
}

.warning-message {
  color: var(--warning-yellow);
}

.success-message {
  color: var(--accent-color);
}

/* Terminal Input */
.terminal-input-line {
  display: flex;
  align-items: center;
  position: relative;
}

.prompt {
  color: var(--text-muted);
  margin-right: 10px;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  caret-color: transparent;
}

.terminal-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.cursor {
  color: var(--text-muted);
  animation: blink 1s infinite;
  position: absolute;
  pointer-events: none;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Autocomplete Suggestions */
.autocomplete-suggestions {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 10;
}

.autocomplete-suggestions.show {
  display: block;
}

.suggestion {
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.suggestion:hover,
.suggestion.selected {
  background: var(--bg-primary);
  padding-left: 20px;
}

.suggestion-command {
  color: var(--text-primary);
}

.suggestion-description {
  color: var(--text-muted);
  font-size: 11px;
}

/* Terminal Animations */
.terminal-animations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.terminal-icon {
  position: absolute;
  font-size: 32px;
  animation: iconPop 2s ease-out forwards;
  pointer-events: none;
  opacity: 0.5;
}

@keyframes iconPop {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 0.5;
  }
  100% {
    transform: scale(1) rotate(360deg) translateY(-100px);
    opacity: 0;
  }
}

/* Matrix Rain Animation */
.matrix-rain {
  position: absolute;
  color: var(--text-muted);
  font-family: monospace;
  font-size: 16px;
  animation: matrixFall 3s linear infinite;
  pointer-events: none;
  opacity: 0.2;
}

@keyframes matrixFall {
  0% {
    transform: translateY(-100vh);
    opacity: 0.2;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Quick Actions - Minimalistic */
.quick-actions {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  justify-content: center;
  transition: all 0.5s ease;
}

.quick-actions.hidden {
  opacity: 0;
  pointer-events: none;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.action-btn:hover {
  opacity: 1;
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.btn-icon {
  font-size: 16px;
}

.btn-text {
  font-size: 11px;
  font-weight: 400;
}

.btn-arrow {
  display: none;
}

/* Floating Hint */
.floating-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  opacity: 0;
  animation: floatHint 5s ease-in-out infinite;
  z-index: 100;
  transition: all 0.5s ease;
}

.floating-hint.hidden {
  display: none;
}

@keyframes floatHint {
  0%, 80%, 100% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  10%, 70% {
    opacity: 0.6;
    transform: translateX(-50%) translateY(0);
  }
}

/* Help Grid */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}

.help-grid > div {
  padding: 4px;
}


/* Responsive */
@media (max-width: 768px) {
  nav {
    padding: 15px 20px;
  }

  .nav-brand {
    font-size: 12px;
  }

  .terminal-main {
    padding: 80px 15px 40px;
  }

  .terminal-container {
    border-radius: 0;
  }

  .terminal-content {
    padding: 20px;
    font-size: 13px;
  }

  .ascii-art {
    font-size: 8px;
  }

  .scene-control {
    width: 36px;
    height: 36px;
    bottom: 20px;
    right: 20px;
  }

  .quick-actions {
    flex-direction: column;
    width: 100%;
    padding: 0 20px;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }
}