/* ─── CSS de Estilo e Layout para FusionTV Lite (1280x720 Nativos) ─── */

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

body {
  background-color: #0c0d14;
  color: #f1f1f1;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow: hidden;
  width: 1280px;
  height: 720px;
}

#app_lite {
  position: relative;
  width: 1280px;
  height: 720px;
  overflow: hidden;
}

/* ─── Sidebar ─── */
#sidebar {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 720px;
  background-color: #06070a;
  border-right: 1px solid #1a1e29;
  z-index: 100;
  padding: 0;
  text-align: center;
}

.sidebar-menu {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  display: block;
}

.menu-item {
  display: block;
  width: 70px;
  height: 60px;
  margin: 20px auto;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  color: #8e9bb0;
  padding: 10px 0;
  transition: background-color 0.2s, color 0.2s;
}

.menu-item-icon {
  font-size: 20px;
  margin-bottom: 5px;
}

.menu-item-text {
  font-size: 11px;
  display: block;
}

.menu-item.focused {
  background-color: #1b2030;
  color: #00b4d8;
  border: 2px solid #00b4d8;
}

/* ─── Main Content Area ─── */
#content_area {
  position: absolute;
  left: 0;
  top: 0;
  width: 1180px;
  height: 720px;
  margin-left: 100px;
  overflow: hidden;
}

.screen-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 1180px;
  height: 720px;
  overflow: hidden;
  display: none;
}

/* ─── Screen: Home ─── */
#screen_home {
  position: absolute;
  left: 0;
  top: 0;
  width: 1180px;
  height: 720px;
  overflow: hidden;
}

/* Hero Banner (Fixo no Topo) */
#home_hero {
  position: absolute;
  top: 15px;
  left: 20px;
  width: 1140px;
  height: 270px;
  border-radius: 12px;
  overflow: hidden;
  background-color: #131722;
  z-index: 20;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.hero-bg {
  position: absolute;
  right: 0;
  top: 0;
  width: 60%;
  height: 100%;
  background-size: cover;
  background-position: center;
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  top: 0;
  width: 52%;
  height: 100%;
  padding: 35px 40px;
  background: linear-gradient(to right, #131722 75%, rgba(19, 23, 34, 0));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-logo {
  max-width: 320px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 14px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.hero-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 14px;
  color: #ffffff;
  line-height: 1.2;
}

.hero-desc {
  font-size: 14px;
  color: #b0b8c6;
  line-height: 1.5;
  max-height: 85px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}


/* Catalog Rows (Apenas esta área rola verticalmente) */
#home_rows {
  position: absolute;
  top: 300px;
  left: 0;
  width: 1180px;
  height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 0;
  padding: 10px 20px 60px 20px;
}

#home_rows::-webkit-scrollbar {
  display: none;
}

.catalog-row {
  margin-bottom: 30px;
}

.catalog-title {
  font-size: 18px;
  font-weight: bold;
  margin-left: 16px;
  margin-bottom: 8px;
  color: #ffffff;
}

.addon-tag {
  font-size: 10px;
  background-color: #1a1f33;
  color: #00b4d8;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 10px;
  vertical-align: middle;
}

.cards-scroll {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 16px;
  white-space: nowrap;
}

/* Custom Scrollbar for row scroll */
.cards-scroll::-webkit-scrollbar {
  display: none; /* Esconde barra para visual limpo de TV */
}

/* Card */
.card {
  display: inline-block;
  width: 140px;
  margin-right: 15px;
  background-color: #131722;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  vertical-align: top;
  flex-shrink: 0;
}

.card-img {
  width: 136px;
  height: 200px;
  object-fit: cover;
}

.card-title {
  font-size: 12px;
  color: #e2e8f0;
  padding: 8px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card.focused {
  border-color: #00b4d8;
  transform: scale(1.04);
  position: relative;
  z-index: 5;
  box-shadow: 0 4px 18px rgba(0, 180, 216, 0.45);
}

/* Search Result Cards (16:9) */
.search-result-card {
  display: flex;
  align-items: center;
  background-color: #131722;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}

.search-card-img {
  width: 160px;
  height: 90px; /* 16:9 */
  object-fit: cover;
  background-color: #1a1e2e;
  flex-shrink: 0;
}

.search-card-info {
  padding: 12px 16px;
  flex: 1;
}

.search-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 4px;
}

.search-card-type {
  font-size: 12px;
  color: #00b4d8;
  text-transform: uppercase;
}

.search-result-card.focused {
  border-color: #00b4d8;
  transform: scale(1.02);
  background-color: #1a2236;
}

/* Loading & Empty states */
.loading-text, .empty-text {
  text-align: center;
  font-size: 16px;
  color: #8e9bb0;
  padding: 50px 0;
}

/* ─── Screen: Detail ─── */
#screen_detail {
  width: 1180px;
  height: 720px;
  position: relative;
  background-color: #0c0d14;
}

