.instagram-page {
  width: 100%;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.header-content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.header-content p {
  color: #8892b0;
  margin: 0;
  font-size: 1rem;
}

.balance-info {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance-label {
  color: #8892b0;
  font-size: 0.85rem;
}

.balance-value {
  color: #00d9ff;
  font-weight: 600;
  font-size: 0.95rem;
}

.balance-amount {
  color: #64748b;
  font-size: 0.85rem;
}

.search-section {
  margin-bottom: 32px;
}

.search-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0 16px;
  transition: all 0.3s ease;
  position: relative;
}

.search-input-wrapper:focus-within {
  border-color: #00d9ff;
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.search-history-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(30, 41, 59, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.search-history-dropdown.show {
  display: block;
}

.search-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  color: #ccd6f6;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-history-item:hover {
  background: rgba(0, 217, 255, 0.1);
}

.search-history-item span {
  color: #00d9ff;
}

.search-history-item .history-delete {
  color: #64748b;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.2s;
}

.search-history-item:hover .history-delete {
  opacity: 1;
}

.search-history-item .history-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.search-prefix {
  color: #64748b;
  font-size: 1rem;
  font-weight: 500;
  margin-right: 4px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 0;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder {
  color: #64748b;
}

.search-button {
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, #00d9ff, #00ff88);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 217, 255, 0.4);
}

.search-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Search Loading Spinner */
.search-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-modal-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 20px;
  padding: 40px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 217, 255, 0.1);
}

/* Loading Close Button */
.loading-close-btn {
  position: absolute;
  top: 80px;
  right: 80px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1001;
}

.loading-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ef4444;
  transform: scale(1.1);
}

.fetch-progress {
  text-align: center;
}

.progress-step {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.progress-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.progress-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.progress-value {
  color: #00d9ff;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

.progress-label {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.search-spinner {
  position: relative;
  width: 80px;
  height: 80px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
}

.spinner-ring:nth-child(1) {
  border-top-color: #00d9ff;
  animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
  border-right-color: #00ff88;
  animation: spin 1.2s linear infinite 0.15s;
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
}

.spinner-ring:nth-child(3) {
  border-bottom-color: #f59e0b;
  animation: spin 1.2s linear infinite 0.3s;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
}

/* Placeholder Styles */
.profile-section.placeholder {
  opacity: 0.6;
}

.profile-section.placeholder .profile-card {
  background: rgba(255, 255, 255, 0.03);
}

.placeholder-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.actions-card.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.actions-card.disabled .action-btn {
  cursor: not-allowed;
}

.actions-placeholder {
  margin-top: 20px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  text-align: center;
}

.actions-placeholder p {
  color: #64748b;
  margin: 0;
  font-size: 0.9rem;
}

.profile-link .na {
  color: #64748b;
  font-style: italic;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.profile-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px;
  max-width: 600px;
  position: relative;
}

.profile-add-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0, 217, 255, 0.4);
  background: rgba(0, 217, 255, 0.1);
  color: #00d9ff;
  font-size: 1.2rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0;
}

.profile-card:hover .profile-add-btn {
  opacity: 1;
}

.profile-add-btn:hover {
  background: rgba(0, 217, 255, 0.2);
  border-color: #00d9ff;
  transform: scale(1.1);
}

/* Compare Card */
.compare-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px;
  min-width: 300px;
  max-width: 500px;
  position: relative;
}

.compare-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #8892b0;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.compare-card-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.compare-add-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0, 217, 255, 0.3);
  background: rgba(0, 217, 255, 0.1);
  color: #00d9ff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.compare-add-btn:hover {
  background: rgba(0, 217, 255, 0.2);
  border-color: #00d9ff;
}

.compare-card-content {
  min-height: 100px;
}

.compare-title {
  color: #ffffff;
  font-size: 1.1rem;
  margin: 0 0 16px 0;
}

.compare-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.compare-search-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0 12px;
  flex: 1;
}

.compare-search-prefix {
  color: #64748b;
  font-size: 0.9rem;
}

.compare-search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 8px;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
}

.compare-search-input::placeholder {
  color: #64748b;
}

.compare-search-btn {
  background: rgba(0, 217, 255, 0.2);
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  color: #00d9ff;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compare-search-btn:hover {
  background: rgba(0, 217, 255, 0.3);
}

/* Card Search (Main Profile Card) */
.card-search-form {
  margin-bottom: 16px;
}

.card-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-search-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0 12px;
  flex: 1;
  position: relative;
}

