@tailwind base;
@tailwind components;
@tailwind utilities;

/* ============ базовая цветовая тема ============ */
:root {
  --color-text: #E9EAF0;
  --color-accent: #38bdf8;
}

.text-text     { color: var(--color-text); }
.text-accent   { color: var(--color-accent); }
.bg-card       { background: rgba(255, 255, 255, .05); }
.border-card   { border-color: rgba(255, 255, 255, .05); }
.border-accent { border-color: var(--color-accent); }

html {
  background-image: url('/cover_main.png');
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #000;
}
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Manrope', sans-serif;
  color: var(--color-text);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  overscroll-behavior-y: contain;
}

/* ============ Стеклянная карточка ============ */
.card-glass {
  background: rgba(0, 0, 0, 0.18);
  margin-top:auto;
  backdrop-filter: blur(2.4px);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  border-radius: 1rem;
}

/* ============ Экраны ============ */
.screen {
  display: none;
}
.screen.active {
  display: block;
}

/* ============ Кнопки навигации ============ */
.nav-btn span {
  transition: color 0.3s;
}
.nav-btn.active span {
  color: var(--color-accent);
  font-weight: 600;
}
.nav-btn.active img {
  filter: drop-shadow(0 0 6px var(--color-accent));
}

/* ============ Типографика урока ============ */
.prose-lesson {
  max-width: 42rem;
  margin-top: -2rem; 
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  line-height: 1.7;
  color: rgba(255, 255, 255, 1);
  word-break: break-word;
}
.prose-lesson .highlight {
  display: inline-block;
  width: fit-content;
  margin: 0.4rem auto;
  padding: 0.2rem;
  border-left: 2px solid rgba(255,255,255,0.5);
  border-right: 2px solid rgba(255,255,255,0.5);
  text-align: center;
  font-weight: 600;
  font-style: italic;
  color: #ffffff;
}
.prose-lesson h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}
.prose-lesson h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-accent);
}
.prose-lesson ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose-lesson li {
  margin-bottom: 0.5rem;
}

/* ============ Видео блок ============ */
.video-frame {
  width: 98%;
  margin: 1.5rem auto;
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}
.video-frame::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}
.video-frame video,
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ============ Аудио блок ============ */
.audio-number {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  background-color: rgba(28, 100, 242, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.05em;
  text-align: center;
  color: white;
  box-shadow: 0 0 12px rgba(28, 100, 242, 0.3);
  backdrop-filter: blur(6px);
}
.audio-item.playing .audio-number {
  animation: pulse 2s ease-in-out infinite;
  background-color: rgba(28, 100, 242, 0.35);
  color: white;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ============ Урок-плитка ============ */
.tile-lesson {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: #bfdbfe;
  border-radius: 0.75rem;
  transition: all 0.3s;
}
.tile-lesson:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
}

/* ============ Обёртка урока ============ */
.lesson-wrapper {
  width: 100%;
  padding-top: env(safe-area-inset-top);
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: calc(env(safe-area-inset-bottom) + 3.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============ Анимация fade-in для #loading ============ */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
  to { opacity: 1; }
}
