:root {
  --bg: #0b1c32;
  --card: #132b4a;
  --card-hover: #18365b;
  --text: #ffffff;
  --muted: #9cb4d6;
  --accent: #6bb3ff;
  --border: #27466e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Header */
.site-header {
  text-align: center;
  padding: 40px 16px 20px;
}
.logo {
  width: 110px; 
  height: 110px;
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 12px;
  background: #0b1c32;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 20px 0 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 36px;
  font-weight: 800;
}

.subtitle {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
}

main.container {
  padding-bottom: 100px;
}

/* Home */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.card:hover {
  background: var(--card-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* Subject */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 24px;
}
.btn {
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover {
  background: var(--card-hover);
}

.units {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 60px;
}
.unit {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}
.unit-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  padding: 16px 20px;
  background: var(--card-hover);
  border-bottom: 1px solid var(--border);
}
.unit iframe {
  width: 100%;
  height: 90vh; 
  border: 0;
  display: block;
}

/* Footer */
.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 20px 0 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.home-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.home-link:hover {
  text-decoration: underline;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

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

.modal-content {
  position: relative;
  width: 92%;
  max-width: 1100px;
  height: 80vh; 
  background: #0b1c32;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 16px; 
  background: rgba(11, 28, 50, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 2;
  font-weight: 700;
  min-height: 58px; 
}

#modal-title {
  font-size: 17px;
  color: #fff;
}

.close-btn {
  font-size: 28px;
  line-height: 1;
  color: #fff;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 10px;
}

.close-btn:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

#quizlet-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.unit {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}
.unit:hover {
  background: var(--card-hover);
  transform: translateY(-3px);
}

.ios-guide {
  margin: 40px auto 0;
  padding: 0 0 10px;
  max-width: 950px;
}

.ios-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

.ios-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 500;
}

.ios-image {
  width: 100%;
  max-width: 720px;   
  height: auto;
  display: block;
  margin: 0 auto;    
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.quizlet-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}

.quizlet-link:hover {
  text-decoration: underline;
}

.subtitle-link {
  margin-top: 6px;
}

.quizlet-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.quizlet-link:hover {
  text-decoration: underline;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    sans-serif;
}