.card-search-prefix {
  color: #64748b;
  font-size: 0.9rem;
}

.card-search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 8px;
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
}

.card-search-input::placeholder {
  color: #64748b;
}

.card-search-btn {
  background: rgba(0, 217, 255, 0.2);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  color: #00d9ff;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-search-btn:hover {
  background: rgba(0, 217, 255, 0.3);
}

/* Compare Loading */
.compare-loading {
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.compare-loading-text {
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.compare-loading-items {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.compare-load-item {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #8892b0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.compare-load-item.loading {
  color: #00d9ff;
  background: rgba(0, 217, 255, 0.15);
  border-color: rgba(0, 217, 255, 0.3);
  animation: cmp-pulse 1s ease-in-out infinite;
}

.compare-load-item.done {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.3);
}

@keyframes cmp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.compare-user-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 10px;
  margin-bottom: 16px;
}

.compare-user-pic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 217, 255, 0.3);
}

.compare-user-info {
  flex: 1;
}

.compare-user-name {
  color: #00d9ff;
  font-weight: 600;
  font-size: 0.95rem;
}

.compare-user-fullname {
  color: #8892b0;
  font-size: 0.8rem;
}

.compare-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compare-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.compare-section-title {
  color: #8892b0;
  font-size: 0.85rem;
}