.detail-backdrop {
  position: absolute;
  left: 0;
  top: 0;
  width: 1180px;
  height: 720px;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: blur(10px);
  z-index: 1;
}

.detail-content {
  position: relative;
  z-index: 2;
  width: 1180px;
  height: 720px;
  padding: 40px;
  overflow-y: auto;
}

.detail-meta-row {
  display: flex;
  flex-direction: row;
  margin-bottom: 30px;
}

.detail-poster {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.detail-info-block {
  margin-left: 40px;
  flex: 1;
}

.detail-title {
  font-size: 36px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 10px;
}

.detail-subinfo {
  font-size: 14px;
  color: #8e9bb0;
  margin-bottom: 15px;
}

.detail-genres {
  margin-bottom: 20px;
}

.genre-badge {
  display: inline-block;
  background-color: #1b2030;
  color: #00b4d8;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-right: 8px;
}

.detail-description {
  font-size: 15px;
  color: #ccd6f6;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 800px;
}

.watch-button {
  background-color: #00b4d8;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  padding: 12px 30px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: transform 0.2s;
}

.watch-button.focused {
  background-color: #0077b6;
  border-color: #ffffff;
  transform: scale(1.05);
}

/* Series Episodes Section */
.episodes-section {
  margin-top: 20px;
  border-top: 1px solid #1a1e29;
  padding-top: 20px;
}

.episodes-heading {
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 15px;
}

.episodes-list {
  display: flex;
  flex-direction: column;
  max-width: 900px;
}

.episode-item {
  display: flex;
  flex-direction: row;
  padding: 12px 20px;
  background-color: #131722;
  margin-bottom: 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  outline: none;
}

.episode-number {
  font-weight: bold;
  color: #00b4d8;
  width: 100px;
}

.episode-title {
  color: #e2e8f0;
}

.episode-item.focused {
  border-color: #00b4d8;
  background-color: #1b2030;
}

/* ─── Screen: Streams ─── */
#screen_streams {
  width: 1180px;
  height: 720px;
  background-color: #0c0d14;
  padding: 40px;
  overflow-y: auto;
}

.streams-container {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 50px;
}

.streams-header-container {
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.streams-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.streams-heading {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.5px;
}

.streams-total-count {
  font-size: 13px;
  color: #8e9bb0;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.streams-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-label {
  font-size: 12px;
  font-weight: 700;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-right: 2px;
}

.filter-chips-scroll {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stream-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  background: #131722;
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  color: #a0aec0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}

.stream-filter-chip.active {
  background: rgba(0, 180, 216, 0.18);
  border-color: #00b4d8;
  color: #ffffff;
}

.stream-filter-chip.focused {
  border-color: #00e5ff;
  background: #1e2638;
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
}

.stream-chip-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #8e9bb0;
}

.stream-filter-chip.active .stream-chip-badge {
  background: #00b4d8;
  color: #ffffff;
}

.streams-list {
  display: flex;
  flex-direction: column;
}

.stream-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 14px 20px;
  background-color: #131722;
  margin-bottom: 10px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  outline: none;
  transition: all 0.15s ease;
}

