:root {
  --primary-color: #8b5cf6; /* Purple matching digital theme */
  --primary-hover: #7c3aed;
  --secondary-color: #10b981; /* Green matching physical theme */
  --secondary-hover: #059669;
  --bg-dark: #111827;
  --text-dark: #111827;
  --text-light: #6b7280;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.5);
  --border-radius: 16px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-image: url('assets/background.png');
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Subtle overlay if the background is too bright */
body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(230, 240, 245, 0.6) 0%, rgba(200, 220, 210, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography styles matching the mockup */
h1 {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 24px;
  color: #111827;
}

.subtitle {
  font-size: 1.25rem;
  color: #4b5563;
  max-width: 600px;
  margin: 0 auto 40px auto;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Navigation (Dynamic Island) */
header {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

.header-container {
  pointer-events: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  background-color: #000000;
  padding: 12px 16px 12px 36px;
  border-radius: 60px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.2);
  width: fit-content;
  max-width: 90vw;
  margin: 0 auto;
}

.header-container:hover {
  transform: scale(1.02);
  gap: 80px; /* Expands the island smoothly on hover */
  padding: 12px 24px 12px 44px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: #fff;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}

.nav-links a:hover {
  color: #fff;
}

.btn {
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: var(--transition);
}

.btn-outline {
  background-color: var(--secondary-color);
  color: white;
  padding: 10px 20px;
}
.btn-outline:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 80px 0 60px 0;
  position: relative;
  z-index: 10;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-primary {
  background-color: #84cc16; /* Light green from the design */
  color: #111;
}

.btn-primary:hover {
  background-color: #65a30d;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(132, 204, 22, 0.3);
}

.btn-primary .arrow {
  margin-left: 8px;
  transition: transform 0.2s;
}

.btn-primary:hover .arrow {
  transform: translateX(4px);
}

.btn-secondary {
  background-color: #111;
  color: white;
}

.btn-secondary:hover {
  background-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Floating Showcase Panel */
.showcase {
  margin-top: 20px;
  position: relative;
  z-index: 20;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  border-radius: var(--border-radius);
  display: flex;
  min-height: 500px;
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
}

/* Dashboard Sidebar */
.panel-sidebar {
  width: 200px;
  background-color: rgba(249, 250, 251, 0.8);
  border-right: 1px solid rgba(229, 231, 235, 0.5);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.branding {
  background-color: #84cc16;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 32px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-menu li {
  font-size: 0.875rem;
  color: #4b5563;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-menu li:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.sidebar-menu li.active {
  background-color: white;
  font-weight: 600;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mt-auto {
  margin-top: auto;
}

/* Dashboard Main View */
.panel-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.panel-header {
  padding: 16px 32px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.breadcrumbs {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.search-bar {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 20px;
  padding: 8px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  color: #9ca3af;
}

.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  margin-left: 8px;
  font-size: 0.875rem;
  width: 200px;
}

.panel-body {
  padding: 32px;
  flex: 1;
}

.panel-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.digital { background: #111; color: white; }
.physical { background: #84cc16; color: white; }

.badge.digital-filled { background: #111; color: white; }
.badge.physical-filled { background: #84cc16; color: white; }
.badge.category-filled { background: #f3f4f6; color: #4b5563; }

.desc {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 24px;
}

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.filter {
  font-size: 0.875rem;
  padding: 8px 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-weight: 500;
  transition: all 0.2s;
}

.filter:hover { background: #f9fafb; }
.chevron { margin-left: 8px; font-size: 0.7rem; color: #9ca3af; }

.active-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.tag {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
  color: #4b5563;
  cursor: pointer;
}

.results-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 16px;
}

/* Product Cards */
.product-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid transparent;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-color: #84cc16;
}

.card-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  overflow: hidden;
}
.icon-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-meta {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 8px;
}

.card-info .badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.meta-link {
  font-size: 0.75rem;
  color: #84cc16;
  font-weight: 500;
  cursor: pointer;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: transparent;
  border: 1px solid #e5e7eb;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: #6b7280;
}

.icon-btn:hover { background: #f3f4f6; color: #111; }

.buy-btn {
  width: auto;
  padding: 0 16px;
  border-radius: 20px;
  font-weight: 600;
  background: #111;
  color: white;
  border: none;
}
.buy-btn:hover {
  background: #84cc16;
  color: #111;
}

/* Trust Section */
.trust-section {
  text-align: center;
  padding: 60px 0;
  margin-top: 40px;
  position: relative;
  z-index: 10;
}

.trust-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.logos {
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.trust-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: -0.05em;
}

/* --- NEW AUTH, ACCOUNT, CHAT STYLES --- */

/* Auth Panel */
.auth-panel {
  flex-direction: column;
  max-width: 450px;
  min-height: auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.85); /* Slightly brighter for forms */
}

.auth-toggle {
  display: flex;
  background: rgba(17, 24, 39, 0.05);
  border-radius: 30px;
  padding: 4px;
  margin-bottom: 32px;
}

.toggle-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 26px;
  font-weight: 600;
  font-size: 0.875rem;
  color: #6b7280;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-btn.active {
  background: white;
  color: #111;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.auth-form h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
}

.input-group input {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: white;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.input-group input:focus {
  border-color: #84cc16;
  box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.1);
}

/* Chat System */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(249, 250, 251, 0.5);
  border-radius: 12px;
  margin-bottom: 16px;
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
}

.chat-bubble.them {
  background: white;
  border: 1px solid #e5e7eb;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-bubble.me {
  background: #84cc16;
  color: #111;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-input-area {
  display: flex;
  gap: 12px;
}

.chat-input {
  flex: 1;
  padding: 12px 20px;
  border-radius: 30px;
  border: 1px solid #e5e7eb;
  outline: none;
}

/* Profile / Setup */
.profile-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 24px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  .nav-links { display: none; } /* Hide for simplicity in demo */
  .glass-panel { flex-direction: column; }
  .panel-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(229, 231, 235, 0.5); padding: 16px; }
  .sidebar-menu { flex-direction: row; overflow-x: auto; }
  .mt-auto { margin-top: 0; }
  .filters { flex-wrap: wrap; }
  .card { flex-direction: column; align-items: flex-start; gap: 16px; }
  .card-actions { width: 100%; justify-content: flex-end; }
}

/* --- Modal Styles --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 450px;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  line-height:1;
  color: #9ca3af;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #111;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 24px;
}
