@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* Theme Variables */
html {
  scroll-behavior: smooth;
}

:root[data-theme='light'] {
  --bg-color: #f9f9f9;
  --container-bg: #fff;
  --text-color: #222;
  --text-secondary: #444;
  --primary-color: #1976d2;
  --primary-light: #e3f2fd;
  --shadow-color: rgba(0, 0, 0, 0.07);
  --warning-bg: linear-gradient(
    90deg,
    rgba(255, 244, 229, 1) 0%,
    rgba(255, 236, 209, 1) 100%
  );
  --warning-border: #ffe0b2;
  --warning-text: #e65100;
  --toc-bg: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  --toc-item-bg: linear-gradient(90deg, #ffffff00 0%, #e3f2fd20 100%);
  --link-color: #2196f3;
  --commit-bg: #f8f9fa;
  --commit-border: #1976d2;
  --commit-hash: #6c757d;
  --commit-msg: #212529;
  --commit-details: #495057;
  --commit-files: #28a745;
  --commit-comment: #666;
}

:root[data-theme='dark'] {
  --bg-color: #121212;
  --container-bg: #1e1e1e;
  --text-color: #e0e0e0;
  --text-secondary: #b0b0b0;
  --primary-color: #90caf9;
  --primary-light: #1e3a5f;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --warning-bg: linear-gradient(
    90deg,
    rgba(49, 27, 14, 1) 0%,
    rgba(43, 29, 14, 1) 100%
  );
  --warning-border: #4e342e;
  --warning-text: #ffab91;
  --toc-bg: linear-gradient(135deg, #1e1e1e 0%, #262626 100%);
  --toc-item-bg: linear-gradient(90deg, #ffffff00 0%, #90caf920 100%);
  --link-color: #90caf9;
  --commit-bg: #2d2d2d;
  --commit-border: #90caf9;
  --commit-hash: #9e9e9e;
  --commit-msg: #e0e0e0;
  --commit-details: #b0b0b0;
  --commit-files: #81c784;
  --commit-comment: #9e9e9e;
}

/* Base Styles */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  margin: 0;
  font-family: Georgia, 'Times New Roman', Times, serif;
  background: var(--bg-color);
  color: var(--text-color);
  padding: 0 12px;
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  animation: fadeIn 0.5s ease-out;
}

.container {
  width: 100%;
  max-width: 700px;
  margin: 40px auto;
  background: var(--container-bg);
  border-radius: 10px;
  box-shadow: 0 2px 8px var(--shadow-color);
  padding: 32px 24px;
  overflow-x: hidden;
  animation: fadeIn 0.5s ease-out 0.2s both;
}

/* Typography */
h1,
h2,
.nav-btn,
.navbar {
  font-family: 'Roboto', Arial, sans-serif;
}

h1 {
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 2.2rem;
  text-align: center;
  letter-spacing: -0.02em;
  color: var(--primary-color);
}

h2 {
  margin-top: 2em;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--primary-color);
}

p {
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 16px auto;
  font-size: 1.08rem;
  line-height: 1.7;
}

.intro-note {
  background: linear-gradient(
    135deg,
    var(--primary-light) 0%,
    var(--container-bg) 100%
  );
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  border-left: 4px solid var(--primary-color);
  position: relative;
  overflow: hidden;
}

