/* InBloom Website - Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Moslin';
  src: url('/fonts/Moslin.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

:root {
  --color-bg: #c5b684;
  --color-card: #1a1a2e;
  --color-card-border: #0d0d1a;
  --color-text-primary: #ede7d9;
  --color-text-secondary: #9090a0;
  --color-gold: #ffde58;
  --color-purple: #a855f7;
  --color-magenta: #ec4899;
  --color-success: #22c55e;
  --color-error: #ef4444;
  --border-color: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(255, 255, 255, 0.05);
  --color-blue: #2a78c7;
  /* Legacy aliases */
  --color-cyan: #ffde58;
  --color-bg-dark: #0a0a0f;
  --color-bg-medium: #12121a;
}

body {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--color-bg);
  color: var(--color-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/images/shop/backgroundoverlay.webp');
  background-repeat: repeat;
  background-size: 1600px;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

/* Header & Navigation - fixed on all pages so it always stays at top */
.header {
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
}

/* Push content below fixed header */
body {
  padding-top: var(--header-height, 60px); /* Match header height, set dynamically by JS */
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #ffde58;
}

.nav-link.active {
  color: #ffde58;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #ffde58;
}

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:hover::after,
.dropdown-menu:hover {
  display: block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  background: var(--color-card);
  border: 2px solid var(--color-card-border);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 160px;
  z-index: 1000;
  pointer-events: auto;
}

/* Invisible bridge to prevent gap between trigger and menu */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.25rem;
  background: transparent;
  z-index: 999;
  display: none;
  pointer-events: auto;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.dropdown-item:hover {
  color: var(--color-gold);
  background: rgba(255, 222, 88, 0.1);
}


/* User Menu */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.user-menu-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.user-menu-button:hover {
  transform: scale(1.05);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  transition: border-color 0.2s ease;
}

.user-menu-button:hover .user-avatar {
  border-color: var(--color-cyan);
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--color-card);
  border: 2px solid var(--color-card-border);
  border-radius: 12px;
  min-width: 260px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.user-menu-dropdown.active {
  display: block;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.user-menu-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}

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

.user-menu-name {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-username {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.user-menu-item:hover {
  background: rgba(255, 222, 88, 0.1);
  color: var(--color-gold);
}

.user-menu-icon {
  font-size: 1.125rem;
  width: 20px;
  text-align: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--color-card);
  color: var(--color-text-primary);
  border: 2px solid var(--color-card-border);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(26, 26, 46, 0.3);
}

/* Sign In nav button (warm theme) */
.nav-signin-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  background: #1a1a2e !important;
  color: #ede7d9 !important;
  border: 3px solid #0d0d1a !important;
  border-radius: 10px;
  font-family: 'Moslin', 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  text-decoration: none !important;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-signin-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(26, 26, 46, 0.25);
  color: #ede7d9 !important;
}

.btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--color-text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 222, 88, 0.1);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* Main Content */
.main {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  position: relative;
}

/* Remove padding and max-width constraints when ranked page is inside */
.main:has(.ranked-page) {
  padding: 0;
  max-width: 100%;
}

/* Remove all constraints when home strips are present */
.main:has(.home-strips) {
  padding: 0;
  max-width: 100%;
  width: 100%;
  margin: 0;
}

/* Home strips - no container constraints */
.main > .home-strips {
  width: 100%;
  padding: 0;
  margin: 0;
}

