/* Base styles for the slide */
body {
  font-family: "Poppins", sans-serif;
  background-color: #f0f4f8;
  margin: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  box-sizing: border-box;
}

.presentation-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

@keyframes pattern-flow {
    0% { transform: translateX(-10%) translateY(-10%) rotate(0deg); }
    100% { transform: translateX(10%) translateY(10%) rotate(360deg); }
}

.slide {
  width: 100%;
  max-width: 1280px;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  color: var(--base-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  padding: 4% 5%;
  box-sizing: border-box;
}

.slide-bg-color {
  background-color: var(--theme-color-1);
  background-image: radial-gradient(circle at top left, var(--theme-color-2), var(--theme-color-1) 70%);
}

.slide-bg-image {
  background-image: var(--bg-image-url);
  background-size: cover;
  background-position: center;
}

.slide-bg-color::before, .slide-bg-color::after {
    content: '';
    position: absolute;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    z-index: 1;
    animation: pattern-flow 60s linear infinite;
}

.slide-bg-color::before {
    background: linear-gradient(45deg, rgba(255,255,255,0.08), transparent 50%);
    animation-duration: 55s;
}

.slide-bg-color::after {
    background: linear-gradient(-45deg, rgba(0,0,0,0.1), transparent 50%);
    animation-duration: 65s;
    animation-direction: alternate-reverse;
}


.live-clock {
  position: absolute;
  top: 2rem; right: 2.5rem;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 700;
  background-color: rgba(0, 0, 0, 0.25);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  z-index: 10;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

/* --- Animation Classes --- */
.animated-element {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.slide.animate-out .animated-element {
  opacity: 0;
}
.slide.from-right.animate-out .animated-element {
  transform: translateX(-50px);
}
.slide.from-right.animate-in .animated-element {
  transform: translateX(0);
  opacity: 1;
}
.slide.from-right .animated-element {
  transform: translateX(50px);
}
.slide.from-left.animate-out .animated-element {
  transform: translateX(50px);
}
.slide.from-left.animate-in .animated-element {
  transform: translateX(0);
  opacity: 1;
}
.slide.from-left .animated-element {
  transform: translateX(-50px);
}

/* Staggered animation delays */
.slide.animate-in h1 { transition-delay: 0.1s; }
.slide.animate-in p, .slide.animate-in h2, .slide.animate-in h3, .slide.animate-in .banner-details { transition-delay: 0.2s; }
.slide.animate-in .time { transition-delay: 0.4s; }
.slide.animate-in .speaker-photo, .slide.animate-in #slide-video, .slide.animate-in #slide-photo, .slide.animate-in #slide-pdf, .slide.animate-in #guest-team-grid { transition-delay: 0.2s; }
.slide.animate-in #sponsors-grid { transition-delay: 0.3s; }

/* --- View Containers --- */
.main-banner-view, .guest-view, .qa-view, .sponsors-view, .activity-view, .video-view, .photo-view, .pdf-view, .guest-team-view, .mcq-view, .cooldown-view, .timer-view {
  width: 100%; height: 100%; position: absolute; top: 0; left: 0;
  display: none; justify-content: center; align-items: center; padding: 4% 5%; box-sizing: border-box;
}

#guest-team-sub-title{ margin-bottom: 25px; font-size: 27px; }

.slide.is-banner .main-banner-view, .slide.is-guest .guest-view, .slide.is-qa .qa-view, .slide.is-sponsors .sponsors-view, .slide.is-activity .activity-view, .slide.is-break .activity-view, .slide.is-video .video-view, .slide.is-photo .photo-view, .slide.is-pdf .pdf-view, .slide.is-guest-team .guest-team-view, .slide.is-mcq .mcq-view, .slide.is-cooldown .cooldown-view, .slide.is-timer .timer-view {
  display: flex;
}

/* --- View-Specific Layouts --- */
.main-banner-view, .qa-view, .sponsors-view, .activity-view, .video-view, .photo-view, .pdf-view, .guest-team-view, .mcq-view, .cooldown-view, .timer-view {
  flex-direction: column; text-align: center;
}
.guest-view { justify-content: space-between; align-items: center; flex-direction: row; text-align: left; }
.guest-view .text-content { max-width: 55%; }
.speaker-photo {
  width: 25%; height: auto; aspect-ratio: 220 / 235; border-radius: 65px; background-color: var(--guest-image-bg-color);
  border: 5px solid rgba(255, 255, 255, 0.8); display: flex; justify-content: center; align-items: flex-end;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); overflow: hidden;
}
.speaker-photo img { width: 100%; height: 100%; object-fit: cover; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.2rem); font-weight: 800; margin: 0 0 1rem 0; line-height: 1.1; text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; margin: 0; color: var(--accent-color); text-shadow: 0 2px 5px rgba(0,0,0,0.2); }
p.title { font-size: clamp(1rem, 2vw, 1.3rem); font-weight: 400; margin: 0.5rem 0 0 0; opacity: 0.9; }
.time { margin-top: 2rem; font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 500; background-color: rgba(0, 0, 0, 0.25); padding: 0.6em 1.6em; border-radius: 50px; display: inline-block; transition: opacity 0.3s ease, transform 0.3s ease; }
.time.hidden, .live-clock.hidden { opacity: 0; transform: scale(0.8); pointer-events: none; }

/* --- View-Specific Text Styles --- */
.main-banner-view h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.2; }
.main-banner-view p { font-size: clamp(1.1rem, 2.2vw, 1.8rem); opacity: 0.8; margin-top: 1rem; }
.main-banner-view .banner-details { font-size: clamp(0.8rem, 1.5vw, 1.2rem); margin-top: 2rem; opacity: 0.9; }
.main-banner-view h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin-top: 3rem; font-weight: 500; color: var(--accent-color); }
.qa-view h1 { font-size: clamp(4.5rem, 11vw, 8rem); color: var(--accent-color); }
.qa-view p { font-size: clamp(1.2rem, 2.5vw, 2rem); opacity: 0.9; margin-top: -1rem; }
.qa-view .time { margin-top: 1.5rem; }
.activity-view h1 { font-size: clamp(3rem, 8vw, 6rem); color: #fff; }
.slide.is-break .activity-view h1 { color: var(--accent-color); }
.sponsors-view h1 { margin-bottom: 3rem; }
#sponsors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; width: 100%; max-width: 900px; }
.sponsor-logo {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.sponsor-logo img { max-width: 100%; max-height: 80px; object-fit: contain; }
#sponsors-sub { margin-top: 25px; }
.video-view h1, .photo-view h1, .pdf-view h1, .guest-team-view h1 { font-size: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: 1.5rem; }
#slide-video { max-width: 80%; max-height: 60%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
#slide-photo { max-width: 80%; max-height: 70%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
#slide-pdf { width: 80%; height: 70%; border-radius: 10px; border: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }

/* --- Guest Team Styles --- */
#guest-team-grid { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.team-member { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.team-member-photo { width: clamp(100px, 15vw, 180px); height: clamp(100px, 15vw, 180px); border-radius: 50%; background-color: var(--guest-image-bg-color); border: 3px solid rgba(255, 255, 255, 0.8); overflow: hidden; }
.team-member-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-member-name { font-size: clamp(1rem, 1.8vw, 1.25rem); font-weight: 600; }

/* --- MCQ Slide Styles --- */
.mcq-view h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 2.5rem; }
#mcq-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; width: 100%; max-width: 1000px; }
.mcq-option {
    background: rgba(0,0,0,0.2); padding: 1rem; border-radius: 12px;
    font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 600;
    border: 3px solid transparent; transition: all 0.3s ease;
    cursor: pointer; display: flex; align-items: center; gap: 1.5rem; text-align: left;
}
.mcq-prefix {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 45px; height: 45px; border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1); font-weight: 700; color: var(--base-color);
    border: 2px solid rgba(255, 255, 255, 0.3); transition: all 0.3s ease;
}
.mcq-option:hover .mcq-prefix { background-color: rgba(255, 255, 255, 0.2); }
.mcq-option.selected {
    border-color: var(--accent-color); transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}
