* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --neon-cyan: #00f0ff;
  --neon-pink: #ff006e;
  --neon-purple: #b500d9;
  --neon-green: #39ff14;
  --neon-blue: #1e90ff;
  --dark-bg: #0a0e27;
  --darker-bg: #050813;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Courier New', monospace;
  background-color: var(--dark-bg);
  color: #ffffff;
}

body {
  display: flex;
  flex-direction: column;
}

.container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Titlebar Buttons Container */
.titlebar-buttons {
  display: flex;
  flex-direction: row;       /* 👈 Forces side-by-side layout */
  align-items: center;       /* Vertically centers buttons */
  gap: 8px;                  /* Space between buttons */
  padding: 4px;
}

/* Individual Button Styling */
.titlebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.titlebar-btn:hover {
  background: rgba(245, 242, 242, 0);
}

/* Close Button Special Styling */
.titlebar-btn.close {
  color: hsl(0, 17%, 95%);
}

.titlebar-btn.close:hover {
  background: #ff5f57;
  color: #fff;
}

/* ===== TITLEBAR & HEADER ===== */
.site-header {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(5, 8, 19, 0.98) 0%, rgba(26, 26, 62, 0.98) 100%);
  border-bottom: 2px solid var(--neon-cyan);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.4),
              0 0 50px rgba(255, 0, 110, 0.2),
              inset 0 0 15px rgba(0, 240, 255, 0.1);
  flex-shrink: 0;
  z-index: 100;
  -webkit-app-region: drag;
}

/* Titlebar (Window Controls) */
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 12px;
  -webkit-app-region: drag;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-app-region: no-drag;
  flex-shrink: 0;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.header-left:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.65));
}

.header-left:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}

.header-icon {
  height: 32px;
  width: 32px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
}

.header-icon:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.6));
}

.header-title {
  display: flex;
  flex-direction: column;
  gap: 0px;
  min-width: auto;
}

.title-main {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--neon-green);
  text-shadow: 0 0 10px var(--neon-green),
               0 0 20px rgba(57, 255, 20, 0.5);
  animation: glow-pulse 3s ease-in-out infinite;
  line-height: 1;
  white-space: nowrap;
}

.title-main:hover {
  transform: scale(1.05);
}

.title-sub {
  font-size: 7px;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.title-sub:hover {
  transform: scale(1.05);
}

/* Circular Nav Buttons in Titlebar */
.nav-buttons-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-app-region: no-drag;
  flex-shrink: 0;
}

.circular-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 2px;
  opacity: 1;
}

.circular-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.circular-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.titlebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  border: none;
  background: transparent;
  color: #fff; /* 👈 FORCE WHITE */
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  
  /* Optional: Make it glow slightly */
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  
  transition: background 0.2s ease;
}

/* Hover effect to keep it cool */
.titlebar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Close button stays red or white, your choice */
.titlebar-btn.close {
  color: #fff; /* White X */
}

.titlebar-btn.close:hover {
  background: #ff0000; /* Red background on hover */
  color: #fff;
}

.home-btn:hover,
.back-btn:hover,
.forward-btn:hover,
.play-btn:hover,
.info-btn:hover,
.search-btn:hover,
.reload-btn:hover {
  transform: scale(1.1);
}

.back-btn:disabled,
.forward-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.back-btn:disabled:hover,
.forward-btn:disabled:hover {
  transform: none;
}

.home-btn {
  background: transparent;
  box-shadow: none;
}

.home-btn:hover {
  background: transparent;
  box-shadow: none;
}

.back-btn {
  background: transparent;
  box-shadow: none;
}

.back-btn:hover:not(:disabled) {
  background: transparent;
  box-shadow: none;
}

.forward-btn {
  background: transparent;
  box-shadow: none;
}

.forward-btn:hover:not(:disabled) {
  background: transparent;
  box-shadow: none;
}

.play-btn {
  background: transparent;
  box-shadow: none;
}

.play-btn:hover {
  background: transparent;
  box-shadow: none;
}

.info-btn {
  background: transparent;
  box-shadow: none;
}

.info-btn:hover {
  background: transparent;
  box-shadow: none;
}

.search-btn {
  background: transparent;
  box-shadow: none;
}

.search-btn:hover {
  background: transparent;
  box-shadow: none;
}

.reload-btn {
  background: transparent;
  box-shadow: none;
}

.reload-btn:hover {
  background: transparent;
  box-shadow: none;
}

@keyframes glow-pulse {
  0%, 100% {
    text-shadow: 0 0 10px var(--neon-green),
                 0 0 15px rgba(57, 255, 20, 0.4);
  }
  50% {
    text-shadow: 0 0 20px var(--neon-green),
                 0 0 30px rgba(57, 255, 20, 0.6);
  }
}

/* Titlebar Buttons */
.titlebar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  -webkit-app-region: no-drag;
  flex-shrink: 0;
}

.play-now-btn {
  padding: 6px 18px;
  background: #00ffcc;
  border: none;
  color: #000000;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.8),
              0 0 25px rgba(0, 255, 204, 0.5);
  white-space: nowrap;
  text-transform: uppercase;
  font-family: sans-serif;
}

