/* ==========================================================================
   PinoutHub Premium Stylesheet - Tech Dark Theme
   ========================================================================== */

:root {
  /* HSL Color System */
  --bg-base: hsl(222, 47%, 7%);
  --bg-surface: hsl(223, 30%, 12%);
  --bg-card: hsla(223, 30%, 15%, 0.6);
  --bg-card-hover: hsla(223, 30%, 20%, 0.85);
  
  --border-color: hsla(220, 20%, 25%, 0.4);
  --border-focus: hsl(188, 100%, 50%);
  
  --text-primary: hsl(210, 38%, 95%);
  --text-secondary: hsl(215, 20%, 65%);
  --text-muted: hsl(215, 12%, 45%);
  
  /* Neon Accents */
  --color-cyan: hsl(188, 100%, 50%);
  --color-cyan-glow: hsla(188, 100%, 50%, 0.15);
  --color-violet: hsl(271, 91%, 65%);
  --color-violet-glow: hsla(271, 91%, 65%, 0.2);
  --color-success: hsl(145, 80%, 50%);
  --color-danger: hsl(355, 90%, 60%);
  
  /* Font Families */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Utilities */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px hsla(188, 100%, 50%, 0.05);
  --shadow-neon: 0 0 15px hsla(188, 100%, 50%, 0.3);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Reset & Globals */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(hsla(188, 100%, 50%, 0.05) 1.5px, transparent 1.5px),
    radial-gradient(hsla(271, 91%, 65%, 0.03) 1.5px, transparent 1.5px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-cyan);
}

/* Ambient Background Glows */
.bg-glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(120px);
  opacity: 0.15;
  animation: pulseGlow 15s infinite alternate ease-in-out;
}
.bg-glow-1 {
  background: radial-gradient(circle, var(--color-cyan) 0%, transparent 70%);
  top: -10vw;
  right: -5vw;
}
.bg-glow-2 {
  background: radial-gradient(circle, var(--color-violet) 0%, transparent 70%);
  bottom: 10vw;
  left: -10vw;
  animation-delay: -7s;
}

@keyframes pulseGlow {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.12;
  }
  50% {
    transform: translate(8%, 5%) scale(1.15);
    opacity: 0.22;
  }
  100% {
    transform: translate(-4%, -8%) scale(0.9);
    opacity: 0.1;
  }
}

/* Layout utilities */
.hidden {
  display: none !important;
}

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

.margin-top-lg {
  margin-top: 1.5rem;
}

/* Header & Navigation */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, hsla(222, 47%, 5%, 0.85), hsla(222, 47%, 8%, 0.7));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid hsla(188, 100%, 50%, 0.12);
  padding: 1.1rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), inset 0 -1px 0 rgba(255,255,255,0.02);
}

.header-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-violet));
  color: var(--bg-base);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-text .highlight {
  background: linear-gradient(to right, var(--color-cyan), var(--color-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--color-cyan), var(--color-violet));
  border-radius: 2px;
}

/* User Status Badges */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background-color: hsla(220, 20%, 20%, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 0.85rem;
}

.user-role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-violet);
  box-shadow: 0 0 8px var(--color-violet);
}

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

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-violet));
  color: var(--bg-base);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.25);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: 0.5s ease-out;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2.5px);
  box-shadow: 0 6px 22px rgba(0, 240, 255, 0.5), 0 0 15px rgba(180, 70, 255, 0.4);
}

.btn-secondary {
  background-color: hsla(223, 30%, 12%, 0.4);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.btn-secondary:hover {
  background-color: hsla(223, 30%, 18%, 0.7);
  border-color: var(--color-cyan);
  color: var(--color-cyan);
  box-shadow: 0 0 12px var(--color-cyan-glow);
  transform: translateY(-1.5px);
}

.btn-full-width {
  width: 100%;
  padding: 0.8rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4.5rem 1rem 3rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: hsla(188, 100%, 50%, 0.05);
  border: 1px solid hsla(188, 100%, 50%, 0.25);
  color: var(--color-cyan);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: var(--font-display);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.05), inset 0 0 10px rgba(0, 240, 255, 0.05);
  margin-bottom: 0.5rem;
  animation: heroBadgePulse 3s infinite ease-in-out;
}

