/* Terminal Noir Theme - Main Application */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --bg-deep: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a24;
  --cyan: #00f5d4;
  --cyan-dim: #00f5d450;
  --cyan-glow: #00f5d430;
  --magenta: #ff006e;
  --magenta-dim: #ff006e50;
  --text-primary: #e0e0e0;
  --text-dim: #666;
  --green: #00ff88;
  --red: #ff3366;
  --yellow: #ffcc00;
  --border-color: #2a2a3a;
}

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

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated grid background */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--cyan-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--cyan-dim) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.05;
  animation: gridMove 30s linear infinite;
  z-index: 0;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Scanline overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.05) 2px,
    rgba(0, 0, 0, 0.05) 4px
  );
  pointer-events: none;
  z-index: 100;
}

/* App Container */
.app-container {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  box-shadow: 0 0 20px var(--cyan-glow);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}

.app-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 10px var(--cyan-dim);
}

.terminal-btn-sm {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.terminal-btn-sm:hover {
  background: var(--red);
  color: var(--bg-deep);
  box-shadow: 0 0 15px var(--magenta-dim);
}

/* Panels */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  animation: fadeIn 0.5s ease-out;
}

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

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--bg-card-hover) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border-color);
}

.prompt {
  color: var(--cyan);
  font-weight: 700;
}

.panel-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.panel-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--magenta);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.panel-content {
  padding: 16px;
}

/* User Panel */
.profile-grid {
  display: grid;
  gap: 12px;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-item .label {
  color: var(--text-dim);
  font-size: 0.85rem;
  min-width: 80px;
}

.profile-item .value {
  color: var(--cyan);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator {
  padding: 2px 8px;
  background: rgba(0, 255, 136, 0.2);
  color: var(--green);
  font-size: 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--green);
}

.status-indicator.expiring {
  background: rgba(255, 204, 0, 0.2);
  color: var(--yellow);
  border-color: var(--yellow);
}

.status-indicator.expired {
  background: rgba(255, 51, 102, 0.2);
  color: var(--red);
  border-color: var(--red);
}

/* Summaries Panel */
.summaries-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-card {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  transition: all 0.3s ease;
  animation: cardSlideIn 0.5s ease-out;
  animation-fill-mode: both;
}

.summary-card:nth-child(1) { animation-delay: 0.1s; }
.summary-card:nth-child(2) { animation-delay: 0.2s; }
.summary-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.summary-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 15px var(--cyan-glow);
}

.summary-header {
  margin-bottom: 12px;
}

.summary-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.summary-author {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.summary-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  margin: 12px 0;
}

.summary-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.summary-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.summary-timestamp {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.summary-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  background: transparent;
  border: 1px solid var(--cyan-dim);
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: var(--cyan);
  color: var(--bg-deep);
}

/* MFE Panel */
.mfe-panel .panel-content {
  display: flex;
  justify-content: center;
  padding: 24px;
}

/* Status Bar */
.status-bar {
  margin-top: auto;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.status-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.cursor {
  color: var(--cyan);
  animation: cursorBlink 1s step-end infinite;
}

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

/* Responsive */
@media (max-width: 600px) {
  .app-container {
    padding: 10px;
  }

  .app-header {
    flex-direction: column;
    gap: 12px;
  }

  .app-title {
    font-size: 1rem;
  }

  .summary-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