.stream-icon {
  font-size: 18px;
  color: #00b4d8;
  margin-right: 18px;
  width: 38px;
  height: 38px;
  background: rgba(0, 180, 216, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.stream-info {
  flex: 1;
  min-width: 0;
}

.stream-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.stream-details-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stream-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.stream-badge-addon {
  background: rgba(0, 180, 216, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(0, 180, 216, 0.35);
}

.stream-badge-quality {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.stream-badge-quality.q-4k {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  font-weight: 800;
}

.stream-badge-quality.q-1080p {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.stream-badge-quality.q-720p {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.stream-badge-quality.q-480p {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}

.stream-meta-text {
  font-size: 12px;
  color: #8e9bb0;
}

.stream-item.focused {
  border-color: #00b4d8;
  background-color: #1b2030;
  transform: scale(1.015);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 180, 216, 0.25);
}

.stream-item.focused .stream-icon {
  background: #00b4d8;
  color: #ffffff;
}

/* ─── Screen: Player ─── */
#screen_player {
  width: 1280px;
  height: 720px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  background-color: #000000;
}

.player-wrapper {
  position: relative;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  background-color: #000000;
}

.player-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  background-color: #000000;
  z-index: 1;
}

.player-osd {
  position: absolute;
  left: 40px;
  bottom: 40px;
  width: 1200px;
  height: 100px;
  background-color: rgba(6, 7, 10, 0.85);
  border-radius: 12px;
  border: 1px solid #1a1e29;
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 100;
}

.osd-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.osd-title {
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.osd-subtitle {
  font-size: 13px;
  color: #00b4d8;
  font-weight: 500;
}

.osd-controls-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-top: 10px;
}

.osd-time {
  font-size: 14px;
  color: #8e9bb0;
  width: 150px;
  font-family: monospace;
}

.osd-progress-bg {
  flex: 1;
  height: 6px;
  background-color: #1a1e29;
  border-radius: 3px;
  overflow: hidden;
  margin-left: 20px;
}

.osd-progress-bar {
  height: 100%;
  width: 0%;
  background-color: #00b4d8;
  border-radius: 3px;
}

/* ─── Player Loading Overlay (Estilo Nuvio Original) ─── */
.player-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 1280px;
  height: 720px;
  z-index: 50;
  opacity: 1;
  transition: opacity 0.4s ease;
  background-color: #080b10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.player-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-loading-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 1280px;
  height: 720px;
  background-color: #080b10;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(14px) brightness(0.28) saturate(1.15);
  transform: scale(1.08);
}

.player-loading-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 1280px;
  height: 720px;
  background:
    linear-gradient(180deg, rgba(8, 11, 16, 0.45) 0%, rgba(8, 11, 16, 0.78) 55%, rgba(8, 11, 16, 0.98) 100%),
    radial-gradient(ellipse at center, rgba(0, 180, 216, 0.08) 0%, rgba(8, 11, 16, 0.85) 75%);
}

.player-loading-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 900px;
  padding: 0 40px;
}

.player-loading-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.player-loading-logo-stack {
  position: relative;
  max-width: 480px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.player-loading-logo {
  max-width: 440px;
  max-height: 125px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.85));
  animation: playerLogoPulse 2.2s ease-in-out infinite alternate;
}

.player-loading-title {
  font-size: 38px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.85);
  margin-bottom: 8px;
  max-width: 820px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-loading-subtitle {
  font-size: 19px;
  color: #00b4d8;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 18px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.player-loading-spinner-box {
  margin: 10px auto 16px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-loading-spinner-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: #00b4d8;
  border-right-color: #00b4d8;
  animation: playerSpin 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.player-loading-spinner-ring.small {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.player-loading-status {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.4px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  margin-bottom: 6px;
  min-height: 26px;
}

.player-loading-detail {
  font-size: 14px;
  color: #8e9bb0;
  max-width: 650px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 18px;
}

/* ─── Buffering Overlay (Durante Reprodução) ─── */
.player-buffering-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(6, 7, 10, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 25;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.player-buffering-text {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.3px;
}

/* ─── Player Error Overlay ─── */
.player-error {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 1280px;
  height: 720px;
  background-color: rgba(6, 7, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 40px;
}

.player-error-card {
  width: 600px;
  background: #11141d;
  border: 1px solid #232a3b;
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.player-error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.player-error-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.player-error-msg {
  font-size: 15px;
  line-height: 1.5;
  color: #a0aec0;
  margin-bottom: 28px;
}

.player-error-btn {
  background: #00b4d8;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.player-error-btn.focused,
.player-error-btn:focus {
  background: #0096c7;
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.5);
}

@keyframes playerSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes playerLogoPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.85));
  }
  100% {
    transform: scale(1.03);
    filter: drop-shadow(0 14px 30px rgba(0, 180, 216, 0.35));
  }
}

/* ─── Screen: Search ─── */
#screen_search {
  width: 1180px;
  height: 720px;
  background-color: #0c0d14;
  overflow: hidden;
}

