/* ===== CSS Variables ===== */
:root {
  --green: #00ff41;
  --green-dim: #00cc33;
  --green-dark: #003300;
  --green-glow: rgba(0, 255, 65, 0.3);
  --cyan: #00e5ff;
  --red: #ff0040;
  --yellow: #ffd600;
  --bg: #0a0a0a;
  --bg-card: #0d1117;
  --bg-card-hover: #111820;
  --border: #1a2a1a;
  --text: #b0b0b0;
  --text-dim: #666;
  --font-mono: 'Courier New', 'Source Code Pro', monospace;
  --font-main: -apple-system, 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

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

.hidden { display: none !important; }

/* ===== Matrix Background ===== */
#matrix-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.08;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}

.logo-bracket { color: var(--cyan); }
.nav-cursor { animation: blink 1s step-end infinite; }

.nav-phone {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.phone-icon { font-size: 1rem; }

.phone-number {
  color: var(--green) !important;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 0 10px var(--green-glow);
  text-decoration: none;
  animation: pulse-phone 2s ease-in-out infinite;
}
.phone-number:hover {
  text-decoration: none;
  text-shadow: 0 0 20px var(--green-glow), 0 0 40px var(--green-glow);
}

@keyframes pulse-phone {
  0%, 100% { text-shadow: 0 0 10px var(--green-glow); }
  50% { text-shadow: 0 0 20px var(--green-glow), 0 0 40px var(--green-glow); }
}

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 2px;
  transition: all 0.3s;
  letter-spacing: 1px;
}
.nav-link:hover, .nav-link.active {
  color: var(--green);
  border-color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
  text-decoration: none;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--green-dim);
}

.status-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 6rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-content {
  width: 100%;
  max-width: 900px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(13, 17, 23, 0.85);
  box-shadow: 0 0 40px rgba(0, 255, 65, 0.05);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #161b22;
  border-bottom: 1px solid var(--border);
}

.terminal-dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  flex: 1;
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
}

.terminal-line {
  color: var(--green);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.prompt { color: var(--cyan); margin-right: 0.5rem; }

.terminal-output { margin-bottom: 1rem; }

/* Glitch Effect */
.hero-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow);
  margin-bottom: 0.5rem;
}

.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.glitch::before {
  animation: glitch-1 2s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  color: var(--cyan);
}
.glitch::after {
  animation: glitch-2 3s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  color: var(--red);
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-dim);
}

/* Hero Phone */
.hero-phone {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 255, 65, 0.08);
  border: 1px solid var(--green-dim);
  border-radius: 4px;
  margin-top: 0.25rem;
  transition: all 0.3s;
}
.hero-phone:hover {
  background: rgba(0, 255, 65, 0.15);
  box-shadow: 0 0 30px var(--green-glow);
  text-decoration: none;
}

.hero-phone-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-phone-number {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--green);
  text-shadow: 0 0 15px var(--green-glow);
  animation: pulse-phone 2s ease-in-out infinite;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--green-dark);
  color: var(--green);
  border: 1px solid var(--green-dim);
  border-radius: 2px;
}

.typing { color: var(--green); }

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

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  z-index: 1;
}

.stat {
  text-align: center;
  color: var(--green);
  font-family: var(--font-mono);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  text-shadow: 0 0 15px var(--green-glow);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-alt {
  background: rgba(13, 17, 23, 0.3);
  border-radius: 16px;
  margin: 2rem auto;
}

.section-header { text-align: center; margin-bottom: 3rem; }

.section-icon { font-size: 2rem; }

.section-title {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--green);
  text-shadow: 0 0 15px var(--green-glow);
  margin: 0.5rem 0;
}

.title-accent { color: var(--cyan); }

.section-line {
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  margin: 1rem auto;
}

.section-desc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ===== News ===== */
.news-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--green);
}

.news-card:hover {
  border-color: var(--green-dim);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
  transform: translateY(-2px);
}

.news-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: var(--green-dark);
  color: var(--green);
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

.news-title {
  font-size: 1.05rem;
  color: #e0e0e0;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.news-summary {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.news-updated, .prices-updated {
  text-align: center;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.updated-icon { color: var(--green); animation: spin 2s linear infinite; display: inline-block; }

/* ===== Prices ===== */
.price-filters {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s;
}
.filter-btn:hover, .filter-btn.active {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-dark);
}

.price-table {
  display: grid;
  gap: 0.75rem;
}

.price-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 100px 80px 100px;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: all 0.3s;
}
.price-row:hover {
  border-color: var(--green-dim);
  background: var(--bg-card-hover);
}

.price-row.header {
  color: var(--cyan);
  font-weight: bold;
  background: #161b22;
  border-color: var(--border);
}

