/* WebVisto - Modern Bootstrap 5.3 Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-app: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-elevated: #283548;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(99, 102, 241, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 20px 35px -5px rgba(0, 0, 0, 0.45), 0 0 20px 0 rgba(99, 102, 241, 0.2);
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphic Navbar */
.navbar-custom {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.brand-gradient {
  font-weight: 800;
  font-size: 1.45rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-icon {
  background: var(--accent-gradient);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Search bar */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.search-wrapper .form-control {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 50rem;
  padding-left: 2.4rem;
  padding-right: 1rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.search-wrapper .form-control:focus {
  background: #1e293b;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  color: #fff;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

/* Unlock Controls */
.unlock-box {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 50rem;
  padding: 3px 4px 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.unlock-box .form-control {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  width: 100px;
  box-shadow: none;
}

.unlock-box .form-control::placeholder {
  color: var(--text-muted);
}

.unlock-box .form-control:focus {
  outline: none;
}

/* Group Filter Pills */
.group-filters-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.group-filters-container::-webkit-scrollbar {
  height: 4px;
}

.group-filters-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.filter-pill {
  white-space: nowrap;
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 50rem;
  color: var(--text-muted);
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-pill:hover {
  background: #283548;
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.filter-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* Cards Grid */
.site-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1.15rem;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.site-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-color-hover);
  box-shadow: var(--card-shadow-hover);
}

.site-card-cover {
  position: relative;
  width: 100%;
  height: 190px;
  background: #151e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.site-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.site-card:hover .site-card-img {
  transform: scale(1.05);
}

.site-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Floating Group Badge */
.site-group-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 50rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.02em;
  z-index: 2;
}

/* Group Colors */
.group-0 { background: rgba(37, 99, 235, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.group-1 { background: rgba(16, 185, 129, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.group-2 { background: rgba(245, 158, 11, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.group-3 { background: rgba(168, 85, 247, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.group-4 { background: rgba(239, 68, 68, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.group-5 { background: rgba(14, 165, 233, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.group-6 { background: rgba(20, 184, 166, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.group-7 { background: rgba(236, 72, 153, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }

/* Card Content */
.site-card-body {
  padding: 1.15rem 1.25rem 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-card-domain {
  font-size: 0.78rem;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
  text-decoration: none;
  font-weight: 500;
}

.site-card-domain:hover {
  text-decoration: underline;
}

.site-card-notes {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}

/* Card Actions */
.site-card-footer {
  padding: 0.85rem 1.25rem 1.15rem;
  background: transparent;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-card-action {
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: 0.6rem;
  padding: 0.45rem 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

/* Form Styles */
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.form-control, .form-select {
  background-color: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 0.75rem;
  padding: 0.65rem 0.95rem;
  font-size: 0.925rem;
}

.form-control:focus, .form-select:focus {
  background-color: #0f172a;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  color: #ffffff;
}

.form-control::placeholder {
  color: #64748b;
}

/* Paste / Dropzone Area */
.paste-zone, .paste-dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  background: rgba(15, 23, 42, 0.5);
  border-radius: 0.85rem;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.paste-zone:hover, .paste-zone:focus, .paste-zone.drag-active,
.paste-dropzone:hover, .paste-dropzone:focus, .paste-dropzone.drag-active {
  border-color: var(--accent-primary) !important;
  background: rgba(99, 102, 241, 0.12) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.paste-zone.border-success {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
}

.image-preview-wrapper {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1rem;
  text-align: center;
}

.preview-img {
  max-width: 180px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.image-preview-box {
  width: 140px;
  height: 140px;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modals */
.modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  color: var(--text-main);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

/* Empty State */
.empty-state {
  padding: 4rem 1.5rem;
  text-align: center;
  background: rgba(30, 41, 59, 0.3);
  border: 2px dashed var(--border-color);
  border-radius: 1.25rem;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
