:root {
  --bg-color: #0b0f19;
  --surface-color: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.4);
  --danger: #f43f5e;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Glowing Orbs */
.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
  top: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
}

.orb-2 {
  bottom: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(100px, 50px) scale(1.1); }
}

header {
  text-align: center;
  padding: 4rem 1rem 2rem;
}

header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInDown 1s ease-out;
}

header p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  animation: fadeIn 1.5s ease-out;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.tab-btn:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--accent-color);
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
  border-color: var(--accent-color);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

/* Search Bar */
.search-bar {
  margin-bottom: 2rem;
  text-align: center;
}

.search-bar input {
  width: 100%;
  max-width: 500px;
  padding: 1rem 1.5rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-bar input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* Grids & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  cursor: default;
}

.card:hover {
  transform: translateY(-5px);
  background: var(--surface-hover);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card h3 {
  font-size: 1.4rem;
  color: var(--accent-color);
  margin-bottom: 0.25rem;
}

.card h4 {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 1rem;
}

.card p {
  font-size: 1rem;
}

/* Timeline specific styles */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.timeline-item:hover {
  transform: scale(1.02);
  background: var(--surface-hover);
  border-color: #8b5cf6;
}

.timeline-year {
  font-size: 1.5rem;
  font-weight: 700;
  color: #8b5cf6;
  min-width: 120px;
}

.timeline-content {
  flex: 1;
}

/* Flashcards (Misc) */
.flashcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.flashcard {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.flashcard:hover {
  border-color: var(--accent-color);
  box-shadow: 0 5px 15px rgba(56, 189, 248, 0.2);
  transform: translateY(-5px);
}

.flashcard h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.flashcard p {
  font-size: 1.05rem;
  color: var(--accent-color);
}

/* Table styles */
.table-container {
  overflow-x: auto;
  background: var(--surface-color);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-color);
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--surface-hover);
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@media (max-width: 768px) {
  header h1 { font-size: 2.2rem; }
  .timeline-item { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .timeline-year { min-width: auto; }
}