.search-layout {
  display: flex;
  flex-direction: row;
  width: 1180px;
  height: 720px;
  padding: 30px;
}

.search-keyboard-column {
  width: 480px;
  height: 660px;
  border-right: 1px solid #1a1e29;
  padding-right: 30px;
}

.search-heading {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 20px;
}

.search-input-wrapper {
  background-color: #131722;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 25px;
  border: 1px solid #1a1e29;
}

.search-input-display {
  font-size: 18px;
  color: #8e9bb0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-input-display.has-value {
  color: #ffffff;
  font-weight: bold;
}

.virtual-keyboard {
  display: flex;
  flex-direction: column;
}

.keyboard-row {
  display: flex;
  flex-direction: row;
  margin-bottom: 8px;
}

.key-btn {
  flex: 1;
  height: 48px;
  margin-right: 8px;
  background-color: #131722;
  border: 2px solid transparent;
  color: #e2e8f0;
  font-size: 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}

.key-btn:last-child {
  margin-right: 0;
}

.key-space {
  flex: 3;
  background-color: #1b2030;
}

.key-backspace {
  flex: 2;
  background-color: #a30000;
  color: #ffffff;
}

.key-clear {
  flex: 2;
  background-color: #2b2d42;
}

.key-btn.focused {
  border-color: #00b4d8;
  background-color: #00b4d8;
  color: #ffffff;
  transform: scale(1.05);
}

.search-results-column {
  flex: 1;
  height: 660px;
  padding-left: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.results-heading {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 20px;
}

.search-results-grid {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
}

.search-result-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 10px;
  background-color: #131722;
  margin-bottom: 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  outline: none;
}

.search-card-img {
  width: 45px;
  height: 65px;
  object-fit: cover;
  border-radius: 4px;
}

.search-card-info {
  margin-left: 20px;
  flex: 1;
  overflow: hidden;
}

.search-card-title {
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-card-type {
  font-size: 11px;
  color: #8e9bb0;
}

.search-result-card.focused {
  border-color: #00b4d8;
  background-color: #1b2030;
  transform: scale(1.01);
}

/* ─── Screen: Settings ─── */
#screen_settings {
  width: 1180px;
  height: 720px;
  background-color: #0c0d14;
  overflow-y: auto;
}

.settings-layout {
  display: flex;
  flex-direction: row;
  width: 1180px;
  padding: 40px;
}

.settings-column {
  flex: 1;
  margin-right: 40px;
}

.settings-column:last-child {
  margin-right: 0;
  border-left: 1px solid #1a1e29;
  padding-left: 40px;
}

.settings-heading {
  font-size: 22px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 30px;
  border-bottom: 1px solid #1a1e29;
  padding-bottom: 10px;
}

.setting-group {
  margin-bottom: 25px;
}

.setting-label {
  font-size: 14px;
  color: #8e9bb0;
  margin-bottom: 10px;
}

.setting-options-row {
  display: flex;
  flex-direction: row;
}

.setting-opt {
  padding: 10px 20px;
  background-color: #131722;
  border: 2px solid transparent;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: bold;
  border-radius: 6px;
  margin-right: 10px;
  cursor: pointer;
  outline: none;
}

.setting-opt.active {
  background-color: #1b2030;
  color: #00b4d8;
  border-color: #00b4d8;
}

.setting-opt.focused {
  border-color: #ffffff;
}

.action-btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background-color: #1b2030;
  border: 2px solid transparent;
  color: #00b4d8;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  text-align: center;
}

.action-btn.focused {
  background-color: #00b4d8;
  color: #ffffff;
  border-color: #ffffff;
}

.danger-btn {
  color: #ff3333;
  background-color: rgba(163, 0, 0, 0.1);
}

.danger-btn.focused {
  background-color: #a30000;
  color: #ffffff;
}

.sync-btn {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
}

.sync-btn.focused {
  background: linear-gradient(135deg, #6366f1, #9333ea);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.45);
}

/* Gerenciar Addons */
.addons-list, .presets-list {
  display: flex;
  flex-direction: column;
}

.addon-item-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background-color: #131722;
  margin-bottom: 8px;
  border-radius: 6px;
  border: 1px solid #1a1e29;
}

