/*
 * HiveStudio - Premium Design System & Stylesheet
 * Integrates glassmorphism, responsive visual excellence, micro-animations, and top-layer transitions.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- CSS Variables & Design Tokens --- */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* HSL Color Tokens */
  --bg-obsidian: 240 10% 3.9%;
  --bg-card: 240 10% 6%;
  --bg-card-hover: 240 10% 9%;
  --border-glass: 240 5.9% 15%;
  --border-active: 270 91.2% 65.1%;

  --color-violet: 270 91.2% 65.1%;
  --color-violet-glow: 270 91.2% 65.1% / 0.15;
  --color-emerald: 150 100% 45%;
  --color-emerald-glow: 150 100% 45% / 0.15;
  --color-gold: 45 93% 47%;
  --color-gold-glow: 45 93% 47% / 0.15;
  
  --text-primary: 0 0% 98%;
  --text-secondary: 240 5% 64.9%;
  --text-muted: 240 5% 44%;
  --text-accent: 270 91.2% 65.1%;

  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  
  --shadow-glow-violet: 0 0 30px hsl(var(--color-violet) / 0.2);
  --shadow-glow-emerald: 0 0 30px hsl(var(--color-emerald) / 0.2);
  --shadow-glow-gold: 0 0 30px hsl(var(--color-gold) / 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

/* --- Base Reset & Scrollbar Styling --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: hsl(var(--bg-obsidian));
  color: hsl(var(--text-primary));
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 10% 20%, hsl(var(--color-violet) / 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, hsl(var(--color-emerald) / 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--bg-obsidian));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--border-glass));
  border-radius: var(--radius-full);
  border: 2px solid hsl(var(--bg-obsidian));
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--text-muted));
}

/* --- Premium Layout Classes (Glassmorphism & Gradients) --- */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(135deg, hsl(var(--text-primary)) 30%, hsl(var(--color-violet)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-emerald {
  background: linear-gradient(135deg, hsl(var(--text-primary)) 30%, hsl(var(--color-emerald)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-gold {
  background: linear-gradient(135deg, hsl(var(--text-primary)) 30%, hsl(var(--color-gold)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-panel {
  background: rgba(10, 10, 12, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.glass-card {
  background: rgba(15, 15, 18, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--color-violet) / 0.4);
  box-shadow: var(--shadow-glow-violet);
  background: rgba(20, 20, 25, 0.7);
}

/* --- Header & Navigation --- */
header.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 8, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid hsl(var(--border-glass));
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, hsl(var(--color-violet)), hsl(var(--color-emerald)));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow-violet);
}

.logo-text span {
  color: hsl(var(--color-emerald));
}

.nav-role-selector {
  display: flex;
  background: rgba(20, 20, 25, 0.8);
  border: 1px solid hsl(var(--border-glass));
  padding: 4px;
  border-radius: var(--radius-full);
  gap: 4px;
}

.role-btn {
  background: transparent;
  border: none;
  color: hsl(var(--text-secondary));
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-btn:hover {
  color: hsl(var(--text-primary));
}

.role-btn.active {
  background: linear-gradient(135deg, hsl(var(--color-violet)), hsl(var(--color-violet) / 0.8));
  color: white;
  box-shadow: 0 4px 15px hsl(var(--color-violet) / 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-premium {
  background: linear-gradient(135deg, hsl(var(--color-violet)), hsl(var(--color-emerald)));
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-glow-violet);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-premium:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
  box-shadow: 0 0 25px hsl(var(--color-emerald) / 0.3);
}

/* --- Hero Section --- */
.hero-section {
  padding: 100px 0 60px 0;
  text-align: center;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: hsl(var(--color-violet-glow));
  border: 1px solid hsl(var(--color-violet) / 0.3);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  color: hsl(var(--color-violet));
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  animation: breathe 3s infinite ease-in-out;
}

.hero-section h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.hero-section p {
  color: hsl(var(--text-secondary));
  max-width: 650px;
  margin: 0 auto 36px auto;
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: left;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: hsl(var(--text-primary));
  line-height: 1;
}

.stat-label {
  color: hsl(var(--text-muted));
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- Filters & Search --- */
.gallery-controls {
  margin: 40px 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gallery-search-bar {
  display: flex;
  align-items: center;
  background: rgba(15, 15, 18, 0.8);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 18px;
  transition: var(--transition-smooth);
}

.gallery-search-bar:focus-within {
  border-color: hsl(var(--color-violet));
  box-shadow: var(--shadow-glow-violet);
}

.gallery-search-bar i {
  color: hsl(var(--text-muted));
  font-size: 1.1rem;
}

.gallery-search-bar input {
  background: transparent;
  border: none;
  color: white;
  width: 100%;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.gallery-search-bar input:focus {
  outline: none;
}

.category-tabs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 8px;
  scrollbar-width: none; /* Hide for firefox */
}

.category-tabs::-webkit-scrollbar {
  display: none; /* Hide for chrome/safari */
}

.tab-btn {
  background: rgba(20, 20, 25, 0.6);
  border: 1px solid hsl(var(--border-glass));
  color: hsl(var(--text-secondary));
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  border-color: hsl(var(--text-secondary));
  color: white;
}

.tab-btn.active {
  background: hsl(var(--color-emerald-glow));
  border-color: hsl(var(--color-emerald));
  color: hsl(var(--color-emerald));
}

/* --- Photo Grid & Cards --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 80px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--border-glass));
  background: hsl(var(--bg-card));
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.photo-card:hover {
  transform: translateY(-6px);
  border-color: hsl(var(--color-violet) / 0.5);
  box-shadow: var(--shadow-glow-violet);
}

/* Photo Protection Shield Wrapper */
.photo-shield-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #08080a;
  user-select: none;
  -webkit-user-select: none;
}

.photo-shield-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* Intercept dragging */
}

/* Interaction Shield Overlay */
.photo-interaction-guard {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: transparent;
  cursor: zoom-in;
}

/* Dense Tiled Watermark */
.photo-watermark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Ctext x='80' y='80' fill='%23ffffff' font-family='Outfit, sans-serif' font-weight='bold' font-size='11' text-anchor='middle' transform='rotate(-35, 80, 80)' opacity='1'%3EHIVESTUDIO.COM%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 12;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid hsl(var(--border-glass));
  color: white;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-badge.claimed {
  border-color: hsl(var(--color-violet));
  color: hsl(var(--color-violet));
}

.card-badge.available {
  border-color: hsl(var(--color-emerald));
  color: hsl(var(--color-emerald));
}

.card-badge.resold {
  border-color: hsl(var(--color-gold));
  color: hsl(var(--color-gold));
}

.photo-card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
}

.card-category {
  font-size: 0.75rem;
  color: hsl(var(--text-muted));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-creator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: hsl(var(--text-secondary));
}

.creator-avatar {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: hsl(var(--color-violet));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.65rem;
  font-weight: bold;
}

.card-pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid hsl(var(--border-glass));
  padding-top: 14px;
  margin-top: auto;
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.7rem;
  color: hsl(var(--text-muted));
  text-transform: uppercase;
}

.price-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.price-value span {
  font-size: 0.75rem;
  color: hsl(var(--text-secondary));
  font-weight: 400;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid hsl(var(--border-glass));
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-card-action:hover {
  background: hsl(var(--color-violet));
  border-color: hsl(var(--color-violet));
  color: white;
  box-shadow: var(--shadow-glow-violet);
}

/* --- Dynamic Revenue Split Calculator --- */
.calculator-section {
  padding: 80px 0;
  border-top: 1px solid hsl(var(--border-glass));
  border-bottom: 1px solid hsl(var(--border-glass));
  background: radial-gradient(circle at 50% 50%, hsl(var(--color-violet-glow) / 0.5) 0%, transparent 60%);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px auto;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-header p {
  color: hsl(var(--text-secondary));
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

.calc-controls {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.calc-toggle-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(20, 20, 25, 0.8);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--radius-full);
  padding: 4px;
}

.calc-toggle-btn {
  background: transparent;
  border: none;
  color: hsl(var(--text-secondary));
  padding: 10px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.calc-toggle-btn.active {
  background: hsl(var(--bg-card-hover));
  color: white;
  border: 1px solid hsl(var(--border-glass));
}

.calc-slider-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
}

.slider-amount {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: hsl(var(--color-emerald));
}

/* Premium Range Input */
.premium-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: hsl(var(--border-glass));
  border-radius: var(--radius-full);
  outline: none;
}

.premium-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: hsl(var(--color-emerald));
  cursor: pointer;
  border: 2px solid white;
  box-shadow: var(--shadow-glow-emerald);
  transition: transform 0.1s ease;
}

.premium-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid hsl(var(--border-glass));
  padding-top: 20px;
}

.calc-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: hsl(var(--text-secondary));
}

.calc-feature-item i {
  color: hsl(var(--color-emerald));
  margin-top: 3px;
}

/* Swim Split Visualization */
.calc-visualization {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
}

.split-viz-header {
  border-bottom: 1px solid hsl(var(--border-glass));
  padding-bottom: 16px;
}

.split-viz-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.split-viz-bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.split-bar-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.split-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: hsl(var(--text-secondary));
}

.split-bar-track {
  width: 100%;
  height: 12px;
  background: hsl(var(--bg-obsidian));
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid hsl(var(--border-glass));
}

.split-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--radius-full);
}

.split-bar-fill.provider {
  background: linear-gradient(90deg, hsl(var(--color-violet)), hsl(var(--color-violet) / 0.7));
}

.split-bar-fill.photographer {
  background: linear-gradient(90deg, hsl(var(--color-gold)), hsl(var(--color-gold) / 0.7));
}

.split-bar-fill.platform {
  background: linear-gradient(90deg, hsl(var(--color-emerald)), hsl(var(--color-emerald) / 0.7));
}

.split-bar-fill.stripe {
  background: #635bff; /* Stripe Purple */
}

.calc-net-payout {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid hsl(var(--border-glass));
  padding: 18px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.net-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}

.net-amount {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
}

/* --- Dashboards --- */
.dashboard-section {
  padding: 80px 0;
}

.dashboard-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-role-badge {
  background: hsl(var(--color-violet-glow));
  border: 1px solid hsl(var(--color-violet) / 0.3);
  color: hsl(var(--color-violet));
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.dashboard-role-badge.emerald {
  background: hsl(var(--color-emerald-glow));
  border-color: hsl(var(--color-emerald) / 0.3);
  color: hsl(var(--color-emerald));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 280px 1fr;
    gap: 32px;
  }
}

.db-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.db-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.db-menu-btn {
  background: transparent;
  border: none;
  color: hsl(var(--text-secondary));
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 18px;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

.db-menu-btn:hover {
  background: rgba(255, 255, 255, 0.02);
  color: white;
}

.db-menu-btn.active {
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border-left: 3px solid hsl(var(--color-violet));
}

.db-menu-btn.active.emerald {
  border-left-color: hsl(var(--color-emerald));
}

.db-stats-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 30px;
}

@media (min-width: 600px) {
  .db-stats-panel {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.db-stat-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-stat-header {
  display: flex;
  justify-content: space-between;
  color: hsl(var(--text-secondary));
  font-size: 0.8rem;
  font-weight: 500;
}

.db-stat-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--color-violet));
}

.db-stat-icon.emerald {
  color: hsl(var(--color-emerald));
}

.db-stat-number {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
}

.db-view-panel {
  display: none;
  flex-direction: column;
  gap: 30px;
}

.db-view-panel.active {
  display: flex;
}

/* Upload Container */
.upload-form-box {
  padding: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-group input, .form-group select, .form-group textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--radius-sm);
  padding: 12px;
  color: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: hsl(var(--color-violet));
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.upload-dropzone {
  border: 2px dashed hsl(var(--border-glass));
  padding: 40px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.upload-dropzone:hover {
  border-color: hsl(var(--color-violet));
  background: rgba(255, 255, 255, 0.01);
}

.upload-dropzone i {
  font-size: 2rem;
  color: hsl(var(--text-muted));
}

/* Dashboard Assets List */
.assets-table-card {
  overflow: hidden;
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.db-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: hsl(var(--text-secondary));
  border-bottom: 1px solid hsl(var(--border-glass));
}

.db-table td {
  padding: 16px 20px;
  border-bottom: 1px solid hsl(var(--border-glass));
}

.db-table tbody tr:last-child td {
  border-bottom: none;
}

.db-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.table-asset-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-asset-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #111;
  border: 1px solid hsl(var(--border-glass));
}

.table-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
}

