/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(30, 90, 180, 0.25), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(80, 40, 160, 0.22), transparent 45%),
    #07090f;
  color: #eef2fb;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

a { color: #aad0ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.app {
  display: flex;
  width: 100vw;
  height: 100vh;
  animation: fadeSlide 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Sidebar ===== */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: rgba(18, 24, 32, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid rgba(72, 187, 255, 0.15);
  display: flex;
  flex-direction: column;
  padding: 22px 12px;
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
  transition: transform 0.3s ease;
}

.logo-area {
  padding: 0 12px;
  margin-bottom: 28px;
}

.logo {
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #b1e5ff, #6eb5ff, #a0d0ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 160, 255, 0.35));
}

.logo-sub {
  font-size: 0.72rem;
  color: #8fa6d0;
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 500;
  color: #bfd1f0;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 0.98rem;
  text-align: left;
  width: 100%;
}

.nav-item i {
  width: 22px;
  font-size: 1.15rem;
  color: #7aa9ff;
  text-align: center;
  transition: transform 0.2s, color 0.2s;
}

.nav-item:hover {
  background: rgba(60, 120, 220, 0.18);
  border-color: rgba(100, 180, 255, 0.25);
  color: white;
}

.nav-item:hover i {
  transform: scale(1.08);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(30, 100, 220, 0.45), rgba(60, 140, 255, 0.25));
  border-color: rgba(90, 160, 255, 0.5);
  color: white;
  box-shadow: 0 8px 20px rgba(0, 30, 100, 0.3);
}

.nav-item.active i {
  color: #cfe4ff;
}

.bottom-links {
  margin-top: 16px;
  font-size: 0.72rem;
  color: #6f8db0;
  padding: 14px 12px 0;
  border-top: 1px dashed rgba(120, 180, 255, 0.18);
}

.bottom-links span {
  display: block;
  margin: 6px 0;
}

.dell-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #a5c1e6;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ===== Main Panel ===== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* critical for flex children with iframes */
  background: rgba(8, 12, 20, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  position: relative;
}

.top-bar {
  flex-shrink: 0;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(90, 170, 255, 0.15);
}

