/* Mars Theme - Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-deep: #0a0a0f;
  --bg-primary: #0d0d1a;
  --bg-secondary: #12122a;
  --bg-card: #151530;
  --accent-red: #ff4444;
  --accent-orange: #ff6b35;
  --accent-flame: #ff8c42;
  --accent-glow: rgba(255, 68, 68, 0.15);
  --text-primary: #f0f0f8;
  --text-secondary: #a0a0c0;
  --text-muted: #606080;
  --border-color: #2a2a4a;
  --gradient-fire: linear-gradient(135deg, #ff4444, #ff8c42, #ff6b35);
  --gradient-dark: linear-gradient(180deg, #0a0a0f, #1a0a2e);
  --radius: 12px;
  --shadow-glow: 0 0 30px rgba(255,68,68,0.2);
  --font-head: 'Orbitron', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--gradient-dark);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Stars background */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 50% 20%, rgba(255,100,100,0.7), transparent),
    radial-gradient(1px 1px at 60% 80%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 80% 10%, rgba(255,150,100,0.6), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 10% 90%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(255,200,150,0.5), transparent),
    radial-gradient(1px 1px at 85% 35%, rgba(255,255,255,0.6), transparent);
  background-size: 400px 400px;
  animation: starFloat 60s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes starFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-400px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(255,68,68,0.3); }
  50% { box-shadow: 0 0 40px rgba(255,68,68,0.6); }
}

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

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

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* Header */
header {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideDown 0.5s ease;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 70px;
}

.logo {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 900;
  background: var(--gradient-fire);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: 2px;
}

.logo span { font-size: 0.7rem; opacity: 0.7; display: block; letter-spacing: 4px; }

nav { display: flex; align-items: center; gap: 8px; }

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s;
}

nav a:hover, nav a.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  min-width: 220px;
  padding: 8px 0;
  box-shadow: var(--shadow-glow);
  z-index: 100;
}
.dropdown:hover .dropdown-menu { display: block; animation: fadeInUp 0.3s; }
.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}
.dropdown-menu a:hover { color: var(--accent-orange); background: rgba(255,107,53,0.1); }

/* Hero */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  animation: fadeInUp 0.8s ease;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 20px;
  background: var(--gradient-fire);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 30px;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.badge.highlight {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

/* Sections */
.section { padding: 50px 0; }
.section-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.section-sub {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
  display: block;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-fire);
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.tool-card:hover::before { opacity: 1; }

.tool-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.tool-card h3 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.tool-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Tool Page */
.tool-page { padding: 40px 0; }
.tool-page .container { max-width: 900px; }

.tool-area {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.tool-area label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.tool-area textarea, .tool-area input[type="text"], .tool-area input[type="password"], .tool-area input[type="number"] {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: 'Courier New', monospace;
  resize: vertical;
  transition: border-color 0.3s;
}

.tool-area textarea:focus, .tool-area input:focus {
  outline: none;
  border-color: var(--accent-orange);
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn {
  background: var(--gradient-fire);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,68,68,0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
}

.btn-outline:hover {
  background: var(--accent-glow);
  box-shadow: none;
}

/* Articles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s;
}

.article-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.article-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.article-card-body { padding: 20px; }

.article-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--text-primary);
}

.article-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--accent-orange);
  margin-top: 10px;
}

/* Article Page */
.article-page { padding: 40px 0; }
.article-page .container { max-width: 800px; }

.article-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 12px;
  line-height: 1.3;
}

.article-header .breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.article-header .breadcrumb a {
  color: var(--accent-orange);
  text-decoration: none;
}

.article-body { line-height: 1.9; font-size: 1.05rem; }

.article-body h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  margin: 35px 0 15px;
  color: var(--accent-orange);
}

.article-body h3 {
  font-size: 1.1rem;
  margin: 25px 0 12px;
  color: var(--text-primary);
}

.article-body p { margin-bottom: 18px; color: var(--text-secondary); }

.article-body ul, .article-body ol {
  margin: 0 0 18px 25px;
  color: var(--text-secondary);
}

.article-body li { margin-bottom: 8px; }

.article-body strong { color: var(--text-primary); }

.article-body code {
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-orange);
}

.article-body pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 18px;
}

.article-body pre code {
  background: none;
  padding: 0;
}

.article-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
}

.article-body a {
  color: var(--accent-orange);
  text-decoration: none;
}

.article-body a:hover { text-decoration: underline; }

.related-tools, .related-articles {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.related-tools h3, .related-articles h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  margin-bottom: 15px;
  color: var(--accent-orange);
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-list a {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s;
}

.related-list a:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

/* Static Pages */
.page-content { padding: 50px 0; }
.page-content .container { max-width: 800px; }

.page-content h1 {
  font-family: var(--font-head);
  font-size: 2rem;
  margin-bottom: 30px;
  background: var(--gradient-fire);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-content h2 {
  font-size: 1.3rem;
  margin: 30px 0 15px;
  color: var(--accent-orange);
}

.page-content p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.8; }

.page-content ul, .page-content ol {
  margin: 0 0 16px 25px;
  color: var(--text-secondary);
}

.page-content li { margin-bottom: 8px; }

/* Footer */
footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 60px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.9rem;
  margin-bottom: 15px;
  color: var(--accent-orange);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 8px;
  transition: color 0.3s;
}

.footer-col a:hover { color: var(--accent-orange); }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Search */
.search-box {
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}

.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 14px 24px;
  color: var(--text-primary);
  font-size: 1rem;
  padding-right: 50px;
}

.search-box input:focus { outline: none; border-color: var(--accent-orange); }

.search-box button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gradient-fire);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 1rem;
}

/* Stats bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-item .num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--gradient-fire);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item .label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* Breadcrumb nav */
.breadcrumb-nav {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb-nav a { color: var(--accent-orange); text-decoration: none; }
.breadcrumb-nav span { margin: 0 8px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s;
}
.pagination a:hover, .pagination a.active {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

/* Tags */
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag {
  background: rgba(255,107,53,0.1);
  border: 1px solid rgba(255,107,53,0.3);
  color: var(--accent-orange);
  padding: 3px 12px;
  border-radius: 15px;
  font-size: 0.78rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  nav {
    display: none;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: rgba(10,10,15,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 999;
  }
  nav.open { display: flex; }
  nav a { padding: 12px 16px; border-radius: 8px; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    background: transparent;
  }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown-menu.show { display: block !important; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 20px 30px; }
  .section { padding: 30px 0; }
  .stats-bar { gap: 20px; }
  .stat-item .num { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Utility */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