.table-badge.claim {
  background: hsl(var(--color-emerald-glow));
  color: hsl(var(--color-emerald));
  border: 1px solid hsl(var(--color-emerald) / 0.2);
}

.table-badge.royal {
  background: hsl(var(--color-gold-glow));
  color: hsl(var(--color-gold));
  border: 1px solid hsl(var(--color-gold) / 0.2);
}

.table-badge.none {
  background: rgba(255, 255, 255, 0.05);
  color: hsl(var(--text-secondary));
}

/* --- Native Top-Layer Modals (<dialog>) --- */
dialog {
  margin: auto;
  width: 90%;
  max-width: 600px;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--radius-lg);
  padding: 36px;
  color: white;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), var(--shadow-glow-violet);
  outline: none;
}

/* Backdrop styles */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Modern @starting-style discrete transitions */
dialog[open] {
  opacity: 1;
  transform: scale(1) translateY(0);

  @starting-style {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
}

dialog {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
  transition-behavior: allow-discrete;
}

dialog::backdrop {
  opacity: 0;
  transition: opacity 0.3s ease-out, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
  transition-behavior: allow-discrete;
}

dialog[open]::backdrop {
  opacity: 1;

  @starting-style {
    opacity: 0;
  }
}

/* Dialog Inner Layout */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid hsl(var(--border-glass));
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: hsl(var(--text-secondary));
  font-size: 1.3rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: white;
}

