/* ==========================================================================
   TekneArt - "TikTok del Arte" UI Design System
   Path: src/app/css/style.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
  --bg-dark: #07080c;
  --bg-card: rgba(18, 20, 29, 0.75);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(24px) saturate(180%);
  
  --primary-pink: #ff2d55;
  --primary-gold: #ffb800;
  --accent-cyan: #00f2fe;
  --accent-purple: #9d4edd;
  
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dim: rgba(255, 255, 255, 0.45);
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-full: 9999px;
  --radius-lg: 20px;
  --radius-md: 12px;
  
  --feed-width: 100vw;
  --feed-height: 100dvh;
  --transition-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: var(--font-body);
  color: var(--text-main);
}

/* App Container */
#app {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 30%, #151828 0%, #07080c 100%);
}

/* Top Header Bar (Fijo e Inmutable) */
.top-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 64px !important;
  padding: 0 20px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  z-index: 1500 !important;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%) !important;
  pointer-events: none !important;
}

.top-header * {
  pointer-events: auto;
}

.brand-logo,
.zoom-logo {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: var(--font-serif) !important;
  font-weight: 400 !important;
  font-size: 1.6rem !important;
  letter-spacing: 1.5px !important;
  color: #ffffff !important;
  text-decoration: none !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
  pointer-events: auto !important;
  z-index: 2000 !important;
}

.zoom-logo {
  position: fixed !important;
  top: 6px !important;
  left: 10px !important;
}

.top-header .brand-logo {
  transform: translate(-10px, -10px);
}

.header-tabs {
  display: flex;
  gap: 16px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  position: relative;
  transition: color 0.3s ease;
}

.tab-btn.active, .tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary-pink);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(-10px);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.18);
}

/* Feed Viewport */
#feed-container {
  width: 100%;
  height: 100%;
  position: relative;
  touch-action: none;
  overflow: hidden;
}

/* Slide Element */
.feed-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s var(--transition-smooth);
  will-change: transform;
}

/* Artwork Main Image Wrapper */
.artwork-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none !important;
}

.artwork-img {
  display: block;
  will-change: transform;
  transition: transform 0.3s ease;
  cursor: pointer;
  pointer-events: auto !important;
}

/* Right Sidebar Action Controls (TikTok Style - Fijo e Inmutable) */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-sidebar {
  position: fixed !important;
  /* Botones de 42 px: su centro queda a 20 px del borde derecho. */
  right: -1px !important;
  bottom: 50px !important;
  bottom: calc(50px + env(safe-area-inset-bottom, 0px)) !important;
  top: auto !important;
  left: auto !important;
  z-index: 2000 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 16px !important;
  pointer-events: auto !important;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
}

.action-count {
  font-size: 14px;
}

.avatar-action-item {
  margin-bottom: 6px;
}

.avatar-badge-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  cursor: pointer;
}

.avatar-badge-wrap .artist-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--primary-pink));
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  object-fit: cover;
}

.avatar-plus-btn {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-pink);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.action-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: transparent;
  backdrop-filter: none;
  border: none;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.85));
  transition: transform 0.2s ease, color 0.2s ease, filter 0.2s ease;
  box-shadow: none;
}

.action-btn svg {
  fill: currentColor;
  transition: fill 0.2s ease, transform 0.2s ease;
}

.zoom-btn svg {
  fill: none;
}

.action-btn:hover {
  transform: scale(1.15);
}

.action-btn.liked {
  color: var(--primary-pink);
}

a.action-btn.buy-btn {
  color: var(--primary-gold);
  text-decoration: none;
}

a.action-btn.buy-btn:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 12px rgba(255, 184, 0, 0.7));
}

/* Bottom Left TikTok Metadata Panel (Posición unificada a 10px, 10px para Feed y Zoom) */
.meta-panel,
.zoom-meta-panel {
  position: absolute !important;
  left: 10px !important;
  bottom: 10px !important;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  right: auto !important;
  top: auto !important;
  max-width: calc(100vw - 90px) !important;
  z-index: 2000 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 4px !important;
  pointer-events: none !important;
}

.meta-artist {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  pointer-events: auto !important;
}

.artist-name {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
  color: var(--primary-gold, #ffb800) !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 15px rgba(0, 0, 0, 0.8) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 101 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.artist-name:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

.meta-title {
  font-family: var(--font-serif, serif) !important;
  font-weight: 500 !important;
  font-size: 1rem !important;
  line-height: 1.35 !important;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 15px rgba(0, 0, 0, 0.8) !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 !important;
  word-break: break-word !important;
}

.meta-links {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 2px;
  pointer-events: auto !important;
}

.buy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  pointer-events: auto !important;
  cursor: pointer !important;
}

.buy-badge.nft {
  background: linear-gradient(135deg, #ffb800 0%, #ff5e00 100%);
  color: #000;
}

.buy-badge.original {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #000;
}

.buy-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.tag-container {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.tag-inline {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-right: 4px;
}

.tag-expand-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0 4px;
}

/* Modals & Fullscreen Overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  height: -webkit-fill-available;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 9999;
  display: none !important;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 90%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.7);
  position: relative;
}

.zoom-logo {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 110;
  pointer-events: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 110;
}

/* TV Mode Styling */
#tv-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 500;
  display: none !important;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

#tv-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.tv-image {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  transition: opacity 1.2s ease-in-out;
}

.tv-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(16px);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  display: flex;
  gap: 16px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#tv-overlay:hover .tv-controls {
  opacity: 1;
}

/* Keyframe Animations */
@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* High-End Collector Search Suite Styling */
.collector-search-card {
  max-width: 650px !important;
  width: 92% !important;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: rgba(14, 16, 24, 0.95) !important;
  backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255, 184, 0, 0.25) !important;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.85), 0 0 30px rgba(255, 184, 0, 0.08) !important;
  padding: 24px !important;
}

.search-header {
  text-align: center;
  margin-bottom: 16px;
}

.search-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.search-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.search-input-wrap {
  position: relative;
  margin-bottom: 14px;
}

.search-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-gold);
}

#search-input {
  width: 100%;
  padding: 14px 14px 14px 44px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(0, 0, 0, 0.6) !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search-input:focus {
  border-color: var(--primary-gold) !important;
  box-shadow: 0 0 15px rgba(255, 184, 0, 0.2);
}

.search-filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.search-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-chip.active, .search-chip:hover {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.25), rgba(255, 45, 85, 0.25));
  border-color: var(--primary-gold);
  color: #ffffff;
}

.collector-results-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.collector-art-card {
  display: flex;
  gap: 16px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.collector-art-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 184, 0, 0.4);
}

.card-thumb-wrap {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex-grow: 1;
}

.card-artist {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.card-gallery {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.card-btn-view, .card-btn-buy, .card-btn-nft {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.card-btn-view {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.card-btn-buy {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #000;
}

.card-btn-nft {
  background: linear-gradient(135deg, #ffb800, #ff5e00);
  color: #000;
}

.search-empty-state {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