.mcq-option.selected .mcq-prefix {
    background-color: var(--accent-color); color: var(--theme-color-1);
    border-color: var(--accent-color);
}
.mcq-option.revealed.correct { background: #28a745; border-color: #fff; transform: scale(1.05); }
.mcq-option.revealed.correct .mcq-prefix { background-color: #fff; color: #28a745; }
.mcq-option.revealed.wrong { background: #dc3545; opacity: 0.8; }
.mcq-option.revealed.wrong .mcq-prefix { background-color: #fff; color: #dc3545; }
.mcq-option.revealed.wrong-unselected { opacity: 0.4; }

/* --- Cooldown & Timer Slide Styles --- */
.cooldown-view h1, .timer-view h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 2rem; }
#cooldown-timer, #timer-display { font-size: clamp(5rem, 15vw, 12rem); font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 5px 25px rgba(0,0,0,0.3); }
#timer-controls { margin-top: 2rem; display: flex; gap: 1rem; }
#timer-controls button {
    font-size: 1.2rem; padding: 0.8rem 2rem; border-radius: 50px; border: none;
    cursor: pointer; background: rgba(255,255,255,0.2); color: var(--base-color);
}

/* --- Fullscreen Media Mode --- */
.slide.is-fullscreen-media .content .animated-element:not(video):not(img):not(iframe) { display: none !important; }
.slide.is-fullscreen-media #slide-video, .slide.is-fullscreen-media #slide-photo, .slide.is-fullscreen-media #slide-pdf {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%; border-radius: 0;
  padding: 0; margin: 0; object-fit: cover;
}
.slide.is-fullscreen-media .content { padding: 0; }

/* Footer */
.footer {
  position: relative; z-index: 2; text-align: center; font-size: clamp(1rem, 1.7vw, 1.4rem);
  opacity: 0.8; padding-top: 2rem; border-top: 2px solid rgba(255, 255, 255, 0.25);
}
.credit, .credit a { margin-top: 1rem; font-size: 0.9rem; color: #555; text-align: center; text-decoration: none; }

/* Controls */
.controls { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.controls button {
  padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; border: none; border-radius: 50px;
  cursor: pointer; transition: all 0.3s ease; background-color: #fff; color: #064e76;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); display: flex; align-items: center; gap: 0.5rem;
}
.controls button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); }
#toggle-auto-slide-btn.active { background-color: var(--accent-color); color: #023a59; }

/* Styles for when the slide is fullscreen */
body.fullscreen-active .controls, body.fullscreen-active .credit { display: none; }