@media (max-width: 768px) {
  body {
    padding-top: var(--header-height, 48px);
  }
  
  .main {
    padding: 1rem;
  }
  
  .main:has(.home-strips) {
    padding: 0;
  }
  
  .header {
    padding: 0.75rem 1rem;
  }
  
  .nav {
    gap: 1rem;
    justify-content: center;
  }
  
  .nav-link {
    font-size: 0.9rem;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  /* Dropdown: fixed below header, right-aligned, never clips */
  .user-menu-dropdown {
    position: fixed;
    top: var(--header-height, 48px);
    right: 0.75rem;
    left: auto;
  }
}

/* Extra-small screens where nav wraps to two rows */
@media (max-width: 420px) {
  body {
    padding-top: var(--header-height, 82px);
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* Cards */
.card {
  background: var(--color-card);
  border: 2px solid var(--color-card-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.card:hover {
  border-color: var(--color-gold);
  box-shadow: 0 0 20px rgba(255, 222, 88, 0.1);
}

/* Page Titles */
.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-card);
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Home Page - Horizontal Strips */
.home-strips {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  position: relative;
}

.home-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.home-strip:last-child {
  border-bottom: none;
}

.strip-content {
  padding: 3rem 3rem;
  text-align: center;
  z-index: 2;
  position: relative;
  max-width: 800px;
}

.strip-title {
  font-family: 'Moslin', 'IBM Plex Mono', monospace;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: normal;
  font-stretch: 75%;
  transform: scaleX(0.85);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-purple), var(--color-magenta), var(--color-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  margin: 0;
}

/* Platform-specific title gradients for social page */
.strip-gradient-twitch .strip-title {
  background: linear-gradient(135deg, #9146ff, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.strip-gradient-youtube .strip-title {
  background: linear-gradient(135deg, #ff0000, #ff4444, #ff6666);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.strip-gradient-tiktok .strip-title {
  background: linear-gradient(135deg, #000000, #ff0050, #00f2ea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.strip-gradient-instagram .strip-title {
  background: linear-gradient(135deg, #e1306c, #833ab4, #fd1d1d, #fcb045);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.strip-gradient-spotify .strip-title {
  background: linear-gradient(135deg, #1db954, #1ed760, #1ed760);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.strip-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.strip-gradient-cyan {
  background: linear-gradient(135deg, rgba(255, 222, 88, 0.15), rgba(255, 222, 88, 0.05), rgba(255, 222, 88, 0.15));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.strip-gradient-blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.15));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.strip-gradient-purple {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.05), rgba(168, 85, 247, 0.15));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.strip-gradient-magenta {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(236, 72, 153, 0.05), rgba(236, 72, 153, 0.15));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.strip-gradient-blue {
  background: linear-gradient(135deg, rgba(42, 120, 199, 0.2), rgba(42, 120, 199, 0.05), rgba(42, 120, 199, 0.2));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.strip-gradient-blue-light {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(96, 165, 250, 0.03), rgba(96, 165, 250, 0.15));
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

/* Social Platform Gradients */
.strip-gradient-twitch {
  background: url('/images/social/twitchbanner.png') center center no-repeat;
  background-size: cover;
}

.strip-gradient-youtube {
  background: url('/images/social/youtubebanner.png') center center no-repeat;
  background-size: cover;
}

.strip-gradient-tiktok {
  background: url('/images/social/tiktokbanner.png') center center no-repeat;
  background-size: cover;
}

.strip-gradient-instagram {
  background: url('/images/social/instagrambanner.png') center center no-repeat;
  background-size: cover;
}

.strip-gradient-spotify {
  background: url('/images/social/spotifybanner.png') center center no-repeat;
  background-size: cover;
}

/* Social Strip Header with Icon */
.strip-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

/* Full label image (replaces title + icon, e.g. Twitch) */
.strip-label {
  height: clamp(2.5rem, 5vw, 4rem);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.home-strip:hover .strip-label {
  transform: scale(1.1);
}

.strip-icon {
  height: clamp(2.5rem, 5vw, 3.5rem);
  width: auto;
  max-width: clamp(2.5rem, 5vw, 3.5rem);
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
  align-self: center;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
}

.home-strip:hover .strip-icon {
  transform: scale(1.1);
}

/* Hover Effects - Shiny Glass */
.home-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.home-strip:hover::before {
  left: 100%;
}

.home-strip:hover {
  filter: brightness(1.1);
}

.home-strip:hover .strip-title {
  transform: scaleX(0.85) scaleY(1.05);
}

.home-strip::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.home-strip:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  .strip-content {
    padding: 2.25rem 2rem;
  }
  
  .home-strip {
    min-height: 215px;
  }
}


/* Responsive adjustments for home page */
@media (max-width: 768px) {
  .home-hero {
    padding: 4rem 1rem 3rem;
  }
  
  .features-section {
    padding: 3rem 1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-card {
    padding: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Account Page Styles */
.account-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.account-header {
  text-align: center;
  margin-bottom: 3rem;
}

.account-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.account-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  transition: all 0.3s ease;
}

.account-card:hover {
  border-color: var(--color-cyan);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.1);
}

.account-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--color-cyan);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.account-card-title::before {
  content: '👤';
  font-size: 1.25rem;
}

.account-field {
  margin-bottom: 1.5rem;
}

.account-field:last-child {
  margin-bottom: 0;
}

.account-label {
  display: block;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.account-value {
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  color: var(--color-text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.account-value:hover {
  border-color: var(--color-cyan);
  background: rgba(0, 217, 255, 0.05);
}

.account-value-linked {
  padding: 0.875rem 1.25rem;
}

.account-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.linked-account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.linked-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.linked-indicator-discord {
  background: #5865F2;
  box-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
}

.linked-indicator-twitch {
  background: #9146FF;
  box-shadow: 0 0 10px rgba(145, 70, 255, 0.5);
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.linked-username {
  font-weight: 500;
  color: var(--color-text-primary);
}

.not-linked {
  color: var(--color-text-secondary);
  font-style: italic;
}

.account-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.account-loading {
  text-align: center;
  padding: 4rem 2rem;
}

.loading-text {
  color: var(--color-text-secondary);
  font-size: 1.125rem;
}

@media (max-width: 768px) {
  .account-page {
    padding: 1rem 0;
  }
  
  .account-card {
    padding: 1.5rem;
  }
  
  .account-links-grid {
    grid-template-columns: 1fr;
  }
  
  .account-header {
    margin-bottom: 2rem;
  }
}

/* ─── Legal Acceptance Modal ─────────────────────────────── */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.legal-modal {
  background: var(--bg-card, #1a1a2e);
  border: 2px solid var(--bg-header-band, #5c5438);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  color: var(--text-light, #ede7d9);
  font-family: 'IBM Plex Mono', monospace;
}

.legal-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-modal h2 {
  font-family: 'Moslin', 'IBM Plex Mono', monospace;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text-light, #ede7d9);
}

.legal-modal p {
  font-size: 0.85rem;
  color: var(--text-muted, #a09882);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.legal-modal-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.legal-modal-links a {
  color: var(--accent, #d4a843);
  text-decoration: underline;
  font-size: 0.85rem;
  transition: opacity 0.2s;
}

.legal-modal-links a:hover {
  opacity: 0.8;
}

.legal-modal-accept {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--bg-header-band, #5c5438);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Moslin', 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.legal-modal-accept:hover {
  filter: brightness(1.2);
  transform: scale(1.02);
}

.legal-modal-accept:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
