/* ===========================================
   COMPONENTS.CSS - Windows, Cards, Buttons
   =========================================== */

/* ===== WINDOW COMPONENT ===== */
.window {
  background: var(--bg-window);
  border: var(--border-pixel-width) solid var(--accent-primary);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--accent-secondary);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.window:hover {
  transform: translate(-4px, -4px) scale(1.02);
  box-shadow:
    calc(var(--shadow-offset) + 4px) calc(var(--shadow-offset) + 4px) 0 var(--accent-secondary),
    0 0 20px rgba(233, 69, 96, 0.5);
  border-color: var(--accent-tertiary);
}

/* Shine effect on hover */
.window::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 217, 255, 0.3),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 10;
}

.window:hover::before {
  left: 150%;
}

.window__titlebar {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: var(--gap-xs) var(--gap-sm);
  background: var(--accent-primary);
  color: var(--bg-primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.window__titlebar-dots {
  display: flex;
  gap: 4px;
}

.window__titlebar-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--bg-primary);
  background: transparent;
}

.window__titlebar-dot--close { background: var(--bg-primary); }

.window__content {
  padding: var(--gap-md);
}

/* ===== CARD COMPONENT ===== */
.card {
  background: var(--bg-tertiary);
  border: 2px solid var(--text-dim);
  padding: var(--gap-md);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--accent-tertiary);
}

.card--interactive {
  cursor: pointer;
}

.card--interactive:hover {
  background: rgba(0, 217, 255, 0.05);
}

/* ===== BUTTON COMPONENT ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: var(--gap-sm) var(--gap-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border: 2px solid var(--accent-primary);
  background: transparent;
  color: var(--accent-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow:
    0 0 20px var(--accent-primary),
    0 0 40px rgba(233, 69, 96, 0.5);
  transform: translateY(-2px);
}

.btn--filled {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.btn--filled:hover {
  background: transparent;
  color: var(--accent-primary);
  box-shadow:
    0 0 20px var(--accent-primary),
    inset 0 0 20px rgba(233, 69, 96, 0.3);
}

/* ===== TAG/BADGE COMPONENT ===== */
.tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-secondary);
  color: var(--accent-tertiary);
}

/* ===== AVATAR ===== */
.avatar {
  width: 80px;
  height: 80px;
  border: var(--border-pixel-width) solid var(--accent-primary);
  box-shadow: 3px 3px 0 var(--accent-secondary);
  image-rendering: pixelated;
  object-fit: cover;
}

/* ===== TERMINAL OUTPUT ===== */
.terminal-line {
  display: flex;
  gap: var(--gap-sm);
  font-size: 0.9rem;
  margin-bottom: var(--gap-xs);
}

.terminal-line__prompt {
  color: var(--accent-tertiary);
}

.terminal-line__cmd {
  color: var(--text-primary);
}

.terminal-line__output {
  color: var(--text-muted);
  padding-left: 1.5rem;
}

/* ===== ICON GRID ===== */
.icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md);
  justify-content: center;
}

.icon-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-xs);
  padding: var(--gap-sm);
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.icon-grid__item:hover {
  transform: scale(1.2) translateY(-5px);
  filter: drop-shadow(0 0 15px var(--accent-tertiary));
}

.icon-grid__item img,
.icon-grid__item svg {
  width: 40px;
  height: 40px;
  filter: grayscale(100%) brightness(1.5);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.icon-grid__item:hover img,
.icon-grid__item:hover svg {
  filter: grayscale(0%) brightness(1) drop-shadow(0 0 10px currentColor);
  transform: rotate(5deg);
}

.icon-grid__label {
  font-size: 0.7rem;
  color: var(--text-dim);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.icon-grid__item:hover .icon-grid__label {
  color: var(--accent-tertiary);
  text-shadow: 0 0 8px var(--accent-tertiary);
}
