/* =============================================
   GAMEBIOV1 - Widget Twitch Live
   ============================================= */

/* ---- Loading ---- */
.twitch-widget--loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.twitch-widget__loader {
    display: flex;
    gap: 0.4rem;
}
.twitch-widget__loader-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9146ff;
    animation: twitch-bounce 1.2s infinite ease-in-out;
}
.twitch-widget__loader-dot:nth-child(2) { animation-delay: 0.2s; }
.twitch-widget__loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes twitch-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1;   }
}

/* ---- Card base ---- */
.twitch-widget__card {
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(145, 70, 255, 0.2);
    background: rgba(145, 70, 255, 0.04);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}
.twitch-widget__card:hover {
    border-color: #9146ff;
    box-shadow: 0 0 25px rgba(145, 70, 255, 0.25);
    transform: translateY(-2px);
    opacity: 1;
    color: inherit;
}

/* ---- Thumbnail ---- */
.twitch-widget__thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #0d0d14;
    overflow: hidden;
}
.twitch-widget__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.twitch-widget__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #0d0d14;
}

/* ---- Badges sobre o thumb ---- */
.twitch-widget__live-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #eb0400;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.twitch-widget__viewers-badge {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

/* ---- Dot piscando ---- */
.twitch-widget__live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: twitch-pulse 1.5s infinite;
    flex-shrink: 0;
}
.twitch-widget__status--live .twitch-widget__live-dot {
    background: #00d84a;
}

@keyframes twitch-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.8); }
}

