/*
 * StreamFlow v2.1 - Live Streaming Lewat VPS
 * 
 * Custom Features & UI Components
 * Created by: Bang Tutorial

 * © 2026 Bang Tutorial - All rights reserved
 */

/* Phosphor Light: goresan tipis (~1px) yang membuat ikon terbaca sebagai
   detail halus, bukan piktogram tebal. Ini yang paling menentukan kesan premium. */
.ph-light {
  visibility: visible !important;
  opacity: 1;
  line-height: 1;
  vertical-align: -0.075em;
}

/* Ikon jangan sepekat teks utama. Hierarki halus ini membuat antarmuka
   terasa tenang, dan aksen emas jadi lebih menonjol saat dipakai. */
.ph-light:not([class*="text-"]) {
  opacity: 0.86;
}

button:hover > .ph-light,
a:hover > .ph-light {
  opacity: 1;
}

.ph-spinner-gap {
  animation: spin 0.9s linear infinite;
  display: inline-block;
}



.sidebar-tooltip {
  border: 1px solid var(--hairline);
  position: absolute;
  width: auto;
  padding: 0.5rem;
  margin: 0.5rem;
  min-width: max-content;
  left: 5rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  color: white;
  background-color: #111111;
  font-size: 0.75rem;
  font-weight: bold;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 100ms;
  transform: scale(0);
  transform-origin: left;
}

.sidebar-icon:hover .sidebar-tooltip {
  transform: scale(1);
}

:root {
  --gold-200: #F5E7B8;
  --gold-300: #EFD98F;
  --gold-400: #E3C46A;
  --gold-500: #D4AF37;
  --gold-600: #B8942A;
  --gold-700: #8F721F;

  --ink: #0A0A0A;

  --primary-color: var(--gold-500);
  /* Gradien emas melengkung dari tua ke muda lalu tua lagi, meniru cara logam
     memantulkan cahaya. Gradien dua warna terlihat seperti plastik kuning. */
  --primary-gradient: linear-gradient(135deg, #8F721F 0%, #D4AF37 45%, #F5E7B8 55%, #B8942A 100%);
  --accent-color: var(--gold-400);
  --accent-gradient: linear-gradient(135deg, #B8942A 0%, #EFD98F 100%);

  --glass-bg: rgba(17, 17, 17, 0.72);
  --glass-border: rgba(212, 175, 55, 0.16);
  --hairline: rgba(212, 175, 55, 0.14);
}

/* Hitam pekat tapi tidak mati: dua pendar emas sangat samar di sudut atas
   memberi kedalaman tanpa membuat latar terlihat kuning. */
.app-surface {
  background-color: var(--ink);
  background-image:
    radial-gradient(900px circle at 8% -12%, rgba(212, 175, 55, 0.10), transparent 55%),
    radial-gradient(700px circle at 100% 0%, rgba(212, 175, 55, 0.05), transparent 50%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Garis rambut emas di tepi atas kartu - detail kecil yang paling terasa mahal */
.gold-hairline {
  position: relative;
}

.gold-hairline::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  opacity: 0.5;
}

.gold-text {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-200) 50%, var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Fokus keyboard tetap harus terlihat jelas: aksesibilitas jangan dikorbankan
   demi estetika. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 0.375rem;
}

::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #fff;
}

/* Glassmorphism Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Glowing Neon Elements */
.neon-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.28);
}

.neon-btn {
  background: var(--primary-gradient);
  color: var(--ink);
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
}

.neon-btn:hover {
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.45), 0 0 36px rgba(212, 175, 55, 0.18);
  transform: translateY(-2px);
}

.sidebar-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 4rem;
  width: 4rem;
  margin: 0 auto;
  margin-bottom: 0.75rem;
  color: rgba(255,255,255,0.7);
  border-radius: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  background: transparent;
}

/* Item aktif tidak dijadikan blok emas penuh: ikon putih di atas emas hanya
   ~2.1:1 dan tidak terbaca. Tint tipis + rel emas di tepi jauh lebih terbaca
   sekaligus terlihat lebih mahal. */
.sidebar-icon.sidebar-active {
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-300);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.3);
}

.sidebar-icon.sidebar-active::after {
  content: '';
  position: absolute;
  left: -0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1.9rem;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-600));
}

.sidebar-icon:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-300);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.modal-overlay {
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease-in-out;
}

.modal-container {
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.2s ease-in-out;
}

.modal-overlay.active {
  opacity: 1;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
  opacity: 1;
}

[onclick^="setVideoOrientation"] {
  position: relative;
  overflow: hidden;
}

[onclick^="setVideoOrientation"]:before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

[onclick^="setVideoOrientation"].bg-primary:before {
  opacity: 0.1;
}

[onclick^="setVideoOrientation"]:hover:before {
  opacity: 0.05;
}

[onclick^="setVideoOrientation"] i {
  transition: transform 0.2s ease-in-out;
}

[onclick^="setVideoOrientation"]:active i {
  transform: scale(0.9);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #161616;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #3A342A;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--gold-700);
}

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #3A342A #161616;
}

/* Spin Animation - Use Tailwind's built-in or define if needed */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.ph-light.animate-spin {
  animation: spin 1s linear infinite !important;
  display: inline-block;
}

@media (max-width: 768px) {
  .modal-container {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-form-group {
    margin-bottom: 1rem;
  }
  
  .modal-input {
    padding: 0.75rem;
    font-size: 16px;
  }
}