/* Modal Licensing Split Options */
.claim-options-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 20px 0;
}

@media (min-width: 600px) {
  .claim-options-box {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

.claim-option-card {
  border: 1px solid hsl(var(--border-glass));
  border-radius: var(--radius-md);
  padding: 20px;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.claim-option-card:hover {
  border-color: hsl(var(--color-violet) / 0.5);
  background: rgba(255, 255, 255, 0.02);
}

.claim-option-card.selected {
  border-color: hsl(var(--color-violet));
  background: hsl(var(--color-violet-glow));
  box-shadow: 0 4px 20px hsl(var(--color-violet) / 0.1);
}

.option-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: hsl(var(--color-violet-glow));
  border: 1px solid hsl(var(--color-violet) / 0.3);
  color: hsl(var(--color-violet));
  font-size: 0.65rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.option-badge.gold {
  background: hsl(var(--color-gold-glow));
  border-color: hsl(var(--color-gold) / 0.3);
  color: hsl(var(--color-gold));
}

.option-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
}

.option-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: white;
}

.option-description {
  font-size: 0.75rem;
  color: hsl(var(--text-secondary));
  line-height: 1.4;
}

.option-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.7rem;
  color: hsl(var(--text-muted));
  border-top: 1px solid hsl(var(--border-glass));
  padding-top: 10px;
}

