/* ===== CSS Variables ===== */
:root {
  --dart-dark: #00589b;
  --dart-primary: #0175c2;
  --dart-light: #40c4ff;
  --dart-accent: #00b4d8;
  --bg-dark: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --shadow-glow: 0 0 30px rgba(1, 117, 194, 0.3);
  --transition: all 0.3s ease;
}

@media (max-width: 900px) {
  .objective-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .objective-grid {
    grid-template-columns: 1fr;
  }
}

/* Learning objectives */
.learning-objectives {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
}

.learning-objectives h2 {
  margin-bottom: 18px;
  color: #13b9fd;
  text-align: center;
}

.objective-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.objective-grid article {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.objective-grid strong,
.objective-grid span {
  display: block;
}

.objective-grid strong {
  margin-bottom: 8px;
}

.objective-grid span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== Background Pattern ===== */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(1, 117, 194, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(64, 196, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(0, 88, 155, 0.1) 0%,
      transparent 70%
    );
  pointer-events: none;
  z-index: -1;
}

/* ===== Floating Icons ===== */
.floating-icons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.float-icon {
  position: absolute;
  opacity: 0.08;
  animation: float 20s infinite ease-in-out;
}

.icon-1 {
  width: 150px;
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.icon-2 {
  width: 100px;
  top: 60%;
  right: 10%;
  animation-delay: -7s;
}

.icon-3 {
  width: 80px;
  bottom: 20%;
  left: 15%;
  animation-delay: -14s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(20px) rotate(-5deg);
  }
}

/* ===== Landing Page ===== */
.landing-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.landing-header {
  text-align: center;
  padding: 2rem 0 3rem;
  animation: fadeInDown 0.8s ease;
}

.main-logo {
  width: 100px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(1, 117, 194, 0.5));
  animation: pulse 3s infinite ease-in-out;
}

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

.landing-header h1 {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--dart-light), var(--dart-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* ===== Topics Grid ===== */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  flex-grow: 1;
}

.topic-card {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease backwards;
  z-index: 10;
}

.topic-card:nth-child(1) {
  animation-delay: 0.1s;
}
.topic-card:nth-child(2) {
  animation-delay: 0.15s;
}
.topic-card:nth-child(3) {
  animation-delay: 0.2s;
}
.topic-card:nth-child(4) {
  animation-delay: 0.25s;
}
.topic-card:nth-child(5) {
  animation-delay: 0.3s;
}
.topic-card:nth-child(6) {
  animation-delay: 0.35s;
}
.topic-card:nth-child(7) {
  animation-delay: 0.4s;
}
.topic-card:nth-child(8) {
  animation-delay: 0.45s;
}
.topic-card:nth-child(9) {
  animation-delay: 0.5s;
}

.topic-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--dart-primary), var(--dart-light));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(1, 117, 194, 0.3);
}

.topic-card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.topic-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.topic-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Special Cards */
.project-card {
  background: linear-gradient(
    135deg,
    rgba(0, 88, 155, 0.3),
    rgba(1, 117, 194, 0.2)
  );
}

.homework-card {
  background: linear-gradient(
    135deg,
    rgba(64, 196, 255, 0.2),
    rgba(0, 180, 216, 0.2)
  );
}

/* ===== Landing Footer ===== */
.landing-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.landing-footer kbd {
  background: var(--bg-glass);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: inherit;
  font-size: 0.85rem;
}

/* ===== Slide Container ===== */
.slide-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.slide-container.hidden {
  display: none;
}

.slide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.back-btn:hover {
  background: var(--bg-glass);
  border-color: var(--dart-primary);
}

.topic-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dart-light);
}

.progress-info {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== Progress Bar ===== */
.progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dart-primary), var(--dart-light));
  transition: width 0.3s ease;
  width: 0%;
}

/* ===== Slide Content ===== */
.slide-content {
  flex-grow: 1;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  animation: fadeIn 0.4s ease;
  overflow-y: auto;
}

.slide {
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--dart-light);
  border-bottom: 2px solid var(--dart-primary);
  padding-bottom: 0.5rem;
}

.slide h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem;
  color: var(--dart-accent);
}

.slide h4 {
  font-size: 1.1rem;
  margin: 1rem 0 0.5rem;
  color: var(--text-primary);
}

.slide p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.slide ul,
.slide ol {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--text-secondary);
}

.slide li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.slide strong {
  color: var(--dart-light);
}

/* ===== Code Blocks ===== */
.slide pre {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem !important;
  margin: 1rem 0;
  overflow-x: auto;
  font-size: 0.9rem;
}

.slide pre code {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.slide code:not(pre code) {
  background: rgba(1, 117, 194, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: "Consolas", monospace;
  font-size: 0.9em;
  color: var(--dart-light);
}

/* ===== Info Boxes ===== */
.info-box {
  background: linear-gradient(
    135deg,
    rgba(1, 117, 194, 0.15),
    rgba(64, 196, 255, 0.1)
  );
  border-left: 4px solid var(--dart-primary);
  padding: 1rem 1.5rem;
  border-radius: 0 12px 12px 0;
  margin: 1.5rem 0;
}

.info-box.warning {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.15),
    rgba(255, 152, 0, 0.1)
  );
  border-left-color: #ffc107;
}

.info-box.tip {
  background: linear-gradient(
    135deg,
    rgba(76, 175, 80, 0.15),
    rgba(139, 195, 74, 0.1)
  );
  border-left-color: #4caf50;
}

.info-box h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

/* ===== Tables ===== */
.slide table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--bg-glass);
  border-radius: 12px;
  overflow: hidden;
}

.slide th,
.slide td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.slide th {
  background: rgba(1, 117, 194, 0.2);
  color: var(--dart-light);
  font-weight: 600;
}

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

.slide tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* ===== Slide Navigation ===== */
.slide-navigation {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: var(--bg-glass);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn {
  background: linear-gradient(135deg, var(--dart-dark), var(--dart-primary));
  border: none;
  color: var(--text-primary);
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(1, 117, 194, 0.4);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.prev-btn {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== Hidden Utility ===== */
.hidden {
  display: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .landing-header h1 {
    font-size: 2rem;
  }

  .topics-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .topic-card {
    padding: 1.5rem;
  }

  .slide-header {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .slide-content {
    padding: 1rem;
  }

  .slide h2 {
    font-size: 1.5rem;
  }

  .slide-navigation {
    padding: 1rem;
  }

  .nav-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .landing-container {
    padding: 1rem;
  }

  .main-logo {
    width: 70px;
  }

  .landing-header h1 {
    font-size: 1.7rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .back-btn span {
    display: none;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--dart-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dart-light);
}

@media (max-width: 900px) {
  .objective-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .objective-grid {
    grid-template-columns: 1fr;
  }
}