.intro-note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.intro-note p {
  color: var(--text-color);
  font-style: italic;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* Navigation */
.navbar {
  display: flex;
  gap: 18px;
  margin: 18px 0 8px 0;
  justify-content: center;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: 30px;
  font-size: 1.08rem;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(90deg, #1976d2 60%, #00c6ff 100%);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.13);
  transition:
    transform 0.13s,
    box-shadow 0.13s,
    background 0.2s;
  animation: pulse 2s infinite;
  animation-play-state: paused;
}

.nav-btn:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.18);
  background: linear-gradient(90deg, #00c6ff 60%, #1976d2 100%);
  animation-play-state: running;
}

.alien-btn {
  background: linear-gradient(90deg, #43e97b 60%, #38f9d7 100%);
}

.alien-btn:hover {
  background: linear-gradient(90deg, #38f9d7 60%, #43e97b 100%);
}

.rocket-btn {
  background: linear-gradient(90deg, #ff512f 60%, #f09819 100%);
}

.rocket-btn:hover {
  background: linear-gradient(90deg, #f09819 60%, #ff512f 100%);
}

.time-btn {
  background: linear-gradient(90deg, #7f7fd5 60%, #86a8e7 100%);
}

.time-btn:hover {
  background: linear-gradient(90deg, #86a8e7 60%, #7f7fd5 100%);
}

.vibe-btn {
  background: linear-gradient(90deg, #ff6b6b 60%, #ffb88c 100%);
  font-size: 1.15rem;
  padding: 14px 28px;
  margin: 24px auto;
  white-space: nowrap;
  display: inline-block;
}

.vibe-btn:hover {
  background: linear-gradient(90deg, #ffb88c 60%, #ff6b6b 100%);
}

/* Logo */
.logo {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 20px auto;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 15px var(--primary-color));
}

/* Notes and Warnings */
.note {
  background: var(--primary-light);
  border-left: 4px solid var(--primary-color);
  padding: 12px 18px;
  margin: 24px 0;
  border-radius: 6px;
  color: var(--text-color);
}

/* Icons */
.brain-icon,
.delorean-icon {
  display: inline-block;
  vertical-align: middle;
  width: 1.8em;
  height: 1.8em;
  margin-right: 4px;
}

.delorean-icon {
  width: 1.5em;
  height: 1.1em;
}

/* Dark Mode Toggle */
.theme-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--container-bg);
  border-radius: 30px;
  padding: 10px;
  box-shadow: 0 2px 8px var(--shadow-color);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.theme-switch:hover {
  filter: brightness(1.1);
}

.theme-switch span {
  font-size: 1.2em;
}

.theme-label {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--text-color);
  user-select: none;
}

/* Git Time Travel Specific */
.commit {
  font-family: 'Roboto Mono', monospace;
  background: var(--commit-bg);
  border-left: 3px solid var(--commit-border);
  padding: 16px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
}

.commit-hash {
  color: var(--commit-hash);
  font-size: 0.9em;
}

.commit-message {
  color: var(--commit-msg);
  margin: 8px 0;
}

.commit-details {
  color: var(--commit-details);
  font-size: 0.9em;
}

.commit-files {
  color: var(--commit-files);
  font-size: 0.9em;
  margin-top: 8px;
}

.commit-files span {
  display: block;
  margin-left: 20px;
}

/* Responsive Design */
@media (max-width: 600px) {
  h1 {
    font-size: 1.3rem;
    margin-top: 18px;
  }
  h2 {
    font-size: 1.05rem;
  }
  p {
    font-size: 0.98rem;
  }
  .container {
    padding: 24px 16px;
    margin: 20px 12px;
  }
  .logo {
    width: 95vw;
    max-width: 95vw;
    margin: 18px auto;
  }
  .vibe-btn {
    padding: 12px 24px;
    font-size: 1.1rem;
  }
  .nav-links {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .nav-links .nav-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  h1 {
    font-size: 2.7rem;
  }
  h2 {
    font-size: 1.45rem;
  }
  p {
    font-size: 1.18rem;
  }
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 18px 0;
  animation: fadeIn 0.5s ease-out 0.4s both;
}

/* Page Load Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Ad Container Styles */
.ad-container {
  margin: 2rem 0;
  text-align: center;
  min-height: 250px;
  background: var(--container-bg);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px var(--shadow-color);
  overflow: hidden;
  position: relative;
}

.ad-container::before {
  content: 'Advertisement';
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Cookie Consent Banner Styles */
#cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--container-bg);
  padding: 1rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  font-family: 'Roboto', Arial, sans-serif;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.cookie-content p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-color);
}

.cookie-content a {
  color: var(--primary-color);
  text-decoration: none;
}

.cookie-content a:hover {
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 0.5rem;
}

.cookie-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.1s;
}

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

.cookie-btn.accept {
  background: var(--primary-color);
  color: white;
}

.cookie-btn.customize {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

#cookie-settings {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.cookie-settings-content {
  background: var(--container-bg);
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-option {
  margin: 1rem 0;
}

.cookie-option p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }

  .ad-container {
    margin: 1.5rem 0;
  }
}

/* Credits Page */
.credit-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--primary-light);
}

.credit-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.credit-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px var(--shadow-color));
}

.credit-text h3 {
  margin: 0 0 4px 0;
  color: var(--primary-color);
  font-family: 'Roboto', sans-serif;
  font-size: 1.2rem;
}

.credit-text p {
  margin: 0;
  line-height: 1.6;
}

.credit-text .code-block {
  font-family: 'Roboto Mono', monospace;
  background-color: var(--primary-light);
  padding: 12px;
  border-radius: 4px;
  font-size: 0.95rem;
}

.inline-icon {
  height: 24px;
  width: 24px;
  vertical-align: middle;
  margin-left: 8px;
}
