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

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #1a1a2e;
  color: #eee;
  line-height: 1.6;
}

/* Fixed Navigation Bar (always visible) */
.fixed-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #e94560;
  padding: 15px 30px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.fixed-nav a {
  color: white;
  text-decoration: none;
  margin-right: 20px;
  font-weight: bold;
}

.fixed-nav a:hover {
  text-decoration: underline;
}

/* Main content offset for fixed nav */
.container {
  max-width: 1200px;
  margin: 80px auto 40px;
  padding: 0 20px;
}

h1 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 36px;
}

.section {
  background-color: #16213e;
  border-radius: 16px;
  margin-bottom: 40px;
  padding: 25px;
  border-left: 4px solid #4a90e2;
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #4a90e2;
}

.section-description {
  color: #aaa;
  margin-bottom: 20px;
  font-size: 14px;
}

/* ===================================
           DEMO CONTAINER (where positioning happens)
           =================================== */
.demo-container {
  background-color: #0f3460;
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  position: relative;
  min-height: 300px;
}

.demo-box {
  width: 120px;
  height: 80px;
  background-color: #4a90e2;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
}

.code {
  background-color: #0a0a1a;
  padding: 15px;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: #82b1ff;
  overflow-x: auto;
  margin-top: 15px;
}

hr {
  border-color: #2a3a5a;
  margin: 40px 0;
}

/* ===================================
           POSITION: STATIC (default)
           =================================== */
.static-box {
  position: static;
  background-color: #4a90e2;
  margin-bottom: 10px;
}

/* ===================================
           POSITION: RELATIVE
           =================================== */
.relative-container {
  position: relative;
  background-color: #0f3460;
  min-height: 200px;
}

.relative-box {
  position: relative;
  top: 20px;
  left: 30px;
  background-color: #e94560;
}

/* ===================================
           POSITION: ABSOLUTE
           =================================== */
.absolute-container {
  position: relative;
  min-height: 250px;
}

.absolute-box {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #2ecc71;
}

.absolute-box-2 {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background-color: #f39c12;
}

/* ===================================
           POSITION: FIXED (already shown in nav)
           =================================== */

/* ===================================
           POSITION: STICKY
           =================================== */
.sticky-demo {
  height: 400px;
  overflow-y: auto;
  background-color: #0f3460;
  border-radius: 12px;
  padding: 20px;
}

.sticky-header {
  position: sticky;
  top: 0;
  background-color: #e94560;
  padding: 15px;
  border-radius: 8px;
  font-weight: bold;
  margin-bottom: 20px;
  z-index: 10;
}

.scroll-content {
  background-color: #16213e;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid #2a3a5a;
  padding: 12px;
  text-align: left;
}

.comparison-table th {
  background-color: #0f3460;
  color: #4a90e2;
}

.comparison-table tr:hover {
  background-color: #0f3460;
}

footer {
  text-align: center;
  padding: 40px;
  color: #666;
}

.highlight {
  color: #e94560;
  font-weight: bold;
}
