/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #0f3460;
  --highlight-color: #e94560;
  --text-primary: #f1f1f1;
  --text-secondary: #b8b8b8;
  --border-color: #2a2a3e;
  
  /* Spacing */
  --container-width: 1200px;
  --section-padding: 60px 20px;
  --element-spacing: 20px;
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  
  /* Effects */
  --transition-speed: 0.3s;
  --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  --border-radius: 8px;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--element-spacing);
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, #e94560 0%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
}

h2 {
  font-size: 2rem;
  border-left: 4px solid var(--highlight-color);
  padding-left: 15px;
  margin-bottom: 25px;
}

p {
  margin-bottom: var(--element-spacing);
  color: var(--text-secondary);
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

a {
  color: var(--highlight-color);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

a:hover {
  color: #ff6b9d;
}

/* ===== LAYOUT ===== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: var(--section-padding);
  background: var(--secondary-color);
  margin-bottom: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

/* ===== HEADER ===== */
header {
  background: var(--primary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--highlight-color);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e94560 0%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav ul li a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 5px;
  transition: all var(--transition-speed) ease;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--highlight-color);
  transition: all var(--transition-speed) ease;
  transform: translateX(-50%);
}

nav ul li a:hover {
  background: var(--accent-color);
  color: var(--highlight-color);
}

nav ul li a:hover::after {
  width: 80%;
}

/* ===== MAIN SECTION ===== */
#main {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  position: relative;
  overflow: hidden;
}

#main::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.1) 0%, transparent 70%);
  animation: pulse 15s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.5; }
}

#main h1 {
  position: relative;
  z-index: 1;
  font-size: 3rem;
  margin-bottom: 20px;
}

#main p {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-primary);
}

/* ===== BUTTON ===== */
.btn {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(135deg, #e94560 0%, #ff6b9d 100%);
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 50px;
  box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
  transition: all var(--transition-speed) ease;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff6b9d 0%, #e94560 100%);
  transition: left var(--transition-speed) ease;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(233, 69, 96, 0.6);
  color: white;
}

.btn:hover::before {
  left: 0;
}

.btn:active {
  transform: translateY(-1px);
}

/* ===== LISTS ===== */
ol, ul {
  margin-left: 30px;
  margin-bottom: var(--element-spacing);
}

ol li, ul li {
  margin-bottom: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

ol li strong, ul li strong {
  color: var(--highlight-color);
}

/* ===== SPECIFIC SECTIONS ===== */
#about, #how-to-enter, #moriarty, #mirrors,
#tech-architecture, #security-protocols, #onion-deep-dive,
#user-experience, #phishing-danger, #clearnet-vs-darknet, #evolution {
  animation: fadeInUp 0.6s ease-out;
}

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

/* ===== FOOTER ===== */
footer {
  background: var(--primary-color);
  padding: 30px 20px;
  text-align: center;
  border-top: 2px solid var(--highlight-color);
  margin-top: 40px;
}

footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 15px;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  #main h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  section {
    padding: 40px 15px;
  }
  
  .btn {
    padding: 12px 30px;
    font-size: 1rem;
  }
  
  ol, ul {
    margin-left: 20px;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-base: 14px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  #main h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  nav ul {
    gap: 10px;
  }
  
  nav ul li a {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
}

/* ===== ACCESSIBILITY ===== */
*:focus {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

/* ===== SMOOTH SCROLLING ===== */
html {
  scroll-behavior: smooth;
}

/* ===== SELECTION ===== */
::selection {
  background: var(--highlight-color);
  color: white;
}

::-moz-selection {
  background: var(--highlight-color);
  color: white;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
  background: var(--highlight-color);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff6b9d;
}