/* ===== SLOTS PAGE ===== */
.slots-container {
  max-width: 1400px;
  margin: 24px auto 40px;
  padding: 0 20px;
  position: relative;
}

/* Live Wins Feed - Horizontal */
.slots-wins-feed {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.wins-feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(195, 0, 255, 0.15) 0%, rgba(139, 0, 204, 0.15) 100%);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
}

.wins-feed-header i {
  width: 18px;
  height: 18px;
  color: #ffd700;
}

.wins-feed-header span {
  flex: 1;
}

.wins-toggle-btn {
  background: none;
  border: none;
  color: var(--t2);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.wins-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--t1);
}

.wins-toggle-btn i {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
}

.slots-wins-feed.collapsed .wins-toggle-btn i {
  transform: rotate(180deg);
}

.slots-wins-feed.collapsed .wins-feed-list {
  display: none;
}

.wins-feed-list {
  display: flex;
  gap: 12px;
  padding: 16px;
  overflow-x: auto;
  overflow-y: hidden;
}

.wins-feed-list::-webkit-scrollbar {
  height: 6px;
}

.wins-feed-list::-webkit-scrollbar-track {
  background: var(--bg3);
}

.wins-feed-list::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

.wins-feed-list::-webkit-scrollbar-thumb:hover {
  background: #c300ff;
}

.win-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
  flex-shrink: 0;
  animation: slideInWinHorizontal 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.win-item:hover {
  background: var(--bg4);
  border-color: #c300ff;
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(195, 0, 255, 0.3);
}

.win-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg2);
}

.win-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.win-item-info {
  text-align: center;
  width: 100%;
}

.win-item-game {
  font-size: 12px;
  font-weight: 700;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  max-width: 130px;
}

.win-item-user {
  font-size: 10px;
  color: var(--t3);
  font-weight: 600;
  margin-bottom: 6px;
}

.win-item-amount {
  font-size: 13px;
  font-weight: 800;
  color: #10b981;
  white-space: nowrap;
}

@keyframes slideInWinHorizontal {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Header */
.slots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.slots-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 32px;
  font-weight: 800;
  color: var(--t1);
  margin: 0;
}

.slots-title i {
  width: 36px;
  height: 36px;
  color: #c300ff;
}

.slots-stats {
  font-size: 14px;
  color: var(--t2);
  font-weight: 600;
}

/* Filters */
.slots-filters {
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.slots-search {
  position: relative;
  flex: 1;
}

.slots-search i,
.slots-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--t1);
  pointer-events: none;
  opacity: 0.5;
}

.slots-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--t1);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.slots-search input:focus {
  border-color: #c300ff;
  box-shadow: 0 0 0 3px rgba(195, 0, 255, 0.1);
}

/* Provider Filter Dropdown */
.slots-provider-filter {
  position: relative;
}

.provider-btn {
  padding: 12px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--t1);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  justify-content: space-between;
}

.provider-btn:hover {
  background: var(--bg3);
  border-color: #c300ff;
}

.provider-btn.active {
  background: var(--bg3);
  border-color: #c300ff;
  color: #c300ff;
}

.provider-btn i {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.provider-btn.open i {
  transform: rotate(180deg);
}

#providersList {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#providersList.open {
  display: flex;
}

#providersList .provider-item {
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--t2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

#providersList .provider-item:hover {
  background: var(--bg3);
  color: var(--t1);
}

#providersList .provider-item.active {
  background: rgba(195, 0, 255, 0.1);
  color: #c300ff;
}

#providersList .provider-item img {
  height: 16px;
  width: auto;
  opacity: 0.7;
}

#providersList .provider-item:hover img {
  opacity: 1;
}

/* Custom scrollbar for providers list */
#providersList::-webkit-scrollbar {
  width: 6px;
}

#providersList::-webkit-scrollbar-track {
  background: var(--bg3);
  border-radius: 3px;
}

#providersList::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

#providersList::-webkit-scrollbar-thumb:hover {
  background: #c300ff;
}

/* Games Grid */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.slots-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--t2);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: #c300ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Game Card */
.game-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: #c300ff;
  box-shadow: 0 12px 40px rgba(195, 0, 255, 0.3);
}

.game-card-image {
  position: relative;
  width: 100%;
  padding-top: 159%; /* Match actual slot image ratio 350/220 */
  background: var(--bg3);
  overflow: hidden;
}

.game-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.3s;
}