/* Photo details block inside modal */
.modal-photo-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 600px) {
  .modal-photo-preview {
    grid-template-columns: 180px 1fr;
    gap: 20px;
  }
}

.modal-img-wrapper {
  aspect-ratio: 1;
  width: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  border: 1px solid hsl(var(--border-glass));
}

.modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-photo-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  border-bottom: 1px solid hsl(var(--border-glass));
  padding-bottom: 6px;
}

.meta-label {
  color: hsl(var(--text-secondary));
}

.meta-value {
  color: white;
  font-weight: 500;
}

/* Subtle Legal Warning inside Checkout */
.subtle-legal-box {
  background: rgba(220, 38, 38, 0.03);
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: hsl(var(--text-secondary));
  line-height: 1.4;
  margin-bottom: 24px;
}

.subtle-legal-box strong {
  color: #ef4444; /* Light red */
}

/* --- Screenshot Warning Dialog --- */
#screenshot-alert-modal {
  max-width: 480px;
  text-align: center;
  background: rgba(15, 6, 6, 0.98);
  border-color: #ef4444;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(239, 68, 68, 0.2);
}

.warning-icon {
  font-size: 3rem;
  color: #ef4444;
  margin-bottom: 16px;
  animation: pulse 1.5s infinite ease-in-out;
}