/* ---- Info ---- */
.twitch-widget__info {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.twitch-widget__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.twitch-widget__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #9146ff;
    flex-shrink: 0;
    object-fit: cover;
}
.twitch-widget__avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #9146ff;
    background: rgba(145,70,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9146ff;
    font-size: 1rem;
    flex-shrink: 0;
}
.twitch-widget__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.twitch-widget__name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text, #e2e8f0);
}
.twitch-widget__status {
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.twitch-widget__status--live  { color: #00d84a; }
.twitch-widget__status--offline { color: #666; }

/* ---- Título da live ---- */
.twitch-widget__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text, #e2e8f0);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Tags (jogo, viewers) ---- */
.twitch-widget__tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.twitch-widget__tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(145,70,255,0.1);
    color: #9146ff;
    border: 1px solid rgba(145,70,255,0.2);
}
.twitch-widget__tag--game {
    background: rgba(145,70,255,0.15);
    color: #bf94ff;
    border-color: rgba(145,70,255,0.3);
}

/* ---- CTA button ---- */
.twitch-widget__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem;
    background: #9146ff;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 8px;
    letter-spacing: 0.03em;
    margin-top: 0.2rem;
    transition: background 0.2s;
}
.twitch-widget__cta:hover { background: #7b35e0; }
.twitch-widget__cta--offline {
    background: rgba(145,70,255,0.15);
    color: #9146ff;
    border: 1px solid rgba(145,70,255,0.3);
}
.twitch-widget__cta--offline:hover {
    background: rgba(145,70,255,0.25);
}

/* ---- Offline msg ---- */
.twitch-widget__offline-msg {
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    text-align: center;
    padding: 0.5rem 0;
}
/* =============================================
   Steam Widget — mesmo layout do Twitch, cores Steam
   ============================================= */
.steam-widget__card {
  display: block;
  border-radius: 12px;
  border: 1px solid #2a475e;
  background: #1b2838;
  overflow: hidden;
  color: #c7d5e0;
  transition: all 0.25s ease;
}
.steam-widget__card:hover {
  border-color: #4a90d9;
  box-shadow: 0 0 25px rgba(74,144,217,.25);
  transform: translateY(-2px);
}
.steam-widget__info {
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.steam-widget__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.steam-widget__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #4a90d9;
  flex-shrink: 0;
  object-fit: cover;
}
.steam-widget__avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #4a90d9;
  background: rgba(74,144,217,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a90d9;
  font-size: 1rem;
  flex-shrink: 0;
}
.steam-widget__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.steam-widget__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #c7d5e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.steam-widget__status {
  font-size: 0.75rem;
  color: #8f98a0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.steam-widget__status--online { color: #57cbde; }
.steam-widget__status--ingame { color: #90ba3c; }

/* Jogos */
.steam-widget__games {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  background: rgba(0,0,0,.2);
  border-radius: 8px;
  border: 1px solid #2a475e;
}
.steam-widget__games-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8f98a0;
  margin-bottom: 0.2rem;
}
.steam-widget__game {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.steam-widget__game-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  flex-shrink: 0;
  background: #2a475e;
  object-fit: cover;
}
.steam-widget__game-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.steam-widget__game-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: #c7d5e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.steam-widget__game-time {
  font-size: 0.71rem;
  color: #8f98a0;
}
.steam-widget__offline-msg {
  font-size: 0.82rem;
  color: #8f98a0;
  text-align: center;
  padding: 0.5rem 0;
}

/* CTA — igual ao Twitch mas azul Steam */
.steam-widget__cta-wrap { margin-top: 0.2rem; }
.steam-widget__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem;
  background: #1a6fa8;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.2s;
}
.steam-widget__cta:hover { background: #1b8ed8; }

/* =============================================
   PSN Widget
   ============================================= */
.psn-widget__card {
    border-radius: 12px;
    border: 1px solid rgba(0, 112, 209, 0.25);
    background: rgba(0, 48, 135, 0.08);
    overflow: hidden;
    padding: 1rem;
}
.psn-widget__summary {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 112, 209, 0.15);
}
.psn-widget__summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}
.psn-widget__summary-icon { font-size: 1.2rem; }
.psn-widget__summary-val  { font-size: 1.15rem; font-weight: 800; color: var(--text, #e2e8f0); line-height: 1; }
.psn-widget__summary-lbl  { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #8f98a0; }

.psn-widget__games       { display: flex; flex-direction: column; gap: 0.75rem; }
.psn-widget__games-title { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: #8f98a0; margin-bottom: 0.25rem; }

.psn-widget__game {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.psn-widget__game-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(0,112,209,0.1);
}
.psn-widget__game-icon--empty {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,112,209,0.1);
    color: #0070d1;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.psn-widget__game-info       { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.psn-widget__game-name       { font-size: 0.9rem; font-weight: 700; color: var(--text, #e2e8f0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psn-widget__game-platform   { font-size: 0.72rem; color: #0070d1; font-weight: 600; }
.psn-widget__game-progress-wrap { display: flex; align-items: center; gap: 0.5rem; }
.psn-widget__game-progress-bar  { flex: 1; height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.psn-widget__game-progress-fill { height: 100%; background: linear-gradient(90deg, #0070d1, #00c6fb); border-radius: 3px; transition: width 0.6s ease; }
.psn-widget__game-progress-pct  { font-size: 0.72rem; font-weight: 700; color: #8f98a0; flex-shrink: 0; min-width: 28px; text-align: right; }
.psn-widget__game-trophies      { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.psn-widget__game-trophies span { font-size: 0.72rem; color: #8f98a0; }

.psn-widget__error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.5rem;
    color: #8f98a0;
    font-size: 0.85rem;
}


/* =============================================
   Xbox Widget
   ============================================= */
.xbox-widget__card {
    border-radius: 12px;
    border: 1px solid rgba(16, 124, 16, 0.25);
    background: rgba(16, 124, 16, 0.05);
    overflow: hidden;
    padding: 1rem;
}
.xbox-widget__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(16, 124, 16, 0.15);
}
.xbox-widget__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #107c10;
    object-fit: cover;
    flex-shrink: 0;
}
.xbox-widget__avatar--placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #107c10;
    background: rgba(16,124,16,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #107c10;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.xbox-widget__info      { flex: 1; min-width: 0; }
.xbox-widget__name      { font-size: 1rem; font-weight: 700; color: var(--text, #e2e8f0); }
.xbox-widget__gamerscore { font-size: 0.82rem; color: #107c10; font-weight: 600; margin-top: 0.1rem; }

.xbox-widget__section-title { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: #8f98a0; margin-bottom: 0.5rem; }
.xbox-widget__games         { display: flex; flex-direction: column; gap: 0.75rem; }

.xbox-widget__game {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.xbox-widget__game-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(16,124,16,0.1);
}
.xbox-widget__game-icon--empty {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16,124,16,0.1);
    color: #107c10;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.xbox-widget__game-info         { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.xbox-widget__game-name         { font-size: 0.9rem; font-weight: 700; color: var(--text, #e2e8f0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xbox-widget__game-platform     { font-size: 0.72rem; color: #107c10; font-weight: 600; }
.xbox-widget__game-progress-wrap { display: flex; align-items: center; gap: 0.5rem; }
.xbox-widget__game-progress-bar  { flex: 1; height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.xbox-widget__game-progress-fill { height: 100%; background: linear-gradient(90deg, #107c10, #4ade80); border-radius: 3px; transition: width 0.6s ease; }
.xbox-widget__game-progress-pct  { font-size: 0.72rem; font-weight: 700; color: #8f98a0; flex-shrink: 0; min-width: 28px; text-align: right; }
.xbox-widget__game-score         { display: flex; gap: 0.5rem; font-size: 0.72rem; color: #8f98a0; flex-wrap: wrap; }

.xbox-widget__achievements   { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid rgba(16,124,16,0.15); }
.xbox-widget__achiev         { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; }
.xbox-widget__achiev-icon    { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.xbox-widget__achiev-info    { flex: 1; min-width: 0; }
.xbox-widget__achiev-name    { font-size: 0.82rem; font-weight: 700; color: var(--text, #e2e8f0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xbox-widget__achiev-desc    { font-size: 0.72rem; color: #8f98a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xbox-widget__achiev-score   { font-size: 0.78rem; font-weight: 700; color: #107c10; flex-shrink: 0; }

.xbox-widget__error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.5rem;
    color: #8f98a0;
    font-size: 0.85rem;
}