.game-card:hover .game-card-image img {
  transform: scale(1.1);
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card:hover .game-card-overlay {
  opacity: 1;
}

.game-card-play {
  padding: 14px 32px;
  background: linear-gradient(135deg, #c300ff 0%, #8b00cc 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(195, 0, 255, 0.4);
}

.game-card:hover .game-card-play {
  transform: translateY(0);
  opacity: 1;
}

.game-card-play:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(195, 0, 255, 0.6);
}

.game-card-play i {
  width: 20px;
  height: 20px;
}

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

.game-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--t1);
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-provider {
  font-size: 12px;
  color: var(--t3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Game Page */
.game-page {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 75px;
  left: 255px;
  right: 275px;
  height: calc(100vh - 95px);
  background: var(--bg1);
  z-index: 100;
}

.game-page.active {
  display: flex;
}


/* Wins feed on game page - flows naturally, not absolute */
.game-page .game-wins-feed {
  position: relative;
  margin-bottom: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  flex-shrink: 0;
}

.game-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.game-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--t1);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.game-btn:hover {
  background: var(--bg4);
  border-color: #c300ff;
}

.game-btn i {
  width: 18px;
  height: 18px;
}

.game-btn-back span {
  display: inline;
}

.game-btn-fullscreen {
  padding: 10px;
}

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

.game-info-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-info-provider {
  font-size: 12px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.game-controls {
  display: flex;
  gap: 8px;
}

.game-container {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
  min-height: 0;
}

#gameFrame {
  width: 100%;
  height: 100%;
  border: none;
}

/* Fullscreen mode (desktop) */
.game-page.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  margin-top: 0;
  background: #000;
}

.game-page.fullscreen .game-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s;
}

.game-page.fullscreen:hover .game-header {
  opacity: 1;
}

.game-page.fullscreen .game-container {
  position: absolute;
  inset: 0;
  min-height: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile */
@media (max-width: 768px) {
  .slots-container {
    margin-top: 70px;
    padding: 0 12px;
  }

  /* Wins feed - horizontal on mobile too */
  .slots-wins-feed {
    margin-bottom: 16px;
    border-radius: 12px;
  }

  .wins-feed-header {
    padding: 10px 16px;
    font-size: 13px;
  }

  .wins-feed-header i {
    width: 16px;
    height: 16px;
  }

  .wins-feed-list {
    padding: 12px;
    gap: 10px;
  }

  .win-item {
    min-width: 120px;
    padding: 10px;
    gap: 6px;
  }

  .win-item-image {
    width: 70px;
    height: 70px;
  }

  .win-item-game {
    font-size: 11px;
    max-width: 110px;
  }

  .win-item-user {
    font-size: 9px;
  }

  .win-item-amount {
    font-size: 12px;
  }

  /* Hide wins feed on game page for mobile */
  .game-page .game-wins-feed {
    display: none;
  }

  .slots-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .slots-title {
    font-size: 24px;
  }

  .slots-title i {
    width: 28px;
    height: 28px;
  }

  .slots-stats {
    font-size: 13px;
  }

  /* Filters on same row */
  .slots-filters {
    flex-direction: row;
    width: 100%;
    gap: 8px;
  }

  .slots-search {
    flex: 1;
    min-width: 0;
  }

  .slots-search input {
    padding: 10px 12px 10px 38px;
    font-size: 13px;
    border-radius: 10px;
  }

  .slots-search i,
  .slots-search svg {
    left: 12px;
    width: 14px;
    height: 14px;
  }

  .slots-provider-filter {
    flex-shrink: 0;
  }

  .provider-btn {
    width: auto;
    min-width: 120px;
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 10px;
    white-space: nowrap;
  }

  .provider-btn i {
    width: 14px;
    height: 14px;
  }

  /* Dropdown adjustments for mobile */
  #providersList {
    left: auto;
    right: 0;
    min-width: 200px;
    max-height: 300px;
  }

  #providersList .provider-item {
    padding: 8px 10px;
    font-size: 12px;
  }

  #providersList .provider-item img {
    height: 14px;
  }

  /* Grid: exactly 2 columns */
  .slots-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .game-card {
    border-radius: 12px;
  }

  .game-card-info {
    padding: 10px;
  }

  .game-card-name {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .game-card-provider {
    font-size: 11px;
  }

  .game-card-play {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 10px;
  }

  .game-card-play i {
    width: 16px;
    height: 16px;
  }

  /* Game Page Mobile - Fullscreen by default */
  .game-page {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 64px;
    height: auto;
    z-index: 99999;
    margin-top: 0;
    min-height: 0;
  }

  .game-header {
    padding: 12px 16px;
    gap: 12px;
  }

  .game-btn {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
  }

  .game-btn i {
    width: 16px;
    height: 16px;
  }

  .game-btn-back span {
    display: none;
  }

  .game-btn-fullscreen {
    padding: 8px;
  }

  .game-info-name {
    font-size: 14px;
  }

  .game-info-provider {
    font-size: 11px;
  }

  .game-container {
    min-height: 0;
    max-height: calc(100vh - 70px - 64px - 60px);
  }

  #gameFrame {
    max-height: calc(100vh - 70px - 64px - 60px);
  }

  /* Fullscreen mode on mobile */
  .game-page.fullscreen .game-header {
    padding: 10px 12px;
  }

  /* Loading state */
  .slots-loading {
    padding: 40px 20px;
  }

  .spinner {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
  }
}

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
  .game-page {
    left: 0;
    right: 0;
    height: calc(100vh - 80px);
  }
}