.warning-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.warning-desc {
  font-size: 0.85rem;
  color: hsl(var(--text-secondary));
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Footer Section */
footer.app-footer {
  border-top: 1px solid hsl(var(--border-glass));
  padding: 40px 0;
  text-align: center;
  background: #060608;
  color: hsl(var(--text-muted));
  font-size: 0.85rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: white;
  margin-bottom: 12px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 16px 0;
}

.footer-nav a {
  color: hsl(var(--text-secondary));
  text-decoration: none;
}

.footer-nav a:hover {
  color: white;
}

/* CSS Print Protection */
@media print {
  body, .gallery-grid, .photo-card, img, dialog {
    display: none !important;
  }
}

/* Keyframe Animations */
@keyframes breathe {
  0%, 100% {
    opacity: 0.9;
    box-shadow: 0 0 10px hsl(var(--color-violet) / 0.1);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 20px hsl(var(--color-violet) / 0.35);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.8;
  }
}

/* --- Dynamic Hero Canvas Background --- */
.hero-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

/* --- Welcome TOS Overlay Modal & Checklist --- */
#welcome-tos-modal {
  max-width: 620px;
  background: rgba(8, 8, 10, 0.98);
  border: 1px solid hsl(var(--color-violet) / 0.35);
  box-shadow: 0 24px 60px rgba(0,0,0,0.9), var(--shadow-glow-violet);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: left;
}

.tos-logo-row {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.tos-welcome-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.tos-welcome-subtitle {
  color: hsl(var(--text-secondary));
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 30px;
  line-height: 1.5;
}

.tos-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.tos-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid hsl(var(--border-glass));
  padding: 16px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.tos-list-item:hover {
  border-color: hsl(var(--color-violet) / 0.3);
  background: rgba(255, 255, 255, 0.02);
}

.tos-item-icon {
  width: 28px;
  height: 28px;
  background: hsl(var(--color-violet-glow));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--color-violet));
  font-size: 0.9rem;
  flex-shrink: 0;
}

.tos-item-icon.emerald {
  background: hsl(var(--color-emerald-glow));
  color: hsl(var(--color-emerald));
}

.tos-item-text {
  font-size: 0.82rem;
  color: hsl(var(--text-secondary));
  line-height: 1.45;
}

.tos-item-text strong {
  color: white;
  display: block;
  font-size: 0.88rem;
  margin-bottom: 3px;
}

/* --- Checkout TOS Checkbox Styling --- */
.checkout-tos-wrapper {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid hsl(var(--border-glass));
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}

.checkout-tos-wrapper:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: hsl(var(--color-violet) / 0.3);
}

.checkout-tos-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: hsl(var(--color-emerald));
  cursor: pointer;
  flex-shrink: 0;
}

.checkout-tos-label {
  font-size: 0.8rem;
  color: hsl(var(--text-secondary));
  line-height: 1.4;
  cursor: pointer;
}

.checkout-tos-label a {
  color: hsl(var(--color-violet));
  text-decoration: underline;
}

/* --- Live Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  min-width: 320px;
  max-width: 400px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsl(var(--border-glass));
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateX(120%);
  animation: toast-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: var(--transition-smooth);
}

.toast-message.closing {
  animation: toast-slide-out 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.toast-icon.success {
  background: hsl(var(--color-emerald-glow));
  color: hsl(var(--color-emerald));
}

.toast-icon.info {
  background: hsl(var(--color-violet-glow));
  color: hsl(var(--color-violet));
}

.toast-icon.warning {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 0.78rem;
  color: hsl(var(--text-secondary));
  line-height: 1.35;
}

.toast-close {
  background: transparent;
  border: none;
  color: hsl(var(--text-muted));
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  padding: 0 2px;
}

.toast-close:hover {
  color: white;
}

@keyframes toast-slide-in {
  to {
    transform: translateX(0);
  }
}

@keyframes toast-slide-out {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* Steganography Scanner Sweep Animation */
@keyframes stego-sweep-anim {
  0% {
    transform: translateY(-100%);
  }
  50% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(-100%);
  }
}

#stego-scanner-sweep {
  animation: stego-sweep-anim 2.5s infinite ease-in-out;
}

/* Guided Tour Animations */
@keyframes slideInUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fa-spin-hover:hover {
  animation: fa-spin 2s infinite linear;
}