.price-category {
  color: var(--cyan);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.price-name { color: #e0e0e0; }
.price-value { color: var(--green); font-weight: bold; font-size: 1rem; }
.price-change { font-size: 0.8rem; }
.price-change.down { color: var(--green); }
.price-change.up { color: var(--red); }
.price-shop { color: var(--text-dim); font-size: 0.75rem; }
.price-date { color: var(--text-dim); font-size: 0.7rem; }

/* ===== Repair ===== */
.repair-container {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
}

.repair-form-wrapper {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}

.repair-form, .repair-success { padding: 2rem; }

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

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--green);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #0a0e12;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: #e0e0e0;
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: border-color 0.3s;
}
.form-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}
.form-input::placeholder { color: var(--text-dim); }

.form-textarea { resize: vertical; min-height: 100px; }

select.form-input { cursor: pointer; }
select.form-input option { background: #0a0e12; color: #e0e0e0; }

.radio-group { display: flex; gap: 1.5rem; margin-top: 0.4rem; }

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}
.radio-label input { display: none; }
.radio-custom {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-radius: 50%;
  position: relative;
  transition: all 0.3s;
}
.radio-label input:checked + .radio-custom {
  border-color: var(--green);
}
.radio-label input:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.btn-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--green-dark);
  color: var(--green);
  border: 1px solid var(--green-dim);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-submit:hover {
  background: rgba(0, 255, 65, 0.15);
  box-shadow: 0 0 20px var(--green-glow);
}

.btn-glitch { display: none; }
.btn-submit:hover .btn-glitch { display: inline; }
.btn-submit:hover .btn-text { display: none; }

/* Repair Success */
.repair-success { text-align: center; padding: 3rem 2rem; }
.success-icon {
  width: 60px; height: 60px;
  background: var(--green-dark);
  color: var(--green);
  font-size: 2rem;
  line-height: 60px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 2px solid var(--green);
}
.repair-success h3 { color: var(--green); font-size: 1.5rem; margin-bottom: 0.5rem; }
.repair-success p { color: var(--text); margin-bottom: 0.5rem; }
.ticket-id {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 1.1rem;
  margin: 1rem 0 2rem;
}

/* Repair Info */
.repair-info { display: flex; flex-direction: column; gap: 1.5rem; }

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}
.info-card h3 {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 1rem;
  margin-bottom: 1rem;
}
.info-card p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.process-steps { display: flex; flex-direction: column; gap: 0.25rem; }
.step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.step-num {
  color: var(--cyan);
  font-weight: bold;
  font-size: 0.75rem;
  min-width: 24px;
}
.step-arrow { text-align: center; color: var(--green-dim); font-size: 0.7rem; }

/* ===== Shop ===== */
.shop-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--green-dim);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
  transform: translateY(-3px);
}

.product-image {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px var(--green-glow));
}

.product-name {
  font-size: 0.95rem;
  color: #e0e0e0;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.product-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.5;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 1.2rem;
  font-weight: bold;
}
.product-original-price {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.product-stock {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.btn-add-cart {
  padding: 0.5rem 1rem;
  background: var(--green-dark);
  color: var(--green);
  border: 1px solid var(--green-dim);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-add-cart:hover {
  background: rgba(0, 255, 65, 0.2);
  box-shadow: 0 0 10px var(--green-glow);
}

/* ===== Cart Modal ===== */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
}
.modal-close:hover { color: var(--red); }

.cart-items {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.cart-item-name { color: #e0e0e0; flex: 1; }
.cart-item-qty { color: var(--cyan); margin: 0 1rem; }
.cart-item-price { color: var(--green); font-weight: bold; }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  margin-left: 1rem;
  font-size: 1rem;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-total {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 1.3rem;
  font-weight: bold;
}

.cart-empty {
  text-align: center;
  padding: 3rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.cart-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px; height: 56px;
  background: var(--green-dark);
  border: 1px solid var(--green-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s;
  box-shadow: 0 0 20px var(--green-glow);
}
.cart-float:hover { transform: scale(1.1); }

.cart-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.1rem 0.4rem;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.9);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--green);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-links a:hover { color: var(--green); text-decoration: none; }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.footer-hex {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #333;
}

/* ===== Animations ===== */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

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

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

/* ===== Scan Line Effect ===== */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 999;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .nav-links { gap: 0.25rem; }
  .nav-link { padding: 0.3rem 0.5rem; font-size: 0.7rem; }
  .nav-status { display: none; }
  .nav-phone { display: none; }

  .hero-title { font-size: 1.8rem; }
  .hero-phone-number { font-size: 1.4rem; }
  .hero-stats { gap: 1.5rem; }
  .stat-number { font-size: 1.8rem; }

  .section { padding: 3rem 1rem; }

  .news-container { grid-template-columns: 1fr; }

  .price-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .price-row.header { display: none; }
  .price-category::after { content: ': '; }
  .price-name { grid-column: 1 / -1; }

  .repair-container { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; gap: 0.5rem; }

  .shop-container { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
