/* ==========================================
   MODAL: Overlay, Profile, Social Links
   ========================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-dark-secondary);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  position: relative;
  padding: 3rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--color-rust);
}

/* Profile Banner */
.profile-banner {
  width: 100%;
  height: 180px;
  border-radius: 12px 12px 0 0;
  margin: -2rem -2rem 1.5rem -2rem;
  width: calc(100% + 4rem);
  background-color: var(--color-dark);
}

/* Social Links as Buttons */
.profile-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.profile-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-cream);
  background: var(--color-dark);
  border: 1.5px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  position: relative;
}

.profile-social-btn .social-icon {
  font-size: 1rem;
}

.profile-social-btn .social-copy-hint {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
  position: absolute;
  bottom: -1.1rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}

.profile-social-btn:hover .social-copy-hint {
  opacity: 1;
}

.profile-social-btn:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.profile-social-btn.discord  { border-color: rgba(88,101,242,0.4); }
.profile-social-btn.youtube  { border-color: rgba(255,0,0,0.3); }
.profile-social-btn.twitter  { border-color: rgba(29,161,242,0.3); }
.profile-social-btn.instagram{ border-color: rgba(225,48,108,0.3); }
.profile-social-btn.twitch   { border-color: rgba(145,70,255,0.3); }
.profile-social-btn.other    { border-color: rgba(255,255,255,0.15); }

.profile-social-btn.discord:hover  { border-color: #5865F2; background: rgba(88,101,242,0.15); }
.profile-social-btn.youtube:hover  { border-color: #FF0000; background: rgba(255,0,0,0.1); }
.profile-social-btn.twitter:hover  { border-color: #1DA1F2; background: rgba(29,161,242,0.1); }
.profile-social-btn.instagram:hover{ border-color: #E1306C; background: rgba(225,48,108,0.1); }
.profile-social-btn.twitch:hover   { border-color: #9146FF; background: rgba(145,70,255,0.1); }
.profile-social-btn.other:hover    { border-color: var(--color-teal); background: rgba(255,255,255,0.08); }

/* Modal Body Design */
.profile-modal {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.profile-left {
  flex: 0 0 200px;
  text-align: center;
}

.profile-img-large {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--color-teal);
  flex-shrink: 0;
}

.profile-right {
  flex: 1;
}

.profile-name {
  font-size: 2.5rem;
  color: var(--color-cream);
  margin-bottom: 0.2rem;
  line-height: 1.1;
}

.profile-role {
  font-size: 1.2rem;
  color: var(--color-rust);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.profile-bio {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.profile-section-title {
  font-size: 1.1rem;
  color: var(--color-mustard);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-list {
  margin-bottom: 1.5rem;
  padding-left: 1.2rem;
  color: var(--text-main);
}

.profile-list li {
  margin-bottom: 0.3rem;
}

/* ==========================================
   STEAM-LIKE PROJECT DETAIL MODAL
   ========================================== */

.steam-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.steam-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.steam-title {
  font-size: 1.8rem;
  color: var(--color-cream);
}

.steam-type-badge {
  background: rgba(74, 155, 147, 0.2);
  color: var(--color-teal);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Covers Carousel */
.steam-carousel {
  margin-bottom: 20px;
}

.carousel-main {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.carousel-main img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

.steam-carousel .carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  font-size: 1.5rem;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
  width: auto;
  height: auto;
  border-radius: 0;
  backdrop-filter: none;
  opacity: 1;
  display: block;
}

.steam-carousel .carousel-arrow:hover {
  background: rgba(0,0,0,0.85);
  transform: translateY(-50%);
}

.steam-carousel .carousel-prev { left: 0; border-radius: 0 6px 6px 0; }
.steam-carousel .carousel-next { right: 0; border-radius: 6px 0 0 6px; }

.carousel-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.carousel-thumb {
  width: 80px;
  height: 50px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, border 0.2s;
  border: 2px solid transparent;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-thumb.is-video .thumb-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  pointer-events: none;
}

.carousel-thumb.active,
.carousel-thumb:hover {
  opacity: 1;
  border-color: var(--color-teal);
}

/* Carousel Video Embed */
.carousel-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.carousel-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Steam Detail Body - Two Column */
.steam-detail-body {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}

.steam-main-col {
  flex: 1;
  min-width: 0;
}

.steam-side-col {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steam-synopsis {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.steam-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.steam-info-block {
  background: rgba(255,255,255,0.04);
  padding: 12px;
  border-radius: 8px;
}

.steam-info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.steam-info-value {
  font-size: 0.95rem;
  color: var(--color-cream);
  font-weight: 600;
}

.steam-team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.steam-team-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.steam-team-chip:hover {
  background: rgba(74, 155, 147, 0.2);
}

.steam-team-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.steam-team-chip span {
  font-size: 0.82rem;
  color: var(--color-cream);
}

.steam-play-btn {
  width: 100%;
  text-align: center;
}

/* Steam Sections */
.steam-section {
  margin-top: 24px;
}

.steam-section-title {
  font-size: 1.1rem;
  color: var(--color-cream);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.steam-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.steam-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Steam Chapters */
.steam-chapters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steam-chapter-card {
  display: flex;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  padding: 14px;
  border-radius: 8px;
  align-items: flex-start;
  transition: background 0.2s;
}

.steam-chapter-card:hover {
  background: rgba(255,255,255,0.07);
}

.chapter-thumb {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

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

.chapter-info h4 {
  color: var(--color-mustard);
  font-size: 1rem;
  margin-bottom: 4px;
}

.chapter-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.chapter-trailer-link {
  color: var(--color-teal);
  font-size: 0.82rem;
  text-decoration: underline;
}

.chapter-release-date {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--color-teal);
  margin-bottom: 6px;
  opacity: 0.9;
}

/* ==========================================
   RATING SYSTEM
   ========================================== */

.rating-badge-card {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  z-index: 2;
}

.rating-section {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.rating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.rating-label {
  font-size: 0.9rem;
  color: var(--color-cream);
  font-weight: 600;
}

.rating-pct {
  font-size: 0.9rem;
  font-weight: 700;
}

.rating-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.rating-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.rating-counts {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.rating-actions {
  display: flex;
  gap: 10px;
}

.rate-btn {
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: var(--color-cream);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.rate-btn:hover {
  background: rgba(255,255,255,0.12);
}

.rate-like:hover {
  border-color: #66c0f4;
  color: #66c0f4;
}

.rate-dislike:hover {
  border-color: #c35b2e;
  color: #c35b2e;
}