.addon-item-info {
  flex: 1;
  overflow: hidden;
  margin-right: 15px;
}

.addon-item-name {
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 2px;
}

.addon-item-url {
  font-size: 11px;
  color: #8e9bb0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remove-addon-btn {
  padding: 6px 12px;
  background-color: #a30000;
  border: 2px solid transparent;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
}

.remove-addon-btn.focused {
  border-color: #ffffff;
  transform: scale(1.05);
}

.install-preset-btn {
  padding: 6px 12px;
  background-color: #00b4d8;
  border: 2px solid transparent;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
}

.install-preset-btn.focused {
  border-color: #ffffff;
  transform: scale(1.05);
}

.installed-badge {
  font-size: 11px;
  color: #00ff00;
  background-color: rgba(0, 255, 0, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

.no-addons-text {
  color: #8e9bb0;
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

.presets-heading {
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 15px;
}

/* ─── Folder Cards on Home ─── */
.folder-card {
  display: inline-block;
  position: relative;
  width: 180px;
  height: 100px;
  margin-right: 15px;
  background-color: #131722;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #1a1e29;
  vertical-align: top;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.folder-card-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: blur(2px);
  z-index: 1;
}

.folder-card-emoji {
  font-size: 32px;
  margin-top: 15px;
  position: relative;
  z-index: 2;
}

.folder-card-title {
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  margin-top: 8px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 10px;
}

.folder-card.focused {
  border-color: #00b4d8;
  transform: scale(1.04);
  background-color: #1b2030;
  position: relative;
  z-index: 5;
  box-shadow: 0 4px 18px rgba(0, 180, 216, 0.45);
}

/* ─── Screen: Folder Detail Grid ─── */
#screen_folder {
  width: 1180px;
  height: 720px;
  background-color: #0c0d14;
  overflow: hidden;
}

.folder-screen-layout {
  width: 1180px;
  height: 720px;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.folder-screen-title {
  font-size: 26px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 25px;
  border-bottom: 1px solid #1a1e29;
  padding-bottom: 10px;
}

.folder-items-grid {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
  /* Grid tradicional em blocos em linha para evitar erros de renderização flex */
  display: block;
}

.folder-items-grid .card {
  margin-bottom: 20px;
  margin-right: 15px;
}

/* Fallback letter styles */
.folder-card-letter-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1b2030 0%, #0c0d14 100%);
  z-index: 1;
}

.folder-card-letter {
  font-size: 38px;
  font-weight: bold;
  color: #00b4d8;
  margin-top: 10px;
  position: relative;
  z-index: 2;
  text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

/* Sidebar SVG icons */
.sidebar-svg {
  width: 26px;
  height: 26px;
  display: block;
  margin: 0 auto 6px auto;
  color: #8e9bb0;
  transition: color 0.2s;
}

.menu-item.focused .sidebar-svg {
  color: #00b4d8;
}

/* ─── Modal de Sincronização por QR Code ─── */
.qr-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  background: rgba(4, 6, 12, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-modal-card {
  width: 600px;
  background: #111422;
  border: 2px solid #28314e;
  border-radius: 20px;
  padding: 26px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.qr-modal-title {
  font-size: 24px;
  font-weight: bold;
  color: #f8fafc;
  margin-bottom: 6px;
}

.qr-modal-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 18px;
  line-height: 1.4;
}

.qr-canvas-container {
  display: inline-block;
  padding: 10px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  margin-bottom: 14px;
}

.qr-pin-box {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 10px;
  padding: 6px 18px;
  display: inline-block;
  margin-bottom: 12px;
}

.qr-pin-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.qr-pin-digits {
  font-size: 24px;
  font-weight: 800;
  color: #818cf8;
  letter-spacing: 3px;
  margin-left: 8px;
}

.qr-status-indicator {
  font-size: 14px;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 16px;
  min-height: 22px;
}

.qr-status-success {
  color: #10b981 !important;
}

.qr-btn-close {
  display: inline-block;
  background: #1e2538;
  color: #cbd5e1;
  border: 2px solid #333f61;
  padding: 10px 34px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  outline: none;
}

.qr-btn-close.focused {
  background: #ef4444;
  color: #ffffff;
  border-color: #f87171;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}


