/* ========================================
   Profile Page Styles
======================================== */

:root {
  --profile-bg: #0f0f1a;
  --profile-card: #1a1a2e;
  --profile-text: #f8fafc;
  --profile-text-secondary: #94a3b8;
  --profile-primary: #6366f1;
  --profile-border: rgba(255, 255, 255, 0.08);
  --link-color: #6366f1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--profile-bg);
  color: var(--profile-text);
  min-height: 100vh;
}

.profile-page {
  min-height: 100vh;
  background: 
    var(--custom-bg, none),
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    var(--profile-bg);
  background-size: cover, auto, auto;
  background-position: center, center, center;
  background-attachment: fixed, scroll, scroll;
  background-repeat: no-repeat, no-repeat, repeat;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.profile-container {
  max-width: 480px;
  width: 100%;
  padding: 2rem 1rem 4rem;
}

/* Preview Banner */
.preview-banner {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.preview-banner a {
  color: #fcd34d;
  text-decoration: underline;
}

/* Profile Header */
.profile-header {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-avatar-wrapper {
  margin-bottom: 1rem;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--profile-primary);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.profile-avatar-default {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--profile-primary) 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.profile-name {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.profile-bio {
  color: var(--profile-text-secondary);
  margin: 0;
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto;
}

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--profile-text-secondary);
  transition: all 0.2s ease;
  text-decoration: none;
}

.social-icon:hover {
  background: var(--profile-primary);
  border-color: var(--profile-primary);
  color: white;
  transform: translateY(-2px);
}

/* Featured Links */
.featured-links {
  margin-bottom: 1.5rem;
}

.featured-link {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: var(--profile-text);
  transition: all 0.2s ease;
}

.featured-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.4);
  border-color: var(--link-color, var(--profile-primary));
}

.featured-link-icon {
  width: 48px;
  height: 48px;
  background: var(--link-color, var(--profile-primary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.featured-link-icon .icon-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-link-content {
  flex: 1;
  min-width: 0;
}

.featured-link-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.featured-link-desc {
  color: var(--profile-text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Regular Links */
.profile-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.steam-widget-card {
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 14px;
  padding: 1rem;
  overflow: hidden;
}

.featured-links .steam-widget-card {
  margin-bottom: 0.75rem;
}

.steam-widget-header {
  margin-bottom: 0.75rem;
  text-align: center;
}

.steam-widget-title {
  font-weight: 600;
}

.steam-widget-desc {
  color: var(--profile-text-secondary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  line-height: 1.4;
}

.steam-widget-iframe {
  width: 100%;
  border: 0;
  height: 190px;
}

.itch-widget-iframe {
  width: 100%;
  border: 0;
  height: 167px;
}

.responsive-video {
  position: relative;
  width: 100%;
  /* padding-top: 56.25%; */ /* keep default unset; scoped below for profile embeds */
  border-radius: 12px;
  overflow: hidden;
}

.responsive-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Profile page only: give embedded iframes a 16:9 box without affecting press kit HTML5 <video> */
.profile-container .responsive-video {
  padding-top: 56.25%; /* 16:9 */
}

/* Responsive Image (same aspect ratio as video - 16:9) */
.responsive-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.responsive-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.responsive-image:hover img {
  transform: scale(1.02);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 2048px;
  max-height: 2048px;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  line-height: 1;
  padding: 0;
}

.lightbox-close:hover {
  opacity: 1;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--profile-text);
  transition: all 0.2s ease;
}

.profile-link:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--link-color, var(--profile-primary));
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.profile-link:hover .profile-link-icon {
  opacity: .6;
}

.profile-link-icon {
  width: 40px;
  height: 40px;
  background: var(--link-color, var(--profile-primary));
  opacity: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.profile-link-icon i {
  position: absolute;
  color: var(--link-color, var(--profile-primary));
}

.profile-link-icon .icon-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.profile-link-title {
  flex: 1;
  font-weight: 500;
  text-align: center;
}

.profile-link-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.profile-link-text .profile-link-title {
  flex: none;
}

.profile-link-desc {
  font-size: 0.8rem;
  color: var(--profile-text-secondary);
  margin-top: 0.15rem;
}

.profile-link-arrow {
  color: var(--profile-text-secondary);
  opacity: 0;
  transition: all 0.2s ease;
}

.profile-link:hover .profile-link-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* No Links Message */
.no-links {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--profile-text-secondary);
}

.no-links i {
  opacity: 0.3;
}

/* Branding Footer */
.profile-branding {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--profile-border);
}

.profile-branding a {
  color: var(--profile-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.profile-branding a:hover {
  opacity: 1;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 480px) {
  .profile-container {
    padding: 1.5rem 0.75rem 3rem;
  }
  
  .profile-avatar,
  .profile-avatar-default {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }
  
  .profile-name {
    font-size: 1.5rem;
  }
  
  .featured-link {
    padding: 1rem;
  }
  
  .featured-link-icon {
    width: 40px;
    height: 40px;
  }
}

