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

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* ===================================
           STICKY HEADER (main demo)
           =================================== */
.sticky-header {
  background-color: #1a1a2e;
  color: white;
  padding: 20px 40px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.sticky-header h1 {
  font-size: 24px;
}

.sticky-header p {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 5px;
}

/* ===================================
           CONTENT SECTIONS
           =================================== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.section {
  background-color: white;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section h2 {
  color: #1a1a2e;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4a90e2;
  display: inline-block;
}

.section p {
  line-height: 1.6;
  color: #666;
  margin-top: 15px;
}

/* ===================================
           SECOND STICKY HEADER (different style)
           =================================== */
.sticky-header-2 {
  background-color: #e94560;
  color: white;
  padding: 15px 40px;
  position: sticky;
  top: 0;
  z-index: 99;
  margin-top: 40px;
}

/* ===================================
           STICKY SIDEBAR DEMO (alternative use)
           =================================== */
.two-column-layout {
  display: flex;
  gap: 30px;
  margin-top: 40px;
}

.main-content {
  flex: 2;
}

.sidebar {
  flex: 1;
}

.sticky-sidebar {
  position: sticky;
  top: 20px;
  background-color: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sticky-sidebar h3 {
  margin-bottom: 15px;
  color: #1a1a2e;
}

.sticky-sidebar ul {
  list-style: none;
}

.sticky-sidebar li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.sticky-sidebar a {
  color: #4a90e2;
  text-decoration: none;
}

.sticky-sidebar a:hover {
  text-decoration: underline;
}

/* ===================================
           STICKY TABLE HEADER
           =================================== */
.table-container {
  max-height: 400px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid #ddd;
}

.sticky-table {
  width: 100%;
  border-collapse: collapse;
}

.sticky-table th {
  background-color: #1a1a2e;
  color: white;
  padding: 12px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sticky-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.sticky-table tr:hover {
  background-color: #f5f5f5;
}

/* ===================================
           DEMO COMPARISON: FIXED VS STICKY
           =================================== */
.comparison-box {
  background-color: white;
  border-radius: 16px;
  padding: 20px;
  margin: 30px 0;
}

.comparison-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #1a1a2e;
}

.fixed-demo {
  background-color: #4a90e2;
  color: white;
  padding: 10px;
  border-radius: 8px;
  margin: 10px 0;
}

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

footer {
  text-align: center;
  padding: 40px;
  color: #666;
  background-color: #1a1a2e;
  color: white;
  margin-top: 40px;
}

.note {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  color: #856404;
}

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