.play-now-btn:hover {
  background: #33ffdd;
  box-shadow: 0 0 25px rgba(0, 255, 204, 1),
              0 0 40px rgba(0, 255, 204, 0.8),
              0 0 60px rgba(0, 255, 204, 0.5);
  transform: translateY(-2px);
}

.play-now-btn:active {
  transform: translateY(0);
  background: #00ddbb;
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.9),
              0 0 35px rgba(0, 255, 204, 0.6);
}

.app-icon-btn {
  width: 56px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.app-icon-btn img {
  width: 100%;
  height: 100%;       
  object-fit: contain;
}

.app-icon-btn:hover {
  transform: scale(1.05);
}

.app-icon-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: 0;
  background: transparent;
}

.titlebar-btn {
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.titlebar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.titlebar-btn.close:hover {
  background: #d32f2f;
  border-color: #d32f2f;
  color: #fff;
}

/* Navigation Bar */
.nav-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  height: 38px;
  overflow-x: auto;
  -webkit-app-region: no-drag;
  flex-shrink: 0;
}

.nav-bar::-webkit-scrollbar {
  height: 3px;
}

.nav-bar::-webkit-scrollbar-track {
  background: rgba(0, 240, 255, 0.1);
}

.nav-bar::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 2px;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: linear-gradient(180deg, transparent, var(--neon-cyan), transparent);
  margin: 0 2px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 7px;
  background: rgba(0, 240, 255, 0.05);
  border: 1.5px solid var(--neon-cyan);
  color: var(--neon-cyan);
  cursor: pointer;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.2);
}

.nav-btn .icon {
  font-size: 11px;
  display: block;
  line-height: 1;
}

.nav-btn .label {
  font-size: 6px;
  letter-spacing: 0.2px;
  line-height: 1;
}

.nav-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 15px var(--neon-cyan),
              0 0 25px rgba(0, 240, 255, 0.5),
              inset 0 0 10px rgba(0, 240, 255, 0.1);
  transform: translateY(-2px);
  color: #ffffff;
  text-shadow: 0 0 10px var(--neon-cyan);
}

.nav-btn:active {
  transform: translateY(0);
  background: rgba(0, 240, 255, 0.25);
  box-shadow: 0 0 20px var(--neon-cyan),
              inset 0 0 15px rgba(0, 240, 255, 0.2);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(0, 240, 255, 0.03);
}

/* Specific button colors */
.nav-play {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(57, 255, 20, 0.05);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

.nav-play:hover {
  background: rgba(57, 255, 20, 0.15);
  box-shadow: 0 0 15px var(--neon-green),
              0 0 25px rgba(57, 255, 20, 0.5),
              inset 0 0 10px rgba(57, 255, 20, 0.1);
  color: #ffffff;
  text-shadow: 0 0 10px var(--neon-green);
}

.nav-info {
  border-color: var(--neon-purple);
  color: var(--neon-purple);
  background: rgba(181, 0, 217, 0.05);
  box-shadow: 0 0 8px rgba(181, 0, 217, 0.3);
}

.nav-info:hover {
  background: rgba(181, 0, 217, 0.15);
  box-shadow: 0 0 15px var(--neon-purple),
              0 0 25px rgba(181, 0, 217, 0.5),
              inset 0 0 10px rgba(181, 0, 217, 0.1);
  color: #ffffff;
  text-shadow: 0 0 10px var(--neon-purple);
}

.nav-recent {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  background: rgba(255, 0, 110, 0.05);
  box-shadow: 0 0 8px rgba(255, 0, 110, 0.3);
}

.nav-recent:hover {
  background: rgba(255, 0, 110, 0.15);
  box-shadow: 0 0 15px var(--neon-pink),
              0 0 25px rgba(255, 0, 110, 0.5),
              inset 0 0 10px rgba(255, 0, 110, 0.1);
  color: #ffffff;
  text-shadow: 0 0 10px var(--neon-pink);
}

/* ===== CONTENT AREA ===== */
.content-area {
  flex: 1;
  display: flex;
  overflow: hidden;
  background-color: var(--darker-bg);
}

webview {
  width: 100%;
  height: 100%;
  flex: 1;
  border: none;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 240, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink));
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 240, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink));
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 850px) {
  .app-icon-btn-container {
    display: none;
  }

  .titlebar-right {
    gap: 6px;
  }
}

@media (max-width: 700px) {
  .play-now-btn,
  .header-left .header-icon,
  .header-left .header-title {
    display: none;
  }

  .header-left {
    min-width: 0;
  }

  .titlebar {
    padding: 0 8px;
  }
}

@media (max-width: 1024px) {
  .nav-btn .label {
    display: none;
  }

  .nav-btn {
    padding: 8px 10px;
  }
}

@media (max-width: 768px) {
  .header-content {
    gap: 10px;
  }

  .neon-text {
    font-size: 14px;
  }

  .nav-btn {
    padding: 6px 8px;
  }

  .nav-btn .icon {
    font-size: 14px;
  }
}