.compare-section-value {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.compare-analyze-btn {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compare-analyze-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

/* Compare Profile State */
.compare-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.compare-profile-pic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(0, 217, 255, 0.3);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.compare-profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.compare-profile-info {
  flex: 1;
}

.compare-profile-username {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-profile-fullname {
  color: #8892b0;
  font-size: 0.95rem;
  margin-top: 4px;
}

.compare-profile-stats {
  display: flex;
  gap: 32px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.compare-profile-bio {
  margin-bottom: 16px;
}

.compare-profile-bio p {
  color: #ccd6f6;
  line-height: 1.5;
  margin: 0;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.compare-profile-details {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.compare-profile-details .detail-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-profile-details .detail-item:last-child {
  border-bottom: none;
}

.compare-change-btn {
  margin-top: 16px;
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #8892b0;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compare-change-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Compare Source Card */
.compare-source-card {
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.compare-source-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.compare-source-pic {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 217, 255, 0.3);
}

.compare-source-info {
  flex: 1;
}

.compare-source-username {
  color: #00d9ff;
  font-weight: 600;
  font-size: 1rem;
}

.compare-source-fullname {
  color: #ccd6f6;
  font-size: 0.85rem;
}

.compare-source-snapshot {
  color: #64748b;
  font-size: 0.75rem;
  margin-top: 2px;
}

.compare-source-buttons {
  display: flex;
  gap: 10px;
}

.compare-source-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compare-source-btn.db {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.compare-source-btn.db:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.compare-source-btn.live {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.compare-source-btn.live:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid rgba(0, 217, 255, 0.3);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-info {
  flex: 1;
}

.profile-username {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.verified-badge {
  background: #3b82f6;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.private-badge {
  font-size: 16px;
}

.profile-fullname {
  color: #8892b0;
  font-size: 1rem;
  margin-top: 4px;
}

.profile-stats {
  display: flex;
  gap: 32px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.stat-label {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
}

.profile-bio {
  margin-bottom: 16px;
}

.profile-bio p {
  color: #ccd6f6;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
}

.profile-link {
  margin-bottom: 20px;
}

.profile-link a {
  color: #00d9ff;
  text-decoration: none;
  font-size: 0.9rem;
}

.profile-link a:hover {
  text-decoration: underline;
}

.profile-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: #8892b0;
  font-size: 0.85rem;
}

.detail-value {
  color: #ccd6f6;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

.detail-value a {
  color: #00d9ff;
  text-decoration: none;
}

.detail-value a:hover {
  text-decoration: underline;
}

.detail-value.na {
  color: #64748b;
  font-style: italic;
  font-family: inherit;
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #ccd6f6;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00d9ff;
  color: #00d9ff;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.private-notice {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
}

.private-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

.private-notice p {
  color: #8892b0;
  font-size: 1.1rem;
  margin: 0;
}

.medias-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
}

.medias-section h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin: 0 0 20px 0;
}

.loading-medias,
.no-medias {
  color: #8892b0;
  text-align: center;
  padding: 40px;
}

.medias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.media-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.media-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-card:hover .media-thumbnail {
  transform: scale(1.05);
}

.media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-card:hover .media-overlay {
  opacity: 1;
}

.media-overlay span {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
}

.media-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.load-more-section {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.load-more-btn {
  padding: 14px 48px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, #00d9ff, #00ff88);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.load-more-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 217, 255, 0.4);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Tabs Section */
.tabs-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: #8892b0;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

.tab-btn:hover {
  color: #ccd6f6;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: #00d9ff;
  background: rgba(0, 217, 255, 0.1);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00d9ff, #00ff88);
}

/* DB Badge */
.db-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* DB Info Bar */
.db-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(245, 158, 11, 0.1);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.db-info-bar span {
  color: #f59e0b;
  font-size: 0.85rem;
}

.refresh-api-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 6px;
  color: #f59e0b;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.refresh-api-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.tabs-content {
  padding: 24px;
  min-height: 300px;
}

/* Tab Search */
.tab-search-wrapper {
  margin-bottom: 16px;
}

.tab-search-input {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.tab-search-input:focus {
  border-color: rgba(0, 217, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.tab-search-input::placeholder {
  color: #64748b;
}

.users-search-wrapper {
  margin-bottom: 16px;
}

.users-search-input {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.users-search-input:focus {
  border-color: rgba(0, 217, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.users-search-input::placeholder {
  color: #64748b;
}

.tab-loading,
.tab-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #8892b0;
  font-size: 1rem;
}

/* Stories Grid */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.story-card {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.3);
}

.story-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.story-card:hover .story-thumbnail {
  transform: scale(1.05);
}

/* Users List */
.users-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 217, 255, 0.3);
}

.user-pic {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-details {
  flex: 1;
}

.user-username {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-fullname {
  color: #8892b0;
  font-size: 0.85rem;
  margin-top: 2px;
}

/* Profile Row Layout */
.profile-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-row .profile-card {
  flex: 1;
  min-width: 300px;
}

/* Actions Card */
.actions-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  min-width: 280px;
  max-width: 320px;
}

.actions-card h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin: 0 0 20px 0;
}

.actions-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.actions-buttons .action-btn {
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.actions-buttons .save-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.actions-buttons .save-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.actions-buttons .track-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.actions-buttons .track-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.actions-buttons .tracking-btn {
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid #10b981;
  color: #10b981;
}

.actions-buttons .tracking-btn:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.actions-buttons .analyze-btn {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
}

.actions-buttons .analyze-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.actions-buttons .compare-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.actions-buttons .compare-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.actions-buttons .action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Tracking Status */
.tracking-status {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-item:last-child {
  border-bottom: none;
}

.status-label {
  color: #8892b0;
  font-size: 0.85rem;
}

.status-value {
  color: #ccd6f6;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-value.saved {
  color: #10b981;
}

.status-value.tracking {
  color: #00d9ff;
}

.collected-info {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.collected-info span {
  color: #64748b;
  font-size: 0.75rem;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ef4444;
}

.modal-content h3 {
  color: #ffffff;
  font-size: 1.3rem;
  margin: 0 0 12px 0;
}

.modal-content p {
  color: #8892b0;
  margin: 0 0 20px 0;
}

.interval-selector select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
}

.interval-selector select:focus {
  outline: none;
  border-color: #00d9ff;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn.cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #8892b0;
}

.modal-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

.modal-btn.confirm {
  background: linear-gradient(90deg, #00d9ff, #00ff88);
  color: #0f172a;
}

.modal-btn.confirm:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 217, 255, 0.4);
}

.modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Analysis Modal */
.analysis-modal {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.analysis-period {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 20px;
}

.analysis-period span {
  color: #8892b0;
  font-size: 0.85rem;
}

.analysis-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.summary-item {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.summary-item.positive {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.summary-item.negative {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.summary-label {
  display: block;
  color: #8892b0;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.summary-value {
  display: block;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
}

.summary-item.positive .summary-value {
  color: #10b981;
}

.summary-item.negative .summary-value {
  color: #ef4444;
}

.analysis-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.analysis-section {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 16px;
}

.analysis-section.lost {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.analysis-section h4 {
  color: #10b981;
  font-size: 0.95rem;
  margin: 0 0 12px 0;
}

.analysis-section.lost h4 {
  color: #ef4444;
}

.analysis-users {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.analysis-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: 20px;
}

.analysis-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.analysis-user span {
  color: #ccd6f6;
  font-size: 0.85rem;
}

.analysis-medias {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.analysis-media {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}

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

/* Notification Modal */
.notification-modal {
  max-width: 360px;
  text-align: center;
}

.notification-modal .notification-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 20px;
}

.notification-modal.success .notification-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 2px solid #10b981;
}

.notification-modal.error .notification-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 2px solid #ef4444;
}

.notification-modal h3 {
  margin-bottom: 8px;
}

.notification-modal.success h3 {
  color: #10b981;
}

.notification-modal.error h3 {
  color: #ef4444;
}

.notification-modal p {
  color: #ccd6f6;
  margin-bottom: 0;
}

/* Save Progress Modal */
.save-progress-modal {
  max-width: 400px;
  text-align: center;
}

.save-progress-modal h3 {
  color: #00d9ff;
  margin-bottom: 16px;
}

.progress-step {
  color: #f59e0b;
  font-weight: 600;
  margin-bottom: 24px;
}

.progress-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.progress-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.progress-label {
  color: #8892b0;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.progress-value {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
}

.progress-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  position: relative;
}

.progress-spinner::before,
.progress-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid transparent;
}

.progress-spinner::before {
  border-top-color: #00d9ff;
  border-right-color: #00d9ff;
  animation: spin 1s linear infinite;
}

.progress-spinner::after {
  border-bottom-color: #00ff88;
  border-left-color: #00ff88;
  animation: spin 1s linear infinite reverse;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-note {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0;
}

/* Top Notification Bar */
.top-notification-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e3a5f, #1e293b);
  border-bottom: 1px solid rgba(0, 217, 255, 0.3);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1100;
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.top-notification-bar.success {
  background: linear-gradient(135deg, #064e3b, #1e293b);
  border-bottom-color: rgba(16, 185, 129, 0.4);
}

.notification-bar-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.notification-bar-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 217, 255, 0.3);
  border-top-color: #00d9ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.notification-bar-icon {
  width: 28px;
  height: 28px;
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  font-weight: 700;
  font-size: 16px;
}

.notification-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notification-bar-title {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.notification-bar-step {
  color: #f59e0b;
  font-size: 0.8rem;
}

.top-notification-bar.success .notification-bar-step {
  color: #10b981;
}

.notification-bar-stats {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.notification-bar-stats span {
  color: #8892b0;
  font-size: 0.85rem;
  white-space: nowrap;
}

.notification-bar-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
  margin-left: 16px;
  flex-shrink: 0;
}

.notification-bar-close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ef4444;
}

/* Adjust page content when notification bar is visible */
.instagram-page {
  padding-top: 0;
  transition: padding-top 0.3s ease;
}

.instagram-page:has(.top-notification-bar) {
  padding-top: 60px;
}

/* Responsive adjustments for notification bar */
@media (max-width: 768px) {
  .notification-bar-stats {
    display: none;
  }

  .notification-bar-content {
    gap: 12px;
  }

  .top-notification-bar {
    padding: 10px 16px;
  }
}

/* Count Badge for tabs */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 217, 255, 0.2);
  color: #00d9ff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Locations List */
.locations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.location-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.location-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 217, 255, 0.3);
}

.location-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 10px;
}

.location-info {
  flex: 1;
}

.location-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.location-address {
  color: #8892b0;
  font-size: 0.85rem;
}

.location-city {
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 2px;
}

.location-count {
  color: #00d9ff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  background: rgba(0, 217, 255, 0.1);
  border-radius: 8px;
  white-space: nowrap;
}

/* Hashtags Grid */
.hashtags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hashtag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.hashtag-item:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

.hashtag-tag {
  color: #a78bfa;
  font-size: 0.95rem;
  font-weight: 500;
}

.hashtag-count {
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.5);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Tab Spinner */
.tab-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 217, 255, 0.3);
  border-top-color: #00d9ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* Continue in Background Button */
.continue-bg-btn {
  margin-top: 24px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.continue-bg-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #00d9ff;
  color: #00d9ff;
}

/* Background Progress Bar */
.background-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e3a5f, #1e293b);
  border-bottom: 1px solid rgba(0, 217, 255, 0.3);
  padding: 12px 20px;
  z-index: 1100;
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.bg-progress-content {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.bg-progress-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 217, 255, 0.3);
  border-top-color: #00d9ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.bg-progress-text {
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(90deg, #00d9ff, #f59e0b, #00ff88, #00d9ff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 2s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-progress-stats {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.bg-progress-stats span {
  color: #8892b0;
  font-size: 0.85rem;
}

/* Profile Card Spinner for Background Mode */
.profile-header-wrapper {
  position: relative;
}

.profile-loading-spinner {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 217, 255, 0.2);
  border-top-color: #00d9ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Small inline spinner */
.inline-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 217, 255, 0.3);
  border-top-color: #00d9ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* Location Coordinates */
.location-coords {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 4px 8px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 6px;
  color: #00d9ff;
  font-size: 0.75rem;
  font-family: monospace;
  text-decoration: none;
  transition: all 0.3s ease;
}

.location-coords:hover {
  background: rgba(0, 217, 255, 0.2);
  border-color: #00d9ff;
  color: #ffffff;
}

/* Make media cards clickable */
.media-card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.media-card:hover {
  transform: scale(1.02);
}

.story-card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

/* Source Choice Card (overlay) */
.source-choice-card {
  position: absolute;
  top: 180px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  background: linear-gradient(135deg, rgba(20, 30, 50, 0.98) 0%, rgba(30, 20, 50, 0.98) 100%);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 16px;
  padding: 20px;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.source-card-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #8892b0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s;
}

.source-card-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.source-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.source-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.source-card-info {
  text-align: center;
}

.source-badge {
  display: inline-block;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Source Choice Modal */
.source-modal {
  max-width: 420px;
  text-align: center;
}

.source-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(0, 217, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 20px;
}

.source-user-pic {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 217, 255, 0.3);
}

.source-user-details {
  text-align: left;
}

.source-username {
  color: #00d9ff;
  font-weight: 600;
  font-size: 1.1rem;
}

.source-fullname {
  color: #8892b0;
  font-size: 0.9rem;
}

.source-modal h3 {
  color: #ffffff;
  margin-bottom: 8px;
}

.source-snapshot-info {
  color: #8892b0;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.source-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.source-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.source-stat .stat-value {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 600;
}

.source-stat .stat-label {
  color: #8892b0;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.source-choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.source-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.source-btn .btn-icon {
  font-size: 1.5rem;
}

.source-btn .btn-text {
  font-weight: 600;
  font-size: 1rem;
}

.source-btn .btn-desc {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.7;
}

.source-btn.db-btn {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.source-btn.db-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
}

.source-btn.live-btn {
  background: rgba(0, 217, 255, 0.1);
  border-color: rgba(0, 217, 255, 0.3);
  color: #00d9ff;
}

.source-btn.live-btn:hover {
  background: rgba(0, 217, 255, 0.2);
  border-color: #00d9ff;
}


/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 16px 0;
}

.media-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
}

.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.media-item:hover img {
  transform: scale(1.05);
}

.media-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.media-item:hover .media-overlay {
  opacity: 1;
}

.media-overlay span {
  color: #fff;
  font-size: 0.8rem;
}

.media-item.img-error {
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-item.img-error::after {
  content: '🖼️';
  font-size: 2rem;
  opacity: 0.5;
}

.media-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Users List */
.users-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 16px 0;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-item .user-pic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.user-item .user-info {
  flex: 1;
  min-width: 0;
}

.user-item .user-username {
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
}

.user-item .user-fullname {
  color: #8892b0;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified-small {
  color: #3897f0;
  margin-left: 4px;
}

/* Locations List */
.locations-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
}

.location-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.location-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.location-icon {
  font-size: 1.5rem;
}

.location-info {
  flex: 1;
}

.location-name {
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
}

.location-address, .location-city {
  color: #8892b0;
  font-size: 0.85rem;
}

.location-coords {
  color: #00d9ff;
  font-size: 0.8rem;
  text-decoration: none;
}

.location-coords:hover {
  text-decoration: underline;
}

.location-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.location-date {
  color: #00d9ff;
  font-size: 0.8rem;
  white-space: nowrap;
}

.location-count {
  color: #64748b;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Hashtags Grid */
.hashtags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
}

.hashtag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.hashtag-item:hover {
  background: rgba(0, 217, 255, 0.2);
}

.hashtag-tag {
  color: #00d9ff;
  font-size: 0.9rem;
}

.hashtag-count {
  color: #8892b0;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Tab Empty State */
.tab-empty {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
  font-size: 1rem;
}

/* Media Popup */
.media-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.media-popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
  transition: transform 0.2s;
}

.media-popup-close:hover {
  transform: scale(1.1);
}

.media-popup-container {
  display: flex;
  max-width: 95vw;
  max-height: 90vh;
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
}

.media-popup-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  max-width: 65vw;
}

.media-popup-image, .media-popup-video {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.media-popup-details {
  width: 340px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.popup-user-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.popup-username {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.popup-caption {
  flex: 1;
  padding: 16px;
  color: #ccd6f6;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.popup-caption:empty::before {
  content: 'No caption';
  color: #64748b;
  font-style: italic;
}

.popup-stats {
  display: flex;
  gap: 20px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.popup-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 0.9rem;
}

.popup-stat-icon {
  font-size: 1.1rem;
}

.popup-date {
  padding: 8px 16px;
  color: #64748b;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.popup-stat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.popup-stat-btn:hover {
  background: rgba(255,255,255,0.1);
}

.popup-list-section {
  border-top: 1px solid rgba(255,255,255,0.1);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.popup-list-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-weight: 600;
  color: #fff;
}

.popup-list-search {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 10px;
  color: #fff;
  font-size: 0.8rem;
  outline: none;
  transition: all 0.2s ease;
}

.popup-list-search:focus {
  border-color: rgba(0, 217, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.popup-list-search::placeholder {
  color: #64748b;
}

.popup-list-close {
  background: none;
  border: none;
  color: #8892b0;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.popup-list-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.popup-list-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.popup-list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #8892b0;
}

.popup-liker-item, .popup-comment-item {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  transition: background 0.2s;
}

.popup-liker-item:hover {
  background: rgba(255,255,255,0.05);
}

.popup-liker-pic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.popup-liker-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.popup-liker-username {
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
}

.popup-liker-fullname {
  color: #8892b0;
  font-size: 0.8rem;
}

.popup-comment-item {
  flex-direction: column;
  gap: 6px;
}

.popup-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup-comment-pic {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.popup-comment-username {
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}

.popup-comment-time {
  color: #64748b;
  font-size: 0.75rem;
}

.popup-comment-text {
  color: #ccd6f6;
  font-size: 0.9rem;
  line-height: 1.4;
  padding-left: 42px;
}

@media (max-width: 900px) {
  .media-popup-container {
    flex-direction: column;
    max-width: 95vw;
  }
  .media-popup-media {
    max-width: 100%;
    max-height: 50vh;
  }
  .media-popup-details {
    width: 100%;
    max-height: 40vh;
  }
}

/* Mini Spinner for Progress Stats */
.mini-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 217, 255, 0.2);
  border-top-color: #00d9ff;
  border-radius: 50%;
  animation: mini-spin 0.8s linear infinite;
  margin-right: 6px;
  display: none;
}

.progress-stat.loading .mini-spinner {
  display: inline-block;
}

.progress-stat.done .mini-spinner {
  display: none;
}

.progress-stat.done .progress-value {
  color: #4ade80;
}

@keyframes mini-spin {
  to { transform: rotate(360deg); }
}

/* Continue in Background Button */
.continue-bg-btn {
  margin-top: 20px;
  padding: 12px 24px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  color: #00d9ff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.continue-bg-btn:hover {
  background: rgba(0, 217, 255, 0.2);
}

/* Background Fetch Mode - Inline spinners next to tabs */
.tab-btn .tab-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 217, 255, 0.2);
  border-top-color: #00d9ff;
  border-radius: 50%;
  animation: mini-spin 0.8s linear infinite;
  display: none;
  margin-left: 6px;
}

.tab-btn.loading .tab-spinner {
  display: inline-block;
}

.tab-btn.loading .count-badge {
  display: none;
}

/* Background Progress Bar */
.bg-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 2px solid #00d9ff;
  padding: 14px 24px;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 217, 255, 0.2), 0 2px 10px rgba(0, 0, 0, 0.5);
  animation: pulse-bar 2s ease-in-out infinite;
}

@keyframes pulse-bar {
  0%, 100% { box-shadow: 0 4px 30px rgba(0, 217, 255, 0.2), 0 2px 10px rgba(0, 0, 0, 0.5); }
  50% { box-shadow: 0 4px 40px rgba(0, 217, 255, 0.4), 0 2px 15px rgba(0, 0, 0, 0.5); }
}

.bg-progress-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.bg-progress-text {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.bg-progress-items {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.bg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.bg-item.loading {
  color: #00d9ff;
  background: rgba(0, 217, 255, 0.15);
  border-color: rgba(0, 217, 255, 0.4);
  animation: item-pulse 1s ease-in-out infinite;
}

@keyframes item-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes fetch-pulse {
  0%, 100% {
    background: rgba(0, 217, 255, 0.15);
    border-color: rgba(0, 217, 255, 0.4);
  }
  50% {
    background: rgba(0, 217, 255, 0.25);
    border-color: rgba(0, 217, 255, 0.6);
  }
}

@keyframes fetch-pulse-orange {
  0%, 100% {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.6);
  }
  50% {
    background: rgba(245, 158, 11, 0.4);
    border-color: rgba(245, 158, 11, 0.8);
  }
}

.bg-item.done {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.4);
}

.bg-item .bg-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(0, 217, 255, 0.2);
  border-top-color: #00d9ff;
  border-radius: 50%;
  animation: mini-spin 0.8s linear infinite;
  display: none;
}

.bg-item.loading .bg-spinner {
  display: inline-block;
}

.bg-item.done .bg-spinner {
  display: none;
}

.bg-item.done::before {
  content: '✓';
  margin-right: 2px;
}

/* Track Modal - Intelligence Style */
.track-modal {
  max-width: 700px;
  width: 95%;
  padding: 28px 32px;
}

.track-modal-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.track-modal-header h3 {
  margin: 0 0 6px 0;
  font-size: 1.3rem;
  color: #fff;
}

.track-modal-user {
  color: #00d9ff;
  font-size: 0.95rem;
  margin: 0;
}

/* Track Settings */
.track-settings {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.track-setting {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-label {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.track-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.track-select:hover {
  border-color: rgba(0, 217, 255, 0.4);
}

.track-select:focus {
  outline: none;
  border-color: #00d9ff;
  box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.15);
}

.track-select option {
  background: #1a1f2e;
  color: #fff;
}

.track-select optgroup {
  color: #64748b;
  font-style: normal;
  font-weight: 600;
  background: #151922;
}

.date-label {
  color: #8892b0;
  font-size: 0.85rem;
  margin-left: 12px;
  margin-right: 6px;
}

.track-date {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}

.track-date::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

/* Rules Section */
.track-rules-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.track-rules-header span {
  color: #8892b0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-rule-btn {
  background: transparent;
  border: 1px dashed rgba(0, 217, 255, 0.4);
  color: #00d9ff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-rule-btn:hover {
  background: rgba(0, 217, 255, 0.1);
  border-style: solid;
}

/* Track Rules Container */
.track-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

.track-rules::-webkit-scrollbar {
  width: 5px;
}

.track-rules::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}

.track-rules::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

/* Individual Rule - IF Statement Style */
.track-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  border-left: 3px solid #00d9ff;
}

.rule-if {
  color: #ff79c6;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'Monaco', 'Consolas', monospace;
  letter-spacing: 0.5px;
}

.rule-user {
  color: #00d9ff;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rule-select.rule-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 7px 10px;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 180px;
}

.rule-select.rule-action:hover {
  border-color: rgba(0, 217, 255, 0.3);
}

.rule-select.rule-action:focus {
  outline: none;
  border-color: #00d9ff;
}

.rule-select.rule-action option {
  background: #1a1a2e;
  color: #fff;
  padding: 8px;
}

.rule-select.rule-action optgroup {
  background: #1a1a2e;
  color: #8892b0;
  font-weight: 600;
}

.rule-input.rule-target {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 7px 10px;
  color: #8be9fd;
  font-size: 0.85rem;
  width: 120px;
}

.rule-input.rule-target:focus {
  outline: none;
  border-color: #00d9ff;
}

.rule-input.rule-target::placeholder {
  color: #64748b;
}

.rule-input.rule-target.location-input {
  width: 140px;
}

.rule-input.rule-target.hashtag-input::before {
  content: '#';
}

.remove-rule-btn {
  background: transparent;
  border: none;
  color: #475569;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  margin-left: auto;
  transition: color 0.2s ease;
  line-height: 1;
}

.remove-rule-btn:hover {
  color: #ff6b6b;
}

/* Info Card (placeholder) */
.track-info-card {
  min-height: 20px;
  margin-bottom: 20px;
}

/* Compare Modal */
.compare-modal {
  position: relative;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
}

.compare-modal-users {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: rgba(0, 217, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 20px;
}

.compare-modal-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.compare-modal-user img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(0, 217, 255, 0.3);
}

.compare-modal-user span {
  color: #00d9ff;
  font-weight: 600;
}

.compare-modal-vs {
  color: #8892b0;
  font-size: 1.2rem;
  font-weight: 700;
}

.cmp-user-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cmp-user-header img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(0, 217, 255, 0.3);
}

.cmp-user-header span {
  color: #00d9ff;
  font-weight: 600;
  font-size: 0.9rem;
}

.cmp-vs {
  color: #8892b0;
  font-size: 1.2rem;
  font-weight: 700;
}

.cmp-relationship-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.cmp-rel-pair {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.cmp-rel-pair span {
  color: #ccd6f6;
  font-size: 0.9rem;
}

.compare-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compare-section-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
}

.compare-section-title {
  color: #00d9ff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-section-title .count {
  background: rgba(0, 217, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.85rem;
}

.compare-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-stat-row:last-child {
  border-bottom: none;
}

.compare-stat-label {
  color: #8892b0;
}

.compare-stat-value {
  color: #ffffff;
  font-weight: 600;
}

.compare-stat-value.yes {
  color: #4ade80;
}

.compare-stat-value.no {
  color: #f87171;
}

.compare-user-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
}

.compare-user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #ccd6f6;
}

.compare-user-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.compare-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-tag {
  background: rgba(0, 217, 255, 0.15);
  color: #00d9ff;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
}

.compare-loading-msg {
  text-align: center;
  color: #8892b0;
  padding: 40px;
}

/* Comparison Results Styles */
.compare-loading, .compare-error {
  text-align: center;
  padding: 40px;
  color: #8892b0;
}

.compare-error {
  color: #f87171;
}

.cmp-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.cmp-section h3 {
  color: #00d9ff;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cmp-center {
  text-align: center;
  padding: 10px;
}

.cmp-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.cmp-badge.cmp-yes {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.cmp-badge.cmp-no {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.cmp-badge.cmp-partial {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.cmp-table {
  width: 100%;
  border-collapse: collapse;
}

.cmp-table th, .cmp-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cmp-table th {
  color: #00d9ff;
  font-weight: 600;
  font-size: 0.85rem;
}

.cmp-table td:first-child {
  color: #8892b0;
  text-align: left;
}

.cmp-table td {
  color: #ccd6f6;
}

.cmp-score {
  text-align: center;
  padding: 15px 0;
}

.cmp-score-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #00d9ff;
}

.cmp-score-label {
  color: #8892b0;
  font-size: 0.85rem;
  margin-top: 4px;
}

.cmp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cmp-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cmp-stat {
  text-align: center;
  padding: 12px;
  background: rgba(0, 217, 255, 0.05);
  border-radius: 8px;
}

.cmp-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #00d9ff;
}

.cmp-stat-label {
  color: #8892b0;
  font-size: 0.75rem;
  margin-top: 4px;
}

.cmp-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.cmp-card-title {
  color: #8892b0;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.cmp-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: #00d9ff;
}

.cmp-card-sub {
  color: #64748b;
  font-size: 0.75rem;
  margin-top: 6px;
}

.cmp-users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cmp-user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #ccd6f6;
}

.cmp-user-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.cmp-mini-stat {
  text-align: center;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.cmp-mini-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00d9ff;
}

.cmp-mini-label {
  color: #8892b0;
  font-size: 0.7rem;
  margin-top: 4px;
}

.cmp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cmp-tag {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
}

.cmp-tag small {
  color: #8892b0;
  margin-left: 4px;
}

.cmp-tag-loc {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* Analyze Modal Styles */
.analyze-modal {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.analyze-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-top: 5px;
}

.analyze-loading {
    text-align: center;
    padding: 40px 20px;
}

.analyze-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.analyze-loading p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.analyze-results {
    padding: 10px 0;
}

.analyze-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.analyze-stat {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px 20px;
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.analyze-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.analyze-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
}

.analyze-stat.flagged .analyze-stat-value {
    color: #ff5252;
}

.analyze-stat.safe .analyze-stat-value {
    color: #4caf50;
}

.analyze-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.analyze-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
}

.analyze-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.analyze-category-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.analyze-category-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.analyze-category-badge.safe {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.analyze-category-badge.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.analyze-category-badge.danger {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
}

.analyze-category-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.analyze-category-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.analyze-category-fill.safe {
    background: linear-gradient(90deg, #4caf50, #8bc34a);
}

.analyze-category-fill.warning {
    background: linear-gradient(90deg, #ff9800, #ffc107);
}

.analyze-category-fill.danger {
    background: linear-gradient(90deg, #f44336, #ff5252);
}

.analyze-category-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}

.analyze-flagged h3 {
    font-size: 14px;
    color: #fff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analyze-flagged h3::before {
    content: "⚠️";
}

.analyze-flagged-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.analyze-flagged-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.analyze-flagged-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.analyze-flagged-item .flags {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px 5px 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.analyze-flag-tag {
    font-size: 9px;
    background: rgba(255, 82, 82, 0.8);
    color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
}

.analyze-no-flags {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.5);
}

.analyze-no-flags .icon {
    font-size: 40px;
    margin-bottom: 10px;
}
