:root {
  --network-blue: #0066cc;
  --network-dark: #003366;
  --network-light: #e6f2ff;
  --network-accent: #00aaff;
  --network-success: #00cc66;
  --network-warning: #ff9900;
  --network-error: #ff3333;
  --network-gray: #f5f5f5;
  --text-color: #333333;
  --border-radius: 6px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --glow: 0 0 5px rgba(0, 170, 255, 0.6);
}


  body {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: linear-gradient(135deg, var(--network-light), #ffffff);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.6;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: inset 0 0 100px rgba(0, 102, 204, 0.04);
}

    .container {
      max-width: 900px;
      background: #fff;
      margin: 40px auto 0 auto;
      border-radius: 12px;
      box-shadow: 0 2px 18px rgba(50, 100, 200, 0.09), 0 1.5px 3px #bedafd80;
      padding: 36px 38px 38px 38px;
      line-height: 1.75;
    }
    h1, h2 {
      text-align: center;
      color: #2466b6;
      margin-top: 0;
    }
    h2 {
      color: #3855c7;
      margin-top: 1.8em;
    }
    h3 {
      color: #185089;
      margin-top: 1.4em;
    }
    table {
      border-collapse: collapse;
      width: 100%;
      margin: 1em 0 1.5em 0;
      background: #f8fafc;
      border-radius: 6px;
      overflow: hidden;
    }
    th, td {
      border: 1px solid #b4d0ef;
      padding: 10px 14px;
      text-align: left;
      font-size: 1.05em;
    }
    th {
      background: #dbeafe;
      color: #204b7b;
      font-weight: 600;
    }
    tr:nth-child(even) {
      background: #f2f7fd;
    }
    code, pre {
      background: #e8eef7;
      color: #285190;
      font-family: 'Fira Mono', 'Consolas', monospace;
      border-radius: 5px;
      padding: 2px 6px;
      font-size: 1em;
    }
    pre {
      padding: 12px 20px;
      margin: 12px 0;
      overflow-x: auto;
      background: #e2eaf6;
    }
    ul, ol {
      margin-left: 1.3em;
      margin-bottom: 1em;
    }
    .note {
      background: #e0f2fe;
      color: #17509c;
      border-left: 4px solid #38bdf8;
      padding: 11px 18px;
      border-radius: 7px;
      margin: 1.3em 0;
      font-size: 1.09em;
    }
    .summary-table {
      background: #f1f8fd;
      border-radius: 7px;
      margin-bottom: 2em;
    }
    .example-block {
      background: #fef9c3;
      border-left: 5px solid #facc15;
      color: #7c6514;
      padding: 13px 19px;
      border-radius: 7px;
      margin: 1.2em 0 1.5em 0;
    }
    a {
      color: #2563eb;
      text-decoration: none;
      font-weight: 500;
    }
    a:hover {
      text-decoration: underline;
    }
    @media (max-width: 600px) {
      .container {
        padding: 15px 3vw;
      }
      table, th, td {
        font-size: 0.98em;
      }
    }

@keyframes fadeInBody {
  from { opacity: 0; transform: translateY(20px);}
  to { opacity: 1; transform: translateY(0);}
}

/* Headings with Glow & Entry Animation */
h1, h2, h3, h4, h5, h6 {
  color: var(--network-dark);
  margin: 1.5rem 0 1rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.3rem;
  text-align: left;
  animation: nodePulse 0.8s ease-out;
  text-shadow: var(--glow);
  letter-spacing: 0.02em;
}

h1 {
  font-size: 2.4rem;
  border-bottom: 3px solid var(--network-blue);
  text-align: center;
  background: linear-gradient(90deg, #0033cc, #00aaff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: 2rem;
  border-left: 5px solid var(--network-blue);
  padding-left: 1rem;
  background: linear-gradient(90deg, #0033cc, #00aaff 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h3 {
  font-size: 1.7rem;
  border-bottom: 1px dashed var(--network-blue);
}

h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 {
  font-size: 1rem;
  color: var(--network-blue);
}

section, .content-block, .code-block {
  animation: fadeInSection 0.7s ease-out;
}

@keyframes fadeInSection {
  from { opacity: 0; transform: translateX(-20px);}
  to { opacity: 1; transform: translateX(0);}
}

/* Table Styles with Animation and Justification */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  animation: fadeInTable 0.7s ease-in;
  text-align: justify;
  background-color: white;
  box-shadow: var(--shadow);
}
@keyframes fadeInTable {
  from { opacity: 0; transform: scale(0.97);}
  to { opacity: 1; transform: scale(1);}
}
th, td {
  padding: 1.2rem;
  border: 1px solid #ddd;
  vertical-align: top;
  transition: var(--transition);
}
th {
  background: linear-gradient(135deg, var(--network-dark), var(--network-blue));
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.9rem;
  text-align: center;
  position: relative;
}
th::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, rgba(255,255,255,0.05) 0%, 
    rgba(255,255,255,0.2) 50%, 
    rgba(255,255,255,0.05) 100%);
  animation: packetFlow 3s linear infinite;
}
@keyframes packetFlow {
  0% { opacity: 0.3;}
  50% { opacity: 0.7;}
  100% { opacity: 0.3;}
}
tr:nth-child(even) { background-color: var(--network-light);}
tr:hover { background-color: rgba(0, 102, 204, 0.08); transform: scale(1.005);}
td:hover { background-color: rgba(0, 170, 255, 0.08);}