.page-title {
  font-size: 1.6rem;
  font-weight: 600;
  background: linear-gradient(to right, #e0f0ff, #b4d6ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fast-tag {
  background: rgba(0, 200, 255, 0.08);
  padding: 6px 16px;
  border-radius: 40px;
  font-size: 0.82rem;
  border: 1px solid rgba(47, 110, 176, 0.6);
  color: #b0ddff;
  display: flex;
  gap: 18px;
  flex-shrink: 0;
}

.content-pane {
  flex: 1;
  padding: 22px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  animation: contentFade 0.3s ease;
  min-height: 0;
}

/* ===== Browser ===== */
.browser-frame {
  background: #0f172a;
  border-radius: 24px;
  padding: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(70, 150, 240, 0.18);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.duckbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.duckbar input {
  flex: 1;
  min-width: 200px;
  background: #1a2637;
  border: 1px solid #2e4b77;
  border-radius: 60px;
  padding: 12px 20px;
  color: white;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.duckbar input:focus {
  border-color: #3d9cff;
  box-shadow: 0 0 0 3px rgba(61, 156, 255, 0.2);
}

.duckbar button {
  background: #1f3a60;
  border-radius: 60px;
  padding: 11px 22px;
  color: white;
  font-weight: 600;
  border: 1px solid #2f6eb0;
  transition: background 0.15s, transform 0.1s;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.duckbar button:hover {
  background: #2b5580;
}
.duckbar button:active {
  transform: scale(0.96);
}
.duckbar button.secondary {
  background: #2a3a55;
}
.duckbar button.secondary:hover {
  background: #3a4a6b;
}

.browser-iframe-wrap {
  flex: 1;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #f9f9fc;
  min-height: 400px;
}

.browser-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.browser-notice {
  background: rgba(255, 170, 50, 0.1);
  border: 1px solid rgba(255, 170, 50, 0.3);
  color: #ffd89a;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== AI Grid ===== */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.ai-card {
  background: rgba(20, 30, 45, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  padding: 18px;
  border: 1px solid #2f5680;
  box-shadow: 0 15px 25px -10px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  animation: cardPop 0.3s ease both;
}

.ai-card:hover {
  border-color: #5a9cff;
  transform: translateY(-3px);
  box-shadow: 0 20px 35px -10px rgba(0, 30, 100, 0.6);
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-header i {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.ai-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.ai-desc {
  color: #9bb3d8;
  font-size: 0.88rem;
  flex: 1;
  line-height: 1.45;
}

.ai-launch {
  background: linear-gradient(135deg, #1f4e8a, #2f6eb0);
  color: white;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.ai-launch:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(47, 110, 176, 0.4);
  text-decoration: none;
}

/* ===== Home ===== */
.home-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-message {
  background: linear-gradient(145deg, #14273e, #0b1622);
  border-radius: 28px;
  padding: 32px;
  border: 1px solid #3865a0;
  position: relative;
  overflow: hidden;
}

.hero-message::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(61, 156, 255, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-message h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-message .tagline {
  font-size: 1.1rem;
  color: #b0caf5;
  margin-bottom: 18px;
}

.hero-message p {
  color: #c8d8f0;
  line-height: 1.6;
}

.blur-card {
  backdrop-filter: blur(16px);
  background: rgba(14, 26, 38, 0.7);
  border: 1px solid rgba(90, 160, 255, 0.15);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.blur-card i {
  color: #7aaeff;
  font-size: 1.3rem;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.quick-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.quick-tile {
  background: rgba(20, 36, 55, 0.7);
  border: 1px solid rgba(90, 160, 255, 0.2);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
  color: #dbe8fb;
}

.quick-tile:hover {
  transform: translateY(-3px);
  border-color: #5a9cff;
  background: rgba(30, 60, 100, 0.7);
}

.quick-tile i {
  font-size: 1.6rem;
  color: #7aaeff;
  margin-bottom: 8px;
  display: block;
}

.quick-tile span {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ===== Games ===== */
.games-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.game-card {
  background: rgba(20, 30, 45, 0.7);
  border: 1px solid rgba(90, 160, 255, 0.2);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: #5a9cff;
}

.game-card.active {
  border-color: #3d9cff;
  box-shadow: 0 0 0 2px rgba(61, 156, 255, 0.4);
}

.game-thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #1a2b45, #0e1a2c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #7aaeff;
}

.game-info {
  padding: 12px 14px;
}

.game-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.game-info p {
  font-size: 0.78rem;
  color: #8fa6d0;
}

.game-player {
  background: #0b121f;
  border-radius: 20px;
  padding: 8px;
  height: 540px;
  border: 1px solid rgba(90, 160, 255, 0.2);
  display: flex;
  flex-direction: column;
}

.game-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 10px;
  color: #cfe4ff;
  font-weight: 600;
}

.game-player iframe {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: #000;
}

/* ===== Music ===== */
.music-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.music-header h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.music-header p {
  color: #9bb3d8;
}

.music-player {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(90, 160, 255, 0.2);
  background: #000;
}

.music-player iframe {
  width: 100%;
  height: 450px;
  border: none;
  display: block;
}

.music-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

/* ===== More Links ===== */
.links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.links-list li {
  padding: 14px 18px;
  background: rgba(20, 36, 51, 0.8);
  border: 1px solid rgba(90, 160, 255, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.18s, transform 0.18s;
}

.links-list li:hover {
  border-color: #5a9cff;
  transform: translateX(4px);
}

.links-list i {
  color: #7aaeff;
  width: 22px;
  text-align: center;
}

/* ===== Mobile Menu Toggle ===== */
.menu-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 30;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(18, 24, 32, 0.9);
  border: 1px solid rgba(90, 160, 255, 0.3);
  color: white;
  font-size: 1.1rem;
  backdrop-filter: blur(12px);
}

/* ===== Animations ===== */
@keyframes fadeSlide {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes contentFade {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes cardPop {
  0% { opacity: 0; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

/* ===== Scrollbars ===== */
.content-pane::-webkit-scrollbar,
.nav::-webkit-scrollbar {
  width: 8px;
}
.content-pane::-webkit-scrollbar-track,
.nav::-webkit-scrollbar-track {
  background: transparent;
}
.content-pane::-webkit-scrollbar-thumb,
.nav::-webkit-scrollbar-thumb {
  background: rgba(46, 85, 128, 0.6);
  border-radius: 10px;
}
.content-pane::-webkit-scrollbar-thumb:hover,
.nav::-webkit-scrollbar-thumb:hover {
  background: rgba(66, 115, 168, 0.8);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .sidebar { width: 80px; padding: 22px 8px; }
  .nav-item span,
  .logo-sub,
  .bottom-links span { display: none; }
  .logo { font-size: 1rem; text-align: center; }
  .logo-area { padding: 0 4px; text-align: center; }
  .nav-item { justify-content: center; padding: 12px 8px; gap: 0; }
  .nav-item i { width: auto; font-size: 1.3rem; }
  .dell-tag { justify-content: center; font-size: 0.7rem; }
  .fast-tag { gap: 10px; font-size: 0.75rem; padding: 5px 12px; }
  .top-bar { padding: 16px 18px; }
  .content-pane { padding: 16px 18px; }
  .page-title { font-size: 1.3rem; }
}

@media (max-width: 600px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    padding: 70px 12px 22px;
    transform: translateX(-105%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar .nav-item span,
  .sidebar .logo-sub,
  .sidebar .bottom-links span { display: block; }
  .sidebar .nav-item { justify-content: flex-start; padding: 11px 14px; gap: 14px; }
  .sidebar .nav-item i { width: 22px; }
  .sidebar .logo { font-size: 1.5rem; text-align: left; }
  .sidebar .logo-area { text-align: left; }
  .sidebar .dell-tag { justify-content: flex-start; }
  .fast-tag span:not(:first-child) { display: none; }
  .top-bar { padding-left: 68px; }
  .hero-message { padding: 22px; }
}
