/* =========================================================
   STYLE LAYAR DISPLAY PANGGUNG / VIDEOTRON WISUDA
   Khusus untuk Proyektor, TV LED, & Videotron Panggung
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600;1,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --disp-bg: radial-gradient(circle at 50% 30%, #152243 0%, #0a1124 50%, #050814 100%);
  --gold-glow: 0 0 30px rgba(212, 175, 55, 0.45);
}

body.display-mode {
  background: var(--disp-bg);
  color: #fff;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  user-select: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background 0.8s ease;
}

/* Background Animated Canvas / Particles */
#display-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

/* Luxury Golden Ornamental Border */
.stage-border {
  position: absolute;
  inset: 18px;
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 20px;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.2);
}

.stage-border::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 14px;
}

/* Ornamental Corners */
.corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: #d4af37;
  pointer-events: none;
  z-index: 3;
}
.corner-tl { top: 12px; left: 12px; border-top: 4px solid #d4af37; border-left: 4px solid #d4af37; }
.corner-tr { top: 12px; right: 12px; border-top: 4px solid #d4af37; border-right: 4px solid #d4af37; }
.corner-bl { bottom: 12px; left: 12px; border-bottom: 4px solid #d4af37; border-left: 4px solid #d4af37; }
.corner-br { bottom: 12px; right: 12px; border-bottom: 4px solid #d4af37; border-right: 4px solid #d4af37; }

/* Display Main Container */
.display-wrapper {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 3.5rem;
  justify-content: space-between;
}

/* Floating Action Header (Fullscreen, Mute, Status) */
.floating-hud {
  position: absolute;
  top: 28px;
  right: 32px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.15;
  transition: opacity 0.3s ease;
}

.floating-hud:hover {
  opacity: 1;
}

.hud-btn {
  background: rgba(16, 25, 45, 0.85);
  border: 1px solid var(--border-gold);
  color: var(--gold-300);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-btn:hover {
  background: var(--gold-gradient);
  color: #111;
  transform: scale(1.08);
}

.conn-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =========================================================
   MODE 1: LAYAR STANDBY / SIAGA
   ========================================================= */
.standby-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.8rem;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.standby-screen.hidden {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  position: absolute;
}

.university-emblem {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}

.emblem-glow {
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulseGlow 3s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0.9; }
}

.emblem-svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.standby-titles {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sub-title-event {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--gold-400);
  text-transform: uppercase;
}

.main-title-univ {
  font-family: 'Cinzel', serif;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #ffffff 0%, #fef3c7 40%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 15px rgba(212, 175, 55, 0.4));
  line-height: 1.2;
}

.ceremony-session {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: #e5e7eb;
}

.standby-clock-box {
  background: rgba(16, 25, 45, 0.65);
  border: 1px solid var(--border-gold);
  border-radius: 50px;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.live-time {
  font-family: 'Cinzel', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-300);
  letter-spacing: 0.05em;
}

.live-date {
  font-size: 1rem;
  color: var(--text-muted);
  border-left: 1px solid rgba(212, 175, 55, 0.3);
  padding-left: 1.5rem;
}

.standby-footer-instruction {
  font-size: 1.05rem;
  color: var(--gold-200);
  opacity: 0.85;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* =========================================================
   MODE 2: KARTU WISUDAWAN TAMPIL (THE REVEAL)
   ========================================================= */
.student-showcase {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.student-showcase.hidden {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  position: absolute;
}

.showcase-card {
  width: 100%;
  max-width: 1350px;
  background: linear-gradient(135deg, rgba(20, 31, 58, 0.94) 0%, rgba(10, 16, 32, 0.98) 100%);
  border: 2px solid var(--photo-border-color, var(--gold-500));
  border-radius: 28px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 30px var(--photo-glow-color, rgba(212, 175, 55, 0.45));
  padding: 3rem;
  display: grid;
  grid-template-columns: var(--photo-frame-width, 340px) 1fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  animation: revealStudent 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.4s ease;
}

/* =========================================================
   VARIASI TATA LETAK PANGGUNG (LAYOUT DISPLAY)
   ========================================================= */

/* Layout 1: Centered Vertical Stack (Foto di Tengah Atas, Biodata di Bawah Foto) */
.showcase-card.layout-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 1060px;
  gap: 2.25rem;
  padding: 3rem 2.5rem;
  margin: 0 auto;
}

.showcase-card.layout-centered .photo-frame-wrapper {
  margin: 0 auto;
}

.showcase-card.layout-centered .student-meta-details {
  align-items: center;
  width: 100%;
  gap: 1.1rem;
}

.showcase-card.layout-centered .faculty-tag {
  justify-content: center;
}

.showcase-card.layout-centered .student-grand-name {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  text-align: center;
  line-height: 1.15;
}

.showcase-card.layout-centered .study-program-name {
  justify-content: center;
  font-size: 1.35rem;
}

.showcase-card.layout-centered .workplace-badge {
  margin: 0.35rem auto;
}

.showcase-card.layout-centered .highlights-grid {
  justify-content: center;
  width: 100%;
  max-width: 880px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.showcase-card.layout-centered .secondary-details {
  align-items: center;
  max-width: 880px;
  text-align: center;
}

/* Layout 2: Split Horizontal (Foto di Kiri, Biodata di Kanan) */
.showcase-card.layout-split-left {
  display: grid;
  grid-template-columns: var(--photo-frame-width, 340px) 1fr;
  text-align: left;
}

/* Layout 3: Split Reverse (Biodata di Kiri, Foto di Kanan) */
.showcase-card.layout-split-right {
  display: grid;
  grid-template-columns: 1fr var(--photo-frame-width, 340px);
  text-align: left;
}
.showcase-card.layout-split-right .photo-frame-wrapper {
  grid-column: 2;
  order: 2;
}
.showcase-card.layout-split-right .student-meta-details {
  grid-column: 1;
  order: 1;
}

.showcase-card.no-photo-layout {
  display: flex !important;
  flex-direction: column !important;
  max-width: 950px;
  text-align: center;
}

.showcase-card.no-photo-layout .photo-frame-wrapper {
  display: none !important;
}

.showcase-card.no-photo-layout .student-meta-details {
  align-items: center;
}

.showcase-card.no-photo-layout .highlights-grid {
  width: 100%;
}

@keyframes revealStudent {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Shimmer Light Reflection on Card */
.showcase-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 45%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 55%
  );
  transform: rotate(30deg);
  animation: shimmerSweep 6s infinite ease-in-out;
  pointer-events: none;
}

@keyframes shimmerSweep {
  0% { transform: translateX(-100%) rotate(30deg); }
  50%, 100% { transform: translateX(100%) rotate(30deg); }
}

/* =========================================================
   KOSTUMISASI FOTO: UKURAN, BENTUK, WARNA & EFEK RING
   ========================================================= */
.photo-frame-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--photo-frame-width, 320px);
}

/* =========================================================
   AMBIENT LIGHT (CAHAYA PENDARAN DI BELAKANG FOTO)
   ========================================================= */
.photo-ambient-light {
  position: absolute;
  width: var(--photo-frame-width, 320px);
  height: var(--photo-frame-height, 320px);
  background: radial-gradient(circle, var(--ambient-color, #d4af37) 0%, transparent 70%);
  filter: blur(var(--ambient-radius, 60px));
  opacity: var(--ambient-intensity, 0.75);
  pointer-events: none;
  z-index: 1;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.photo-ambient-light.ambient-disabled {
  display: none !important;
}

/* Animasi Ambient Light */
.photo-ambient-light.anim-breathe {
  animation: ambientBreathe 3.6s infinite alternate ease-in-out;
}

.photo-ambient-light.anim-aurora {
  background: radial-gradient(circle, var(--ambient-color, #d4af37) 0%, rgba(56, 189, 248, 0.7) 45%, rgba(236, 72, 153, 0.5) 75%, transparent 90%);
  animation: ambientAurora 7s infinite ease-in-out;
}

.photo-ambient-light.anim-steady {
  animation: none;
}

@keyframes ambientBreathe {
  0% {
    transform: scale(0.90);
    opacity: calc(var(--ambient-intensity, 0.75) * 0.5);
    filter: blur(calc(var(--ambient-radius, 60px) * 0.75));
  }
  100% {
    transform: scale(1.28);
    opacity: var(--ambient-intensity, 0.75);
    filter: blur(calc(var(--ambient-radius, 60px) * 1.35));
  }
}

@keyframes ambientAurora {
  0% { transform: scale(0.92) rotate(0deg); filter: blur(50px) hue-rotate(0deg); }
  50% { transform: scale(1.24) rotate(180deg); filter: blur(75px) hue-rotate(75deg); }
  100% { transform: scale(0.92) rotate(360deg); filter: blur(50px) hue-rotate(0deg); }
}

.photo-outer-ring {
  width: var(--photo-frame-width, 320px);
  height: var(--photo-frame-height, 320px);
  padding: 8px;
  background: var(--photo-ring-bg, var(--gold-gradient));
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px var(--photo-glow-color, rgba(212, 175, 55, 0.5));
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-outer-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1.5px dashed var(--photo-border-color, rgba(212, 175, 55, 0.6));
  animation: rotateRing 30s infinite linear;
  pointer-events: none;
  transition: border-radius 0.3s ease;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.student-main-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid #0a1124;
  background-color: #17233f;
  transition: border-radius 0.3s ease;
}

/* --- Variasi Bentuk (Shapes) --- */
/* 1. Lingkaran Sempurna (Circle) */
.shape-circle .photo-outer-ring,
.shape-circle .student-main-photo,
.shape-circle .photo-ambient-light {
  border-radius: 50% !important;
}
.shape-circle .photo-outer-ring::before {
  border-radius: 50% !important;
}

/* 2. Persegi Membulat (Squircle / Rounded Rectangle) */
.shape-rounded .photo-outer-ring,
.shape-rounded .student-main-photo,
.shape-rounded .photo-ambient-light {
  border-radius: 36px !important;
}
.shape-rounded .photo-outer-ring::before {
  border-radius: 42px !important;
}

/* 3. Pas Foto Portrait Formal (Rasio 3:4) */
.shape-portrait .photo-outer-ring,
.shape-portrait .photo-ambient-light {
  border-radius: 24px !important;
}
.shape-portrait .student-main-photo {
  border-radius: 18px !important;
}
.shape-portrait .photo-outer-ring::before {
  border-radius: 28px !important;
}

/* 4. Persegi Elegan (Square 1:1) */
.shape-square .photo-outer-ring,
.shape-square .student-main-photo,
.shape-square .photo-ambient-light {
  border-radius: 16px !important;
}
.shape-square .photo-outer-ring::before {
  border-radius: 22px !important;
}

/* 5. Hexagon Modern (Badge Segienam) */
.shape-hexagon .photo-outer-ring,
.shape-hexagon .photo-ambient-light {
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%) !important;
  border-radius: 0 !important;
  padding: 6px !important;
}
.shape-hexagon .student-main-photo {
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%) !important;
  border-radius: 0 !important;
  border: none !important;
}
.shape-hexagon .photo-outer-ring::before {
  display: none !important;
}

/* --- Variasi Efek Ring --- */
/* Efek Glow Breathing Pulse */
.effect-glow .photo-outer-ring {
  animation: photoGlowPulse 2.8s infinite alternate ease-in-out;
}
.effect-glow .photo-outer-ring::before {
  display: none !important;
}

@keyframes photoGlowPulse {
  0% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px var(--photo-glow-color, rgba(212, 175, 55, 0.4)); }
  100% { box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8), 0 0 45px var(--photo-glow-color, rgba(212, 175, 55, 0.85)); }
}

/* Efek Double Border */
.effect-double .photo-outer-ring::before {
  inset: -10px;
  border: 2px solid var(--photo-border-color, #d4af37);
  animation: none !important;
}

/* Efek Bersih Tanpa Ring Luar */
.effect-clean .photo-outer-ring::before {
  display: none !important;
}

/* Detail Wisudawan */
.student-meta-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faculty-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-500);
  color: var(--gold-300);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  width: fit-content;
}

.student-grand-name {
  font-family: 'Playfair Display', serif;
  font-size: 3.1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.study-program-name {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 600;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Workplace Badge (Sudah Bekerja di Mana) */
.workplace-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 78, 59, 0.4));
  border: 1.5px solid #10b981;
  border-radius: 12px;
  padding: 0.6rem 1.35rem;
  width: fit-content;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
  animation: pulseGlowWork 3s infinite alternate ease-in-out;
}

@keyframes pulseGlowWork {
  0% { box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2); }
  100% { box-shadow: 0 4px 25px rgba(16, 185, 129, 0.45); }
}

.work-icon {
  font-size: 1.6rem;
}

.work-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.work-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: #6ee7b7;
  text-transform: uppercase;
}

.work-company {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* Highlights Grid: NIM, IPK, Predikat */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.highlight-box {
  background: rgba(10, 16, 32, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.highlight-box.cumlaude-box {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(255, 215, 0, 0.1));
  border-color: #d4af37;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.35);
}

.hl-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-400);
}

.hl-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.hl-value.cumlaude-text {
  font-size: 1.05rem;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* Additional Info: Parents, Origin, Thesis */
.secondary-details {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail-line {
  font-size: 0.95rem;
  color: #cbd5e1;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.detail-line strong {
  color: var(--gold-300);
  font-weight: 600;
  min-width: 130px;
}

.thesis-line {
  font-style: italic;
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* Progress bar timer */
.display-timer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--gold-gradient);
  width: 100%;
  transform-origin: left;
}
