/* PREMIUM WIDGET - ISOLATED CSS */

:root {
  --str-primary: #6366f1;
  --str-glow: rgba(99, 102, 241, 0.5);
  --str-bg-dark: rgba(15, 23, 42, 0.7);
  --str-glass: rgba(255, 255, 255, 0.05);
  --str-border: rgba(255, 255, 255, 0.1);
}

/* Gatilho (Botão do Header) */
.str-main-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 15px var(--str-glow), inset 0 0 10px rgba(255,255,255,0.3);
  z-index: 10;
  margin-left: auto; /* Empurra pro canto direito se houver espaço livre no flex, ou só margem */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  flex-shrink: 0;
}

.str-main-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 30px var(--str-glow), inset 0 0 15px rgba(255,255,255,0.5);
}

.str-main-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Modal / Backdrop */
.str-panel-modal {
  position: fixed;
  inset: 0;
  background: var(--str-bg-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  font-family: 'Inter', system-ui, sans-serif;
}

.str-panel-modal.str-open {
  opacity: 1;
  pointer-events: auto;
}

/* Panel Container */
.str-panel-content {
  background: rgba(20, 20, 25, 0.85);
  border: 1px solid var(--str-border);
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  height: 80vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.str-panel-modal.str-open .str-panel-content {
  transform: translateY(0) scale(1);
}

/* Header & Tabs */
.str-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--str-border);
}

.str-tabs {
  display: flex;
  gap: 15px;
}

.str-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.3s;
  position: relative;
}

.str-tab-btn.str-active {
  color: #fff;
}

.str-tab-btn.str-active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #ec4899;
  border-radius: 3px;
  box-shadow: 0 0 10px #ec4899;
}

.str-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--str-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.str-close-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* Body / Tab Content */
.str-panel-body {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.str-tab-content {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.str-tab-content.str-active {
  opacity: 1;
  pointer-events: auto;
}

/* -- Aba A: Roleta -- */
.str-roulette-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.str-mood-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  width: 100%;
  transition: opacity 0.3s, transform 0.3s;
}

.str-mood-grid.str-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}

.str-mood-btn {
  background: var(--str-glass);
  border: 1px solid var(--str-border);
  border-radius: 16px;
  padding: 20px 10px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.str-mood-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-3px);
  border-color: #ec4899;
  box-shadow: 0 5px 15px rgba(236, 72, 153, 0.2);
}

.str-mood-btn span.emoji {
  font-size: 2rem;
}

/* Roleta Animation */
.str-roulette-wheel {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.str-roulette-wheel.str-spinning {
  opacity: 1;
}

.str-roulette-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateY(0);
}

.str-roulette-item {
  width: 200px;
  height: 300px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  flex-shrink: 0;
  margin-bottom: 20px;
}

.str-spinning .str-roulette-items {
  animation: str-spin 3s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes str-spin {
  0% { transform: translateY(100%); filter: blur(0px); }
  10% { filter: blur(4px); }
  90% { filter: blur(2px); }
  100% { transform: translateY(calc(-100% + 320px)); filter: blur(0px); }
}

/* Roleta Resultado */
.str-roulette-result {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(20,20,25,0.95);
  padding: 20px;
  transition: opacity 0.5s ease;
}

.str-roulette-result.str-show {
  opacity: 1;
  pointer-events: auto;
}

.str-result-poster {
  width: 180px;
  height: 270px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  margin-bottom: 20px;
}

.str-result-title {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}

.str-result-actions {
  display: flex;
  gap: 15px;
}

.str-btn-primary {
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.str-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(236,72,153,0.4);
}

.str-btn-secondary {
  background: var(--str-glass);
  border: 1px solid var(--str-border);
  border-radius: 999px;
  padding: 12px 24px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.str-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}


/* -- Aba B: Tinder (Match) -- */
.str-tinder-container {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.str-cards-stack {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.str-card {
  position: absolute;
  width: 260px;
  height: 380px;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.4s ease, opacity 0.4s ease;
  overflow: hidden;
  will-change: transform, opacity;
  z-index: 1;
}

.str-card.str-active-card {
  z-index: 5;
}

.str-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 50%);
  pointer-events: none;
}

.str-card-info {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.str-card-title {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 5px 0;
}

.str-card-meta {
  color: #cbd5e1;
  font-size: 0.85rem;
  margin: 0;
}

/* Animações de Swipe */
.str-card.str-swipe-left {
  transform: translateX(-150px) rotate(-15deg) scale(0.9);
  opacity: 0;
}

.str-card.str-swipe-right {
  transform: translateX(150px) rotate(15deg) scale(0.9);
  opacity: 0;
}

.str-tinder-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-bottom: 10px;
}

.str-action-btn {
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.str-btn-nope {
  width: 50px;
  height: 50px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 1.5rem;
}
.str-btn-nope:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

.str-btn-like {
  width: 50px;
  height: 50px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 1.5rem;
}
.str-btn-like:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: scale(1.1);
}

.str-btn-watch {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: white;
  box-shadow: 0 10px 20px rgba(236,72,153,0.3);
}
.str-btn-watch:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 30px rgba(236,72,153,0.5);
}
.str-btn-watch svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}