/* Code Block Styling */
.code-block {
  background-color: var(--network-dark);
  color: white;
  padding: 1.2rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}

/* Status Labels */
.status-up { color: var(--network-success); font-weight: bold;}
.status-down { color: var(--network-error); font-weight: bold;}
.status-warning { color: var(--network-warning); font-weight: bold;}

/* Quiz Styles */
.question {
  background: linear-gradient(135deg, #ffffff, #f0f4ff);
  padding: 25px 30px;
  margin-bottom: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 51, 204, 0.15);
  transition: all 0.3s ease;
  text-align: justify;
}
.question:hover {
  box-shadow: 0 14px 35px rgba(0, 51, 204, 0.3);
  transform: translateY(-5px);
}
.quiz-correct {
  background: linear-gradient(120deg, #e6ffe6 70%, #d3ffd8 100%) !important;
  box-shadow: 0 0 0 4px #7de67d44;
  transition: background 0.5s, box-shadow 0.5s;
}
.quiz-incorrect {
  background: linear-gradient(120deg, #fff0f0 70%, #ffdada 100%) !important;
  box-shadow: 0 0 0 4px #ff727244;
  transition: background 0.5s, box-shadow 0.5s;
}
.quiz-unanswered {
  background: linear-gradient(120deg, #fffbe6 70%, #fff7cc 100%) !important;
  box-shadow: 0 0 0 4px #ffe06644;
  transition: background 0.5s, box-shadow 0.5s;
}

.question h3 {
  margin-bottom: 20px;
  color: #0022aa;
  font-size: 1.3rem;
  text-align: justify;
}

label {
  display: block;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  color: #222;
  transition: var(--transition);
}
label:hover {
  color: var(--network-accent);
  transform: translateX(5px);
}

.option-label {
  font-weight: 800;
  margin-right: 12px;
  color: #0033cc;
  text-shadow: 0.5px 0.5px 2px rgba(0, 0, 0, 0.1);
}

button {
  display: block;
  margin: 50px auto 80px auto;
  padding: 16px 40px;
  font-size: 1.2rem;
  cursor: pointer;
  border: none;
  background: linear-gradient(90deg, #ff6600, #ff9900);
  color: white;
  border-radius: 50px;
  box-shadow: 0 8px 16px rgba(255, 102, 0, 0.4);
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
button:hover, button:focus {
  background: linear-gradient(90deg, #cc5200, #ff7700);
  box-shadow: 0 12px 24px rgba(255, 102, 0, 0.6);
  transform: translateY(-3px);
}
button::before {
  content: '🚀';
  position: absolute;
  left: 0px;
  font-size: 1.2rem;
  opacity: 0.8;
}

#result {
  font-weight: 800;
  font-size: 1.4rem;
  color: #0022aa;
  margin-top: 25px;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 50, 0.2);
}

/* Highlighted info box */
.highlight {
  background: linear-gradient(90deg, #fff4cc, #ffee99);
  border-left: 8px solid #ffaa00;
  padding: 20px 25px;
  margin: 1.5em 0;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(255, 170, 0, 0.2);
  font-weight: 700;
  color: #664d00;
  position: relative;
  overflow: hidden;
}
.highlight::before {
  content: '🌟';
  font-size: 1.5rem;
  position: absolute;
  top: 0px;
  left: 0px;
  opacity: 0.7;
}

/* EXPLANATION AREAS - FULLY JUSTIFIED & MODERN STYLE */
.explanation {
  text-align: justify !important;
  white-space: normal !important;
  width: 100%;
  margin-top: 1em;
  margin-bottom: 1em;
  border-radius: 10px;
  padding: 18px 24px;
  font-size: 1.09rem;
  transition: background 0.45s, color 0.45s;
  box-shadow: 0 2px 8px rgba(0, 170, 255, 0.09);
  display: none;
}

/* Correct answer style (matches your image exactly) */
.explanation.correct-answer {
  background: linear-gradient(90deg, #e6ffe6, #d1ffd6 80%);
  border-left: 8px solid #00cc66;
  border-right: 8px solid #00cc66;
  padding: 18px 32px 18px 24px; /* right = 32px to match left (24 + 8) */
  box-sizing: border-box;       /* keep borders inside total width */
  color: #235522;
  font-weight: 600;
  display: block !important;
}


/* Incorrect answer style */
.explanation.incorrect-answer {
  background: linear-gradient(90deg, #fff0f0, #ffdada 80%);
  border-left: 8px solid #ff3333;
  border-right: 8px solid #ff3333;
  padding: 18px 32px 18px 24px; /* right balanced to left */
  box-sizing: border-box;
  color: #802020;
  font-weight: 600;
  display: block !important;
}


/* Unanswered style */
.explanation.unanswered-answer {
  background: linear-gradient(90deg, #fffbe6, #fff4cc 80%);
  border-left: 8px solid #ff9900;
  border-right: 8px solid #ff9900;
  padding: 18px 32px 18px 24px; /* right balanced to left */
  box-sizing: border-box;
  color: #885a00;
  font-weight: 600;
  display: block !important;
}


/* EXPLANATION AREAS - FULLY JUSTIFIED & MODERN STYLE */
.explanation {
  text-align: justify !important;
  white-space: normal !important;
  width: 100%;
  margin-top: 1em;
  margin-bottom: 1em;
  border-radius: 10px;
  padding: 18px 24px;
  font-size: 1.09rem;
  transition: background 0.45s, color 0.45s;
  box-shadow: 0 2px 8px rgba(0, 170, 255, 0.09);
  display: none;
}

/* Active state when shown (matches your image exactly) */
.explanation.active {
  background: linear-gradient(90deg, #e6ffe6, #d1ffd6 80%);
  border-left: 8px solid #00cc66;
  border-right: 8px solid #00cc66;
  color: #235522;
  font-weight: 600;
  display: block !important;
  padding: 18px 30px 18px 24px; /* Matches your image spacing */
}

.answer-summary {
  margin-top: 15px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #0033cc;
  user-select: text;
}

/* Animation for table */
@keyframes fadeInTable {
  from { opacity: 0; transform: translateY(10px);}
  to { opacity: 1; transform: translateY(0);}
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    text-align: left;
    padding: 1rem;
  }
  table {
    display: block;
    overflow-x: auto;
  }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.6rem; }
}

/* Topology Indicators */
.topology-node {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--network-blue);
  margin-right: 6px;
  animation: blink 1.5s infinite;
  box-shadow: 0 0 6px rgba(0, 170, 255, 0.7);
}
@keyframes blink {
  0%, 100% { opacity: 1;}
  50% { opacity: 0.4;}
}
.topology-connection {
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: var(--network-blue);
  margin: 0 6px;
  vertical-align: middle;
}
/* styles.css */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #4a90e2, #007acc);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 123, 204, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.5px;
}

.btn svg {
  flex-shrink: 0;
}

.btn:hover {
  background: linear-gradient(135deg, #357abd, #005fa3);
  box-shadow: 0 6px 20px rgba(0, 95, 163, 0.6);
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0, 95, 163, 0.4);
}
/* Justify all paragraph text */
p {
  text-align: justify;
}

/* Optionally, justify text in articles, divs, or other containers */
article, .justified, .content {
  text-align: justify;
}

/* Optional: Adjust word spacing for better appearance */
p, article, .justified, .content {
  word-spacing: 0.08em;
  letter-spacing: 0.01em;
  line-height: 1.6;
}
/* Centered and justified layout with spacing */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #222;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.container {
  max-width: 1000px;
  padding: 20px 40px;
  text-align: justify;
  hyphens: auto;
  background-color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* Ensure all elements are justified */
p, h1, h2, h3, h4, h5, h6, li, span, div {
  text-align: justify;
}
.donation-message {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  background: #e6f9ff;
  border-left: 4px solid #00aaff;
  padding: 12px 16px;
  margin: 20px auto;
  max-width: 700px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 170, 255, 0.1);
  text-align: center;
  line-height: 1.6;
}

footer {
  background: linear-gradient(to right, #0f2027, #2c5364);
  padding: 10px 20px 30px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  text-align: center;
  color: #f0f9ff;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}

.footer-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 25px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  animation: glowIn 1.2s ease-in-out;
}


@keyframes glowIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.svg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  line-height: 1;
}


.svg-button svg {
  width: 13px;
  height: 13px;
  fill: white;
  flex-shrink: 0;
}


.svg-button:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  opacity: 0.95;
}


/* Platform-specific colors */
.facebook { background-color: #1877f2; }
.twitter { background-color: #1da1f2; }
.whatsapp { background-color: #25d366; }
.linkedin { background-color: #0a66c2; }

footer span {
  color: #cfe8ff;
  font-size: 0.95rem;
  letter-spacing: 1px;
  margin-top: 20px;
  display: block;
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Social Share Buttons Alternative Styling */
.social-share {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}


.social-share .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 40px;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.social-share .btn:hover {
  transform: scale(1.05);
  opacity: 0.94;
}

.social-share .fb { background: #3b5998; }
.social-share .tw { background: #1da1f2; }
.social-share .wa { background: #25d366; }
.social-share .li { background: #0077b5; }

.firework-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
}

.firework-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: red; /* Will be overridden by JS */
  transform: translate(0, 0);
  animation: explode 2s ease-out forwards;
  opacity: 1;
}
  
@keyframes explode {
  to {
    transform: translate(var(--x), var(--y));
    opacity: 0;
  }
}

/* MOBILE-FRIENDLY ENHANCEMENTS */

@media (max-width: 768px) {
  body {
    padding: 0.5rem;
    flex-direction: column;
    align-items: stretch;
  }

  .container {
    max-width: 100%;
    padding: 16px 5vw;
    margin: 20px auto;
    border-radius: 10px;
  }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }

  table, th, td {
    font-size: 0.9rem;
    overflow-x: auto;
  }

  pre, code {
    font-size: 0.9rem;
    word-break: break-word;
  }

  .question {
    padding: 16px 20px;
    margin-bottom: 20px;
  }

  label {
    font-size: 1rem;
  }

  button {
    width: 90%;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .highlight,
  .explanation {
    padding: 16px;
    font-size: 1rem;
  }

  footer {
    padding: 20px 15px;
  }

  .donation-message {
    padding: 12px 10px;
    font-size: 1rem;
  }

  .social-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .svg-button {
    width: 100%;
    justify-content: center;
  }

  .answer-summary {
    font-size: 1rem;
  }
}

button, .donate-button {
  max-width: 250px;
  width: 100%;
  margin: 20px auto;
  display: block;
}

.ad-wrapper {
  padding: 0 20px;
}

@media screen and (max-width: 768px) {
  .main-content {
    max-width: 95%;
    padding: 15px;
    margin: 10px auto;
  }
}
@media screen and (max-width: 768px) {
  h1, h2 {
    font-size: 1.4em;
  }
}
