:root {
  --bg: #000000;
  --text: #00ff00;
  --text-dim: #008800;
  --amber: #ffb000;
  --red: #ff0000;
  --cyan: #00ffff;
  --border: #00ff00;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.6;
  margin: 0;
  padding: 1rem;
  min-height: 100vh;
}

a {
  color: var(--text);
  text-decoration: underline;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--text-dim);
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

header nav {
  margin-top: 0.5rem;
}

header nav a {
  color: var(--text-dim);
  text-decoration: none;
  margin-right: 1rem;
}

header nav a:hover,
header nav a:focus {
  color: var(--text);
  text-decoration: underline;
}

.btn {
  display: inline-block;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-height: 44px;
  min-width: 44px;
}

.btn:hover,
.btn:focus {
  background: rgba(0, 255, 0, 0.15);
}

.btn-block {
  display: block;
  width: 100%;
}

.input {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text-dim);
  padding: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  min-height: 44px;
}

.input::placeholder {
  color: var(--text-dim);
}

label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-dim);
}

.form-group {
  margin-bottom: 1rem;
}

.broken-link {
  color: var(--red);
  text-decoration: line-through;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.id-highlight {
  background: rgba(255, 176, 0, 0.3);
  padding: 2px 4px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { background: rgba(255, 176, 0, 0.3); }
  50% { background: rgba(255, 176, 0, 0.6); }
}

.terminal {
  background: var(--bg);
  border: 2px solid var(--border);
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
}

.terminal-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  outline: none;
  padding: 0.5rem 0;
  min-height: 44px;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background: var(--text);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.card {
  border: 1px solid var(--text-dim);
  padding: 1rem;
}

.card:hover,
.card:focus-within {
  border-color: var(--text);
}

.card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card a::after {
  content: ' >';
  color: var(--text-dim);
}

.damaged-card {
  border: 2px solid var(--red);
  padding: 1rem;
  cursor: pointer;
  transform: rotate(-1deg);
  opacity: 0.9;
}

.damaged-card:hover,
.damaged-card:focus {
  transform: rotate(0deg);
  opacity: 1;
}

.damaged-card .glitch {
  color: var(--red);
  animation: glitch 0.3s infinite;
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}

.announcement-box {
  border: 1px solid var(--text);
  padding: 1rem;
  white-space: pre-wrap;
  font-size: 0.95rem;
  overflow-x: auto;
}

.chat-message {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.chat-timestamp {
  color: var(--text-dim);
}

.chat-user {
  color: var(--cyan);
}

.broken-image {
  border: 1px dashed var(--red);
  padding: 1rem;
  text-align: center;
  margin: 1rem 0;
  color: var(--red);
}

.broken-x {
  font-size: 1.5rem;
  display: block;
}

.broken-text {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-content {
  border: 2px solid var(--text);
  background: var(--bg);
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: 1px solid var(--text-dim);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.privacy-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 1.5rem;
}

.text-dim {
  color: var(--text-dim);
}

.text-red {
  color: var(--red);
}

.text-amber {
  color: var(--amber);
}

.loading {
  animation: blink 1s step-end infinite;
}

.error-box {
  border: 1px solid var(--red);
  padding: 1rem;
  color: var(--red);
  margin: 1rem 0;
}

.success-box {
  border: 1px solid var(--text);
  padding: 1rem;
  margin: 1rem 0;
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--text-dim);
  font-size: 0.85rem;
  color: var(--text-dim);
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 800px) {
  body {
    padding: 2rem;
  }
}

/* Metro 磁贴 */
.metro-tile {
  background: #fff;
  border: none;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.metro-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e74c3c, #f39c12, #f1c40f, #2ecc71, #3498db, #9b59b6);
}

/* 时间轴 */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #e74c3c, #f39c12, #f1c40f, #2ecc71, #3498db, #9b59b6);
  transform: translateX(-50%);
}

.timeline-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}