@keyframes heroBadgePulse {
  0%, 100% {
    border-color: hsla(188, 100%, 50%, 0.25);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.05);
  }
  50% {
    border-color: hsla(188, 100%, 50%, 0.6);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
  }
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-cyan);
  box-shadow: 0 0 8px var(--color-cyan);
  position: relative;
}

.pulse-indicator::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--color-cyan);
  animation: ripple 1.5s infinite ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--color-cyan) 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 15px rgba(0, 0, 0, 0.5));
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 400;
  max-width: 650px;
  line-height: 1.5;
}

/* Explorer / Main UI Area */
.app-content {
  flex: 1;
  width: 90%;
  max-width: 1400px;
  margin: 0 auto 4rem;
}

/* Search & Filter Card */
.search-filter-card {
  background: linear-gradient(135deg, hsla(223, 30%, 15%, 0.75), hsla(223, 30%, 10%, 0.55));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid hsla(188, 100%, 50%, 0.15);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.search-filter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  animation: scanLine 8s linear infinite;
}

@keyframes scanLine {
  0% { left: -200px; }
  100% { left: 100%; }
}

.search-box {
  display: flex;
  align-items: center;
  background-color: hsla(222, 47%, 4%, 0.7);
  border: 1px solid hsla(220, 20%, 30%, 0.5);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.4rem;
  gap: 0.85rem;
  transition: var(--transition);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.search-box:focus-within {
  border-color: var(--color-cyan);
  box-shadow: 0 0 18px var(--color-cyan-glow), inset 0 1px 3px rgba(0, 0, 0, 0.5);
  background-color: hsla(222, 47%, 2%, 0.85);
}

.search-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  width: 100%;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.filters-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .filters-row {
    grid-template-columns: 1fr 1fr;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.filter-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--text-muted);
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-tag {
  background-color: hsla(220, 25%, 16%, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid hsla(220, 20%, 30%, 0.35);
  color: var(--text-secondary);
  padding: 0.45rem 1.15rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.filter-tag:hover {
  background-color: hsla(220, 20%, 25%, 0.7);
  color: var(--text-primary);
  border-color: hsla(188, 100%, 50%, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.filter-tag:active {
  transform: translateY(0);
}

.filter-tag.active {
  background: linear-gradient(135deg, hsla(188, 100%, 50%, 0.15), hsla(271, 91%, 65%, 0.15));
  border-color: var(--color-cyan);
  color: var(--color-cyan);
  box-shadow: 0 0 18px var(--color-cyan-glow), inset 0 1px 0 rgba(255,255,255,0.1);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

/* Results header & grid */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-violet));
  border-radius: 2px;
}

.colab-info-tip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background-color: hsla(271, 91%, 65%, 0.05);
  border: 1px dashed hsla(271, 91%, 65%, 0.3);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

.tip-icon {
  color: var(--color-violet);
  flex-shrink: 0;
}

/* Cards Grid */
.pinout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 576px) {
  .pinout-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .pinout-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .pinout-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Card */
.pinout-card {
  background: linear-gradient(135deg, hsla(223, 30%, 15%, 0.5), hsla(223, 30%, 10%, 0.7));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid hsla(220, 20%, 30%, 0.35);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.pinout-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-violet)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.pinout-card:hover {
  transform: translateY(-8px);
  background: linear-gradient(135deg, hsla(223, 30%, 18%, 0.7), hsla(223, 30%, 13%, 0.85));
  box-shadow: 0 15px 35px rgba(0, 240, 255, 0.15), 0 5px 15px rgba(0,0,0,0.5);
  border-color: transparent;
}

.pinout-card:hover::after {
  opacity: 0.6;
}

.card-image-container {
  height: 180px;
  background-color: hsl(223, 30%, 4%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.card-image-container::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 95%, rgba(0, 240, 255, 0.3) 98%, transparent 100%);
  background-size: 100% 200%;
  background-position: 0 -100%;
  transition: none;
  z-index: 5;
  pointer-events: none;
}

.pinout-card:hover .card-image-container::before {
  background-position: 0 100%;
  transition: background-position 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
}

.pinout-card:hover .card-img {
  transform: scale(1.08);
  opacity: 1;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 10;
}

/* Badge colors by type */
.badge-emmc {
  background-color: hsla(188, 100%, 50%, 0.15);
  border: 1px solid var(--color-cyan);
  color: var(--color-cyan);
}

.badge-ufs {
  background-color: hsla(271, 91%, 65%, 0.15);
  border: 1px solid var(--color-violet);
  color: var(--color-violet);
}

.badge-testpoint {
  background-color: hsla(145, 80%, 50%, 0.15);
  border: 1px solid var(--color-success);
  color: var(--color-success);
}

.badge-drill {
  background-color: hsla(24, 100%, 50%, 0.15);
  border: 1px solid hsl(24, 100%, 50%);
  color: hsl(24, 100%, 50%);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-brand {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-cyan);
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-notes {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

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

.card-author-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon-danger {
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon-danger:hover {
  color: var(--color-danger);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Forms & Inputs */
.form-container {
  background-color: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 800px;
  margin: 2rem auto;
  box-shadow: var(--shadow-md);
}

.form-header {
  margin-bottom: 2rem;
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  background-color: hsla(222, 47%, 7%, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 10px var(--color-cyan-glow);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled,
.custom-select-trigger.disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  background-color: hsla(222, 47%, 5%, 0.4) !important;
  border-color: hsla(220, 20%, 20%, 0.2) !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

.form-group select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Image Dropzone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  background-color: hsla(222, 47%, 7%, 0.2);
}

.dropzone:hover {
  border-color: var(--color-cyan);
  background-color: hsla(188, 100%, 50%, 0.02);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
}

.dropzone-icon {
  color: var(--text-muted);
  transition: var(--transition);
}

.dropzone:hover .dropzone-icon {
  color: var(--color-cyan);
  transform: translateY(-3px);
}

.dropzone-title {
  font-weight: 600;
  font-size: 1rem;
}

.dropzone-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.preview-container {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preview-container img {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.btn-remove-preview {
  background-color: var(--color-danger);
  color: white;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-remove-preview:hover {
  background-color: hsl(355, 90%, 50%);
  transform: translateY(-1px);
}

/* Modals General */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.25s ease-out;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(6, 9, 15, 0.85);
  backdrop-filter: blur(8px);
}

.modal-wrapper {
  position: relative;
  z-index: 1010;
  width: 95%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  color: var(--text-primary);
  background-color: hsla(220, 20%, 20%, 0.6);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* Viewer Modal Customization */
.viewer-modal-card {
  height: 85vh;
  max-height: 800px;
}

.viewer-title-area {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
}

.viewer-body {
  display: grid;
  grid-template-columns: 1fr;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

@media (min-width: 992px) {
  .viewer-body {
    grid-template-columns: 1fr 300px;
  }
}

/* Interactive Zoom Workspace */
.zoom-workspace {
  background-color: hsl(223, 30%, 5%);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 50vh;
  min-height: 350px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 992px) {
  .zoom-workspace {
    height: 100%;
    border-bottom: none;
    border-right: 1px solid var(--border-color);
  }
}

/* Floating Controls */
.zoom-controls {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 50;
  display: flex;
  align-items: center;
  background-color: hsla(223, 30%, 10%, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  padding: 0.3rem;
  border-radius: 30px;
  gap: 0.25rem;
  box-shadow: var(--shadow-sm);
}

.zoom-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.zoom-btn:hover {
  background-color: hsla(220, 20%, 25%, 0.6);
  color: var(--color-cyan);
}

.zoom-level-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0 0.8rem;
  min-width: 50px;
  text-align: center;
}

/* Interactive Viewport */
.zoom-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-viewport:active {
  cursor: grabbing;
}

.zoom-canvas-wrapper {
  position: absolute;
  transform-origin: center center;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.zoom-canvas-wrapper img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  /* Vector rendering clean sharp lines */
  image-rendering: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-radius: 4px;
}

.viewer-helper-tip {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: hsla(223, 30%, 10%, 0.7);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.8rem;
  border-radius: 12px;
  pointer-events: none;
  white-space: nowrap;
}

/* Sidebar in Viewer */
.viewer-sidebar {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.5rem;
  overflow-y: auto;
  background-color: var(--bg-surface);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sidebar-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--text-muted);
}

.voltage-card {
  background-color: hsla(220, 20%, 10%, 0.4);
  border: 1px solid var(--border-color);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
}

.voltage-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.voltage-value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-success);
}

.pinout-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.contributor-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.avatar-mock {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-violet));
  color: var(--bg-base);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
}

.contributor-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* Auth Modal Styles */
.auth-modal-card {
  max-width: 440px;
  background: linear-gradient(135deg, hsla(223, 30%, 14%, 0.85), hsla(223, 30%, 8%, 0.95)) !important;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid hsla(188, 100%, 50%, 0.2) !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px hsla(188, 100%, 50%, 0.05);
}

.auth-body {
  padding: 1.75rem 2rem 2.25rem;
}

.auth-tabs {
  display: flex;
  background-color: hsla(222, 47%, 4%, 0.65);
  border: 1px solid hsla(220, 20%, 30%, 0.35);
  border-radius: 30px;
  padding: 0.25rem;
  margin-bottom: 2rem;
  position: relative;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
  text-align: center;
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-violet));
  color: var(--bg-base);
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.3);
}

.auth-error-alert {
  background-color: hsla(355, 90%, 60%, 0.12);
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.role-selector-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.role-card-label {
  display: block;
  cursor: pointer;
}

.role-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-card {
  border: 1px solid hsla(220, 20%, 25%, 0.5);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: hsla(222, 47%, 4%, 0.3);
}

.role-radio:checked + .role-card {
  border-color: var(--color-cyan);
  background-color: hsla(188, 100%, 50%, 0.08);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.15);
  transform: scale(1.015);
}

.role-card-title {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.role-radio:checked + .role-card .role-card-title {
  color: var(--color-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.role-card-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.demo-accounts-info {
  margin-top: 1.75rem;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(135deg, hsla(223, 30%, 10%, 0.8), hsla(223, 30%, 6%, 0.5));
  border: 1px dashed hsla(188, 100%, 50%, 0.25);
  border-radius: var(--radius-sm);
  font-family: 'SFMono-Regular', Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
}

.demo-accounts-info::before {
  content: 'DEMO ACCESS DECK';
  position: absolute;
  top: -9px;
  left: 15px;
  background-color: hsl(223, 30%, 10%);
  padding: 0 6px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-cyan);
  letter-spacing: 1px;
  border: 1px solid hsla(188, 100%, 50%, 0.25);
  border-radius: 4px;
}

.demo-accounts-title {
  display: none;
}

/* Footer */
.main-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background-color: hsl(223, 30%, 8%);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

/* ==========================================================================
   Social Login & OAuth Mock Styles
   ========================================================================= */

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider:not(:empty)::before {
  margin-right: .75em;
}

.auth-divider:not(:empty)::after {
  margin-left: .75em;
}

.social-login-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-social {
  background-color: hsla(220, 20%, 12%, 0.65);
  border: 1px solid hsla(220, 20%, 25%, 0.5);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-social:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

.btn-google:hover {
  border-color: #4285F4;
  background-color: rgba(66, 133, 244, 0.08) !important;
  box-shadow: 0 0 12px rgba(66, 133, 244, 0.2), 0 5px 12px rgba(0, 0, 0, 0.3);
}

.btn-social-icon {
  flex-shrink: 0;
}

.btn-apple {
  background-color: #111 !important;
  color: #fff !important;
  border-color: #333 !important;
}

.btn-apple:hover {
  background-color: #222 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15), 0 5px 12px rgba(0, 0, 0, 0.3);
}

/* OAuth Mock Dialog styling */
.oauth-mock-card {
  border-radius: var(--radius-md) !important;
  background-color: hsl(223, 30%, 10%) !important;
}

.oauth-mock-header {
  padding: 2rem 2rem 0.5rem;
  text-align: center;
}

.oauth-mock-logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.oauth-mock-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.oauth-mock-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.oauth-account-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.oauth-account-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: hsla(222, 47%, 7%, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.oauth-account-item:hover {
  background-color: hsla(220, 20%, 18%, 0.7);
  border-color: var(--color-cyan);
}

.oauth-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-family: var(--font-display);
}

.oauth-account-details {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.oauth-account-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.oauth-account-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Thanks System (Feedback Loop) Styles
   ========================================================================= */

.btn-thanks {
  border-color: var(--color-cyan) !important;
  color: var(--color-cyan) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-thanks:hover {
  background-color: var(--color-cyan-glow) !important;
  box-shadow: 0 0 10px var(--color-cyan-glow);
}

.btn-thanks.liked {
  background: linear-gradient(135deg, var(--color-success), hsl(145, 80%, 40%)) !important;
  color: #111 !important;
  border-color: transparent !important;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.btn-thanks.liked .thanks-icon {
  fill: #111;
  stroke: #111;
  animation: thanksPulse 0.4s ease-out;
}

@keyframes thanksPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.thanks-icon {
  transition: var(--transition);
}

/* Card view thanks statistics */
.card-thanks-info {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-cyan);
  background-color: var(--color-cyan-glow);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.3rem;
  font-weight: 600;
}

/* Floating Emoji Micro-Interaction */
.floating-emoji {
  position: fixed;
  pointer-events: none;
  font-size: 1.8rem;
  z-index: 2000;
  animation: floatUpAndFade 0.8s ease-out forwards;
}

@keyframes floatUpAndFade {
  0% {
    transform: translateY(0) scale(0.5) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-80px) scale(1.2) rotate(15deg);
    opacity: 0;
  }
}

/* Floating Toast Notification */
.toast-alert {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 3000;
  background-color: var(--bg-surface);
  border: 1px solid var(--color-success);
  border-left: 5px solid var(--color-success);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastSlideIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-alert.fade-out {
  animation: toastFadeOut 0.3s ease-in forwards;
}

@keyframes toastFadeOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(20px);
    opacity: 0;
  }
}

.toast-icon {
  color: var(--color-success);
  flex-shrink: 0;
}

.toast-message {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ==========================================================================
   Custom Searchable Dropdown Styles
   ========================================================================= */

.custom-select-group {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: hsla(222, 47%, 7%, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  height: 43px; /* Align with standard inputs */
}

.custom-select-trigger:hover,
.custom-select-group.open .custom-select-trigger {
  border-color: var(--color-cyan);
  box-shadow: 0 0 10px var(--color-cyan-glow);
}

.trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trigger-arrow {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  display: flex;
  align-items: center;
}

.custom-select-group.open .trigger-arrow {
  transform: rotate(180deg);
  color: var(--color-cyan);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  background-color: hsl(223, 30%, 12%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  z-index: 250;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 250px;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-search {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  background-color: hsla(222, 47%, 7%, 0.4);
}

.custom-select-search input {
  background-color: hsla(222, 47%, 7%, 0.8) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  padding: 0.4rem 0.6rem 0.4rem 2rem !important;
  font-size: 0.85rem !important;
  border-radius: 4px !important;
  height: auto !important;
}

.custom-select-search input:focus {
  border-color: var(--color-cyan) !important;
  box-shadow: 0 0 5px var(--color-cyan-glow) !important;
}

.custom-select-options {
  overflow-y: auto;
  flex: 1;
  max-height: 180px;
}

/* Custom scrollbar inside options list */
.custom-select-options::-webkit-scrollbar {
  width: 6px;
}
.custom-select-options::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: var(--color-cyan);
}

.custom-option {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.custom-option:hover {
  background-color: hsla(220, 20%, 20%, 0.6);
  color: var(--text-primary);
}

.custom-option.selected {
  background-color: hsla(188, 100%, 50%, 0.08);
  color: var(--color-cyan);
  font-weight: 600;
}

.custom-option.hidden {
  display: none !important;
}

/* ==========================================================================
   Collaborator Dashboard Styles
   ========================================================================== */
.dashboard-container {
  margin: 1rem auto 3rem;
  width: 100%;
}

.dashboard-header-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-welcome {
  flex: 1;
  min-width: 280px;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

@media (min-width: 576px) {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card {
  background: linear-gradient(135deg, hsla(223, 30%, 15%, 0.6), hsla(223, 30%, 10%, 0.4));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: hsla(188, 100%, 50%, 0.25);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.05);
  transform: translateY(-2px);
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: hsla(222, 47%, 4%, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.stat-details {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.dashboard-section-box {
  background: linear-gradient(135deg, hsla(223, 30%, 15%, 0.5), hsla(223, 30%, 10%, 0.6));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.dashboard-section-subtitle {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.my-uploads-table-container {
  overflow-x: auto;
  min-height: 150px;
}

.my-uploads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.my-uploads-table th {
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.my-uploads-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}

.my-uploads-table tr:last-child td {
  border-bottom: none;
}

.my-uploads-table tr:hover td {
  background-color: hsla(220, 20%, 20%, 0.2);
  color: var(--text-primary);
}

.table-device-cell {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.table-device-model {
  font-weight: 700;
  color: var(--text-primary);
}

.table-device-brand {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-cyan);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Actions in Table */
.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-table-action {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

/* ==========================================================================
   Mobile & Tablet Responsive Adjustments
   ========================================================================== */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.8rem;
    letter-spacing: -1px;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    padding: 0.2rem 0;
  }
  
  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .user-badge {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
  }

  .hero-section {
    padding: 3rem 0.5rem 2rem;
  }

  .hero-title {
    font-size: 2.2rem;
    letter-spacing: -0.5px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .search-filter-card {
    padding: 1.5rem !important;
  }
  
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  
  .modal-wrapper {
    width: 98%;
    max-height: 95vh;
  }
}

@media (max-width: 576px) {
  .app-content {
    width: 95%;
    padding: 1rem 0 2rem;
  }
  
  .logo-text {
    font-size: 1.4rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .modal-header {
    padding: 1rem 1.25rem;
  }
  
  .viewer-title-area {
    gap: 0.5rem;
  }
  
  .modal-title {
    font-size: 1.2rem;
  }
  
  .floating-emoji {
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   Hex Editor Styles (Estilo HxD)
   ========================================================================== */
.hex-view {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  margin-top: 1rem;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.hex-dropzone-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 4rem 2rem;
  background-color: hsla(222, 47%, 5%, 0.2);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  min-height: 400px;
}

.hex-dropzone-container:hover {
  border-color: var(--color-cyan);
  background-color: hsla(188, 100%, 50%, 0.02);
}

.hex-dropzone-inner {
  pointer-events: none;
}

#btn-select-hex-file {
  pointer-events: auto;
}

.hex-editor-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 500px;
}

.hex-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: hsla(222, 47%, 4%, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hex-toolbar-left, .hex-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-compact {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.divider-vertical {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
}

.hex-goto-box, .hex-search-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hex-goto-box input, .hex-search-box input {
  background-color: hsla(222, 47%, 4%, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 0.8rem;
  width: 130px;
  transition: var(--transition);
}

.hex-goto-box input:focus, .hex-search-box input:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 8px var(--color-cyan-glow);
}

.hex-search-box select {
  background-color: hsla(222, 47%, 4%, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 0.8rem;
  cursor: pointer;
}

.hex-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  flex: 1;
}

@media (min-width: 992px) {
  .hex-workspace {
    grid-template-columns: 1fr 280px;
  }
}

.hex-grid-container {
  background-color: hsl(223, 30%, 5%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  height: 450px;
  overflow-y: auto;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  scrollbar-width: thin;
}

.hex-grid-spacer {
  width: 100%;
  pointer-events: none;
}

.hex-grid-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
}

.hex-row {
  display: flex;
  align-items: center;
  height: 22px;
  line-height: 22px;
  font-family: 'SFMono-Regular', Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.01);
}

.hex-row-offset {
  color: var(--text-muted);
  width: 80px;
  user-select: none;
  font-weight: bold;
}

.hex-row-bytes {
  display: flex;
  gap: 5px;
  width: 360px;
  padding: 0 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.hex-byte {
  width: 17px;
  text-align: center;
  cursor: text;
  transition: background-color 0.1s;
  user-select: none;
  border-radius: 2px;
  color: var(--text-secondary);
}

.hex-byte.space-divider {
  margin-right: 8px;
}

.hex-byte:hover {
  background-color: var(--color-cyan-glow);
  color: var(--color-cyan);
}

.hex-byte.selected {
  background-color: var(--color-cyan) !important;
  color: var(--bg-base) !important;
  font-weight: 700;
}

.hex-byte.modified {
  color: var(--color-danger) !important;
  font-weight: 700;
  border-bottom: 1px solid var(--color-danger);
}

.hex-row-ascii {
  display: flex;
  padding-left: 10px;
  width: 150px;
}

.hex-ascii-char {
  width: 8px;
  text-align: center;
  user-select: none;
  cursor: text;
  border-radius: 2px;
  color: var(--text-muted);
}

.hex-ascii-char.selected {
  background-color: var(--color-violet) !important;
  color: var(--bg-base) !important;
  font-weight: 700;
}

.hex-ascii-char.modified {
  color: var(--color-danger) !important;
  font-weight: 700;
}

.hex-inspector {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.inspector-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

.inspector-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inspector-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.inspector-label {
  color: var(--text-muted);
}

.inspector-val {
  font-weight: 600;
}

.inspector-val.monospace {
  font-family: 'SFMono-Regular', Consolas, monospace;
}

.inspector-help-tip {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: hsla(223, 30%, 8%, 0.5);
  border: 1px dashed var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.text-cyan {
  color: var(--color-cyan);
}

/* Bottom Preloader memory compatibility panel */
.hex-preloader-panel-bottom {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.preloader-panel-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--color-cyan);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin: 0;
  display: flex;
  align-items: center;
}

.preloader-mem-list-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-height: 250px;
  overflow-y: auto;
  padding: 0.25rem;
  scrollbar-width: thin;
}

.preloader-mem-chip {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  background-color: hsla(223, 30%, 12%, 0.7);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--color-cyan);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.preloader-mem-chip:hover {
  border-color: var(--color-cyan);
  background-color: hsla(188, 100%, 50%, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px hsla(188, 100%, 50%, 0.1);
}

.preloader-mem-chip-brand {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background-color: hsla(188, 100%, 50%, 0.1);
  color: var(--color-cyan);
  border: 1px solid hsla(188, 100%, 50%, 0.2);
}

/* Admin Layout styles */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .admin-layout {
    grid-template-columns: 350px 1fr;
  }
}




