:root {
  --primary-color: #2563eb;
  --primary-light: rgba(37, 99, 235, 0.1);
  --primary-rgb: 37, 99, 235;
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-light: #f3f4f6;
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --contributor-bg: #f9fafb;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

[data-theme="dark"] {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-light: #1f2937;
  --bg-color: #1f2937;
  --card-bg: #1f2937;
  --contributor-bg: #1f2937;
  --border-color: #374151;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3),
    0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3),
    0 8px 10px -6px rgb(0 0 0 / 0.3);
}

* {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
}

/* Upload Dashboard Specific Styles */
.upload-container,
.multi-upload-container {
  max-width: 800px;
  margin: 0 auto;
}

.upload-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.upload-info {
  flex: 2;
}

.upload-info h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.upload-guidelines {
  flex: 1;
}

.guideline-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.guideline-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.guideline-content h6 {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.guideline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guideline-list li {
  padding: 0.25rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.guideline-list li::before {
  content: "✓ ";
  color: var(--secondary-color);
  font-weight: 600;
  margin-right: 0.5rem;
}

/* Form Styles */
.form-container {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.upload-form,
.multi-upload-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.label-icon {
  font-size: 1rem;
}

.form-control {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
  outline: none;
}

/* File Upload Area */
.file-upload-area,
.multi-file-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--bg-secondary);
}

.file-upload-area:hover,
.multi-file-upload-area:hover,
.file-upload-area.drag-over,
.multi-file-upload-area.drag-over {
  border-color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.05);
}

.file-upload-area.has-file,
.multi-file-upload-area.has-files {
  border-color: var(--secondary-color);
  background-color: rgba(16, 185, 129, 0.05);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.upload-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.upload-main {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.125rem;
}

.upload-sub {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.file-input {
  display: none !important;
}

/* Preview Styles */
.image-preview-container,
.multi-preview-grid {
  margin-top: 1rem;
}

.multi-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.preview-card,
.multi-preview-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* .preview-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
} */

.preview-image {
  width: 100%;
  height: 500px;
  object-fit: contain;
}

.preview-info {
  padding: 0.75rem;
}

.preview-filename {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-size {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.btn-submit {
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* Field Validation */
.field-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.field-success {
  color: var(--secondary-color);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.field-help {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Tags Container */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  min-height: 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  background-color: var(--bg-primary);
}

.tag {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag:hover {
  background-color: rgba(37, 99, 235, 0.8);
  transform: translateY(-1px);
}

/* My Images Specific Styles */
.filter-section {
  margin-bottom: 2rem;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.filter-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.my-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.my-image-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.my-image-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.image-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Alert Messages */
.alert-message {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .upload-header {
    flex-direction: column;
    gap: 1rem;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .multi-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .filter-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
}

@media (max-width: 1024px) {
  .admin-sidebar,
  .dashboard-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.collapsed,
  .dashboard-sidebar.collapsed {
    transform: translateX(0);
  }

  .admin-content,
  .dashboard-content {
    margin-left: 0;
  }
}

/* ===== EMAIL VERIFICATION STYLES ===== */
.auth-container.email-verified,
.auth-container.verification-failed,
.auth-container.resend-verification {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  padding: 20px;
}

.success-card .auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.error-card .auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.success-icon,
.error-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
}

.success-icon {
  color: #10b981;
}

.error-icon {
  color: #dc2626;
}

.next-steps,
.troubleshooting,
.info-section {
  margin: 30px 0;
  padding: 25px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border-left: 4px solid #0ea5e9;
}

.next-steps h3,
.troubleshooting h3,
.info-section h4 {
  color: #1e40af;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.steps-list,
.issues-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.step-item,
.issue-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  border: 1px solid rgba(14, 165, 233, 0.1);
}

.step-icon,
.issue-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.step-content,
.issue-content {
  flex: 1;
}

.step-content strong,
.issue-content strong {
  display: block;
  color: #1e40af;
  margin-bottom: 5px;
}

.step-content p,
.issue-content p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.welcome-message,
.help-section {
  margin: 30px 0;
  padding: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  border-left: 4px solid #f59e0b;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.welcome-icon,
.help-icon,
.info-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.welcome-content,
.help-content,
.info-content {
  flex: 1;
}

.welcome-content h4,
.help-content h4,
.info-content h4 {
  color: #92400e;
  margin-bottom: 10px;
}

.welcome-content p,
.help-content p {
  margin: 0;
  color: #78350f;
}

.info-content ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
  color: #78350f;
}

.info-content ul li {
  margin-bottom: 5px;
}

/* ===== AUTHENTICATION PAGES - UNIFIED STYLES ===== */

/* Auth Page Layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

html, body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Login/Register Style (Two-column layout) */
.auth-container.has-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-color);
  padding: 1rem;
  overflow-x: hidden;
}

.auth-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background-color: var(--bg-primary);
}

/* Password Reset Style (Single centered card) */
.auth-container.password-reset {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem 1rem;
  position: relative;
}

.auth-container.password-reset::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="2"/></g></svg>')
    repeat;
  opacity: 0.1;
}

/* Left Side - Branding */
.auth-brand {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center; /* Center the logo since name is hidden */
  gap: 1rem;
  /* margin-bottom: 2rem; */
}

.brand-logo-top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
  margin-bottom: 1rem;
}

.brand-logo-top .logo {
  width: auto;
  height: 60px;
  filter: brightness(0) invert(1);
}

.brand-logo .logo,
.logo-image {
  width: auto;
  height: 48px;
  filter: brightness(0) invert(1);
}

.brand-name {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  display: none; /* Hide brand name, show only logo */
}

.brand-description h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.brand-description p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feature-icon {
  font-size: 1.5rem;
  width: 40px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-text {
  font-size: 1rem;
  opacity: 0.9;
}

/* Theme Toggle */
.theme-toggle-container {
  display: flex;
  justify-content: flex-end;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.theme-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  transform: scale(1.1);
}

/* Auth Card (for password reset) */
.auth-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 3rem;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.auth-header,
.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-logo {
  margin-bottom: 1.5rem;
}

.auth-title,
.form-header h3 {
  color: var(--text-primary);
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.auth-title i {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.auth-subtitle,
.form-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

/* Right Side - Form Container */
.auth-form-container {
  background-color: var(--bg-primary);
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form {
  width: 100%;
  max-width: 400px;
  margin-bottom: 2rem;
}

/* Forms */
.login-form,
.register-form,
.reset-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.form-label i {
  color: var(--primary-color);
  width: 16px;
}

.label-icon {
  font-size: 1rem;
  opacity: 0.7;
}

/* Input Styling */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .form-control {
  padding-right: 3rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
  background-color: var(--bg-primary);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.input-wrapper.focused .form-control {
  border-color: var(--primary-color);
}

.input-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-secondary);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
}

.password-toggle {
  position: absolute;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1rem;
  transition: color 0.2s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--primary-color);
}

.input-validation {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  cursor: help;
}

.input-validation.valid {
  color: var(--secondary-color);
}

.input-validation.invalid {
  color: #ef4444;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-check-input {
  margin: 0;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  position: relative;
  transition: all 0.2s ease;
}

.form-check-input:checked + .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:checked + .checkmark::after {
  content: "✓";
  color: white;
  position: absolute;
  top: -2px;
  left: 3px;
  font-size: 0.75rem;
  font-weight: bold;
}

.checkbox-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.forgot-password-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.forgot-password-btn:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* Password Strength */
.password-strength {
  margin-top: 0.75rem;
}

.strength-meter {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.strength-text {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.strength-bar {
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  background-color: #e5e7eb; /* Default gray background */
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 3px;
  min-width: 2px; /* Ensure visibility even at low percentages */
}

.strength-meter.very-weak {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.strength-meter.very-weak .strength-fill {
  background-color: #dc2626;
}
.strength-meter.weak {
  background-color: #fef3c7;
  border: 1px solid #fbbf24;
  color: #92400e;
}
.strength-meter.weak .strength-fill {
  background-color: #f59e0b;
}
.strength-meter.fair {
  background-color: #fef3c7;
  border: 1px solid #fbbf24;
  color: #92400e;
}
.strength-meter.fair .strength-fill {
  background-color: #f59e0b;
}
.strength-meter.good {
  background-color: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.strength-meter.good .strength-fill {
  background-color: #10b981;
}
.strength-meter.strong {
  background-color: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.strength-meter.strong .strength-fill {
  background-color: #059669;
}

/* Strength Fill Direct Classes for Register Page */
.strength-fill.very-weak {
  background-color: #dc2626;
}
.strength-fill.weak {
  background-color: #f59e0b;
}
.strength-fill.fair {
  background-color: #f59e0b;
}
.strength-fill.good {
  background-color: #10b981;
}
.strength-fill.strong {
  background-color: #059669;
}

/* Dark Mode Support for Password Strength */
[data-theme="dark"] .strength-bar {
  background-color: var(--border-color) !important;
}

[data-theme="dark"] .strength-fill {
  background-color: #374151 !important; /* Darker default for dark mode */
}

[data-theme="dark"] .strength-fill.very-weak {
  background-color: #dc2626 !important;
}

[data-theme="dark"] .strength-fill.weak {
  background-color: #f59e0b !important;
}

[data-theme="dark"] .strength-fill.fair {
  background-color: #f59e0b !important;
}

[data-theme="dark"] .strength-fill.good {
  background-color: #10b981 !important;
}

[data-theme="dark"] .strength-fill.strong {
  background-color: #059669 !important;
}

/* Password Match */
.password-match {
  margin-top: 0.75rem;
}
.match-success {
  color: #065f46;
  background-color: #d1fae5;
  border: 1px solid #a7f3d0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}
.match-error {
  color: #991b1b;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Form Actions */
.form-actions {
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 48px;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #4f46e5);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-block,
.btn-login,
.btn-register {
  width: 100%;
}

.btn-loading {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
}

.alert i {
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.alert-content {
  flex: 1;
  font-size: 0.95rem;
}

.alert-success {
  background-color: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.alert-warning {
  background-color: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}
.alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Form Footer */
.form-footer,
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.form-footer p,
.auth-footer-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.auth-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: #4f46e5;
  text-decoration: underline;
}

/* Field Validation */
.field-help {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.field-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
}

.alert-message {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-color);
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* Security Notice & Info Cards */
.security-notice {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
}

.notice-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.notice-content h4 {
  color: #0c4a6e;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
}

.notice-content ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #0c4a6e;
}

.notice-content li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.auth-info {
  max-width: 450px;
  width: 100%;
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

/* Forgot Password Layout */
.forgot-password-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .forgot-password-container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 3rem;
  }

  .forgot-password-container .auth-card {
    flex: 0 0 auto;
    min-width: 450px;
  }

  .forgot-password-container .auth-info {
    flex: 1;
    max-width: 400px;
    margin-top: 0;
  }
}

.info-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.info-content h3 {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.info-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

/* Dark Theme */
[data-theme="dark"] .auth-brand {
  background: linear-gradient(135deg, #1e40af 0%, #059669 100%);
}

[data-theme="dark"] .theme-toggle {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .auth-card {
  background: var(--card-bg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .info-card {
  background: rgba(31, 41, 55, 0.95);
  border: 1px solid rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .security-notice {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: 1px solid #475569;
}

[data-theme="dark"] .security-notice .notice-content h4,
[data-theme="dark"] .security-notice .notice-content ul,
[data-theme="dark"] .security-notice .notice-content li {
  color: #e2e8f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-brand {
    padding: 2rem;
    text-align: center;
    position: relative;
  }

  .brand-logo-top {
    padding: 1rem 0;
  }

  .brand-logo-top .logo {
    height: 50px;
  }

  .brand-description h2 {
    font-size: 2rem;
  }

  .auth-form-container {
    padding: 2rem;
  }

  /* Floating Theme Toggle for Tablet */
  .theme-toggle-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
  }

  .theme-toggle {
    background: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  .theme-toggle:hover {
    transform: scale(1.1);
  }

  /* Fix scrolling */
  .auth-page {
    overflow-x: hidden;
  }

  .auth-container.has-wrapper {
    min-height: 100vh;
  }
}

@media (max-width: 768px) {
  .auth-page {
    padding: 0;
    overflow-x: hidden;
  }

  .auth-wrapper {
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }

  .auth-brand {
    padding: 1.5rem;
    padding-top: 4rem; /* Extra space for floating button */
  }

  .brand-logo-top {
    padding: 0.75rem 0;
  }

  .brand-logo-top .logo {
    height: 45px;
  }

  .brand-description h2 {
    font-size: 1.75rem;
  }

  .auth-form-container {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .brand-features {
    margin-top: 1rem;
  }

  .feature-item {
    justify-content: center;
  }

  /* Floating Theme Toggle for Mobile */
  .theme-toggle-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .theme-toggle:hover {
    transform: scale(1.1);
  }

  /* Fix scrolling */
  body {
    overflow-x: hidden;
  }

  .auth-container.password-reset {
    padding: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    margin: 0;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .auth-info {
    margin-top: 1rem;
  }

  .info-card {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .form-options {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .checkbox-wrapper {
    justify-content: center;
  }

  .forgot-password-btn {
    text-align: center;
  }

  .auth-card {
    padding: 1.5rem 1rem;
  }

  .logo-image {
    width: 60px;
    height: 60px;
  }

  .auth-title {
    font-size: 1.25rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-control {
    padding: 0.75rem;
  }
}

#navbar-hero {
  position: fixed;
  top: -100px;
  width: 100%;
  transition: 0.3s;
}

#navbar {
  transition: 0.3s;
}

/* Modern Image Cards */
.list-card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.75rem !important;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.list-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px) scale(1.02);
  border-color: var(--primary-color);
}

.list-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.list-card:hover::before {
  transform: scaleX(1);
}

/* Enhanced Image Container */
.list-one-link {
  height: 320px;
  width: 100%;
  overflow: hidden;
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  background-image: radial-gradient(
      circle at 25px 25px,
      var(--border-color) 2px,
      transparent 0
    ),
    radial-gradient(circle at 75px 75px, var(--border-color) 2px, transparent 0);
  background-size: 50px 50px;
  background-position: 0 0, 25px 25px;
}

@media only screen and (max-width: 600px) {
  .list-one-link {
    height: 200px;
  }
  .list-one-name {
    font-size: 14px;
  }
}

.list-one-img {
  border-radius: var(--radius-md);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
  filter: drop-shadow(var(--shadow-md));
}

.list-card:hover .list-one-img {
  transform: translate(-50%, -50%) scale(1.05);
}

/* Modern Image Title */
.list-one-name {
  height: auto;
  min-height: 48px;
  line-height: 1.4;
  padding: 12px 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-primary);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  border-top: 1px solid var(--border-color);
  position: relative;
}

.list-one-name::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.list-card:hover .list-one-name::before {
  opacity: 1;
}
.list-four-title {
  height: 20px;
  line-height: 20px;
  margin: 10px 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.list-four-by {
  height: 25px;
  line-height: 25px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-user-img {
  width: 90px;
  height: 90px;
  border-radius: 100%;
  background: #abd1fa;
  color: #fff;
  text-align: center;
  line-height: 80px;
  font-weight: 700;
  font-size: 6rem;
}
.img-show {
  border: 1px solid #efefef;
  position: relative;
  max-height: 1000px;
  overflow: hidden;
  text-align: center;
  background: url(../img/imgshow_bg.png) repeat;
}
.img-part {
  display: inline-block;
  padding: 10px;
  height: 200px;
  overflow: hidden;
}
.img-part img {
  display: inline;
  width: 100%;
  max-width: 221px;
}
.user-btn-msg {
  height: 30px;
  line-height: 30px;
  position: absolute;
  left: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 18px;
}
.user-img-msg {
  display: none;
  width: 100%;
  padding: 10px;
  position: absolute;
  left: 0;
  bottom: 60px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  line-height: 15px;
}
.img-part:hover .user-img-msg {
  display: block;
}

.admin-img-show {
  border: 1px solid #efefef;
  position: relative;
  max-height: 1000px;
  overflow: hidden;
  text-align: center;
}
.admin-img-part {
  display: inline-block;
  padding: 10px;
  height: 200px;
  overflow: hidden;
}
.admin-img-part img {
  display: inline;
  width: 100%;
  max-width: 220px;
}
.admin-btn-msg {
  height: 30px;
  line-height: 30px;
  position: absolute;
  left: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  width: 100%;
  text-align: center;
}
.admin-img-msg {
  display: none;
  width: 100%;
  padding: 10px;
  position: absolute;
  left: 0;
  bottom: 30px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  line-height: 15px;
  font-size: 13px;
}
.admin-img-part:hover .admin-img-msg {
  display: block;
}

/* Enhanced Navigation */
.navbar {
  background-color: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  backdrop-filter: blur(10px);
}

.navbar .navbar-brand {
  color: var(--text-primary) !important;
}

.navbar .nav-link {
  color: var(--text-primary) !important;
}

.navbar .nav-link:hover {
  color: var(--primary-color) !important;
}

/* Footer Dark Mode Support */
.footer-dark {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-top: 1px solid var(--border-color);
}

.footer-dark h5 {
  color: var(--text-primary) !important;
  font-weight: 600;
}

.footer-dark .link-light {
  color: var(--text-secondary) !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-dark .link-light:hover {
  color: var(--primary-color) !important;
  text-decoration: underline;
}

.footer-dark hr {
  border-color: var(--border-color) !important;
  margin: 2rem 0 1rem 0;
}

/* For light mode footer */
[data-theme="light"] .footer-dark {
  background-color: #212529 !important;
  color: #f8f9fa !important;
}

[data-theme="light"] .footer-dark h5 {
  color: #f8f9fa !important;
}

[data-theme="light"] .footer-dark .link-light {
  color: #adb5bd !important;
}

[data-theme="light"] .footer-dark .link-light:hover {
  color: #2563eb !important;
}

[data-theme="light"] .footer-dark hr {
  border-color: #495057 !important;
}

/* Search Component Dark Mode */
.modern-search .form-control {
  border-color: var(--border-color);
  transition: all 0.3s ease;
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

.modern-search .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.1);
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

.modern-search .form-control::placeholder {
  color: var(--text-secondary) !important;
}

.modern-search .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Theme Toggle */
#themeToggle {
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

#themeToggle:hover {
  background-color: var(--bg-secondary);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.bi {
  margin-right: 0.3rem;
  width: 1rem;
  height: 1rem;
  vertical-align: -0.125em;
  fill: currentColor;
}

.tags-container {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Enhanced Grid Layout */
.modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

@media (max-width: 768px) {
  .modern-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  .modern-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }
}

/* Enhanced Sections */
.section-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
  position: relative;
  text-align: center;
}

/* Modern Tags */
.tag {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--primary-color)
  );
  background-image: url("/assets/images/close.svg");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: #fff;
  padding: 6px 24px 6px 12px;
  margin-right: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Enhanced Hero Section */
.hero-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

/* Bootstrap Component Dark Mode Overrides */
[data-theme="dark"] .btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

[data-theme="dark"] .btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

[data-theme="dark"] .btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .btn-outline-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* General Bootstrap overrides for dark mode */
[data-theme="dark"] .bg-light {
  background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .bg-body-tertiary {
  background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .text-secondary {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .border-bottom {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .shadow {
  box-shadow: var(--shadow-lg) !important;
}

/* Container and general layout dark mode */
[data-theme="dark"] .container {
  color: var(--text-primary);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] p {
  color: var(--text-primary);
}

/* Button Dark Mode Fixes */
[data-theme="dark"] .btn-outline-light {
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .btn-outline-light:hover {
  background-color: var(--bg-secondary);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Specific fixes for rounded pill buttons */
[data-theme="dark"] .rounded-pill.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: transparent;
}

[data-theme="dark"] .rounded-pill.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===============================
   NAVBAR STYLES
   =============================== */
/* ===== NAVBAR STYLES ===== */
.main-navbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  height: 70px;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: grid;
  grid-template-columns: 120px 1fr 280px 240px auto 50px;
  grid-template-areas: "brand . search auth mobile theme";
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
}

/* Brand Section */
.navbar-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  height: 44px;
  box-sizing: border-box;
}

.brand-link:hover {
  background: var(--bg-secondary);
  text-decoration: none;
}

.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Navigation Links - REMOVED */

/* Dropdown - REMOVED */

/* Search Bar */
.navbar-search {
  grid-area: search;
  display: flex;
  align-items: center;
  height: 100%;
}

.search-form {
  position: relative;
  width: 100%;
  height: auto;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0 1rem;
  padding-right: 3rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  height: 44px;
  box-sizing: border-box;
  line-height: 1;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
}

.search-btn:hover {
  color: var(--primary-color);
  background: var(--primary-light);
}

/* Auth Section */
.navbar-auth {
  grid-area: auth;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
}

/* Guest Auth Links - styles now applied directly to navbar-auth */

.auth-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
  text-decoration: none;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.875rem;
  height: 44px;
  box-sizing: border-box;
  white-space: nowrap;
}

.login-link:hover {
  color: var(--primary-color);
  background: var(--primary-light);
  text-decoration: none;
}

.register-link {
  background: var(--primary-color);
  color: white;
}

.register-link:hover {
  background: #1d4ed8;
  color: white;
  text-decoration: none;
}

.link-icon {
  font-size: 1rem;
  margin-right: 0.5rem;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* User Menu - styles now applied directly to navbar-auth */

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
  background: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  height: 44px;
  box-sizing: border-box;
  white-space: nowrap;
}

.upload-btn:hover {
  background: #059669;
  color: white;
  text-decoration: none;
}

.btn-icon {
  font-size: 1rem;
}

.btn-text {
  font-weight: 500;
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  height: 44px;
  box-sizing: border-box;
  white-space: nowrap;
}

.user-trigger:hover {
  background: var(--bg-secondary);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  overflow: hidden;
}

.user-avatar-img,
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Show gradient background when avatar has text (fallback) */
.user-avatar span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.user-name {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-width: 250px;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.user-info {
  text-align: left;
}

.user-full-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.user-email {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.dropdown-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

.admin-link {
  color: var(--accent-color);
}

.logout-link {
  color: #ef4444;
}

.logout-link:hover {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

/* Theme Toggle */
.navbar-theme {
  grid-area: theme;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.theme-toggle:hover {
  color: var(--primary-color);
  background: var(--primary-light);
  border-color: var(--primary-color);
}

.theme-icon {
  font-size: 1rem;
}

/* Mobile Menu */
.mobile-menu-toggle {
  grid-area: mobile;
  display: none;
}

.menu-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  width: 44px;
  height: 44px;
  position: relative;
}

.menu-toggle-btn:hover {
  background: var(--bg-secondary);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger Animation */
.main-navbar.mobile-open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.main-navbar.mobile-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.main-navbar.mobile-open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 1rem;
    grid-template-columns: 80px 1fr auto auto 44px;
    grid-template-areas: "brand search mobile auth theme";
    gap: 0.5rem;
  }

  /* Show search directly in navbar on mobile */
  .navbar-search {
    grid-area: search;
    display: flex;
    align-items: center;
    height: 100%;
    position: static;
    transform: none;
    background: none;
    border: none;
    padding: 0;
    z-index: auto;
    max-width: none;
    flex-direction: row;
  }

  .search-form {
    width: 100%;
    height: 36px;
  }

  .search-input {
    height: 36px;
    font-size: 0.8rem;
    padding: 0 0.75rem;
    padding-right: 2.5rem;
    border-radius: 18px;
  }

  .search-input::placeholder {
    font-size: 0.8rem;
  }

  .search-btn {
    height: 28px;
    width: 28px;
    right: 4px;
  }

  /* Auth section in mobile menu */
  .navbar-auth {
    position: fixed;
    top: 70px;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 1rem;
    overflow-y: auto;
    z-index: 1001;
    width: 280px;
    max-width: 80vw;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  .main-navbar.mobile-open .navbar-auth {
    transform: translateX(0);
  }

  .navbar-auth {
    align-items: stretch;
  }

  .mobile-menu-toggle {
    display: flex;
    grid-area: mobile;
  }

  /* Improve mobile auth layout */
  .auth-link,
  .upload-btn,
  .user-trigger {
    height: 48px;
    font-size: 0.9rem;
    justify-content: flex-start;
    padding: 0 1rem;
  }

  .user-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
  }

  /* Hide desktop search behavior */
  .main-navbar.mobile-open .navbar-search {
    transform: none;
    position: static;
  }

  /* Mobile touch improvements */
  .brand-logo {
    height: 32px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  /* Mobile menu header */
  .navbar-auth::before {
    content: "Menu";
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 1rem 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    margin: -1rem -1rem 1rem -1rem;
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
  }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
  .navbar-container {
    grid-template-columns: 120px 1fr 250px 180px auto 44px;
    grid-template-areas: "brand . search auth mobile theme";
    gap: 0.75rem;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
  .navbar-container {
    padding: 0 0.75rem;
    grid-template-columns: 70px 1fr auto auto 40px;
    gap: 0.25rem;
  }

  .brand-logo {
    height: 28px;
  }

  .search-form {
    height: 32px;
  }

  .search-input {
    height: 32px;
    font-size: 0.75rem;
    padding: 0 0.5rem;
    padding-right: 2rem;
    border-radius: 16px;
  }

  .search-input::placeholder {
    font-size: 0.75rem;
  }

  .search-btn {
    height: 24px;
    width: 24px;
    right: 4px;
  }

  .upload-btn,
  .user-trigger,
  .auth-link {
    height: 44px;
    font-size: 0.85rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .menu-toggle-btn {
    width: 36px;
    height: 36px;
  }

  .hamburger-line {
    width: 16px;
  }

  .navbar-auth {
    width: 260px;
    padding: 0.75rem;
  }
}

.main-content {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
}

/* ===============================
   HOME PAGE STYLES
   =============================== */

.homepage {
  min-height: 100vh;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Hero Search */
.search-container {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-section .search-input-group {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.hero-section .search-input-group:focus-within {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.hero-section .search-icon {
  padding: 0 1rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.hero-section .search-input {
  flex: 1;
  border: none;
  padding: 1rem 0;
  font-size: 1rem;
  background: transparent;
  color: var(--text-primary);
}

.hero-section .search-input:focus {
  outline: none;
  box-shadow: none;
}

.hero-section .search-input::placeholder {
  color: var(--text-secondary);
}

.hero-section .search-btn {
  position: static;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 4px;
  width: auto;
  height: auto;
  transform: none;
}

.hero-section .search-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.hero-section .btn-icon {
  font-size: 1rem;
}

/* Quick Links */
.quick-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.quick-link {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.quick-link:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quick-link i {
  font-size: 1rem;
}

/* Images Sections */
.images-section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.view-all-btn {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  border: 1px solid transparent;
}

.view-all-btn:hover {
  color: var(--primary-dark);
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: translateX(4px);
}

.view-all-btn i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.view-all-btn:hover i {
  transform: translateX(4px);
}

/* Images Grid */
.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.image-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.image-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-info {
  padding: 1rem;
}

.image-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

/* No Images State */
.no-images {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.no-images-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.no-images-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* CTA Section */
.cta-section {
  background: var(--bg-secondary);
  padding: 4rem 0;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.cta-content h2 i {
  color: var(--primary-color);
  font-size: 2rem;
}

.cta-content p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Home Page Buttons */
.homepage .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.homepage .btn-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.homepage .btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.homepage .btn-outline {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.homepage .btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
}

.homepage .btn i {
  font-size: 1rem;
}

/* Dark Mode Improvements */
[data-theme="dark"] .hero-section .search-input-group {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #1e40af 0%, #059669 100%);
}

/* Popular Section Styling */
.popular-section {
  background: var(--bg-secondary);
}

/* Enhanced Visual Hierarchy */
.images-section:nth-of-type(even) {
  background: var(--bg-secondary);
}

/* Loading Animation */
.image-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.image-card:hover .image-wrapper::after {
  left: 100%;
}

/* Home Page Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .cta-content h2 {
    font-size: 2rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .images-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .hero-section .search-input-group {
    flex-direction: row;
  }

  .hero-section .search-btn {
    padding: 0.875rem 1rem;
    min-width: auto;
  }

  .hero-section .btn-text {
    display: inline;
  }

  .quick-links {
    gap: 0.5rem;
  }

  .quick-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .quick-link span {
    display: none;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .homepage .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.1;
  }

  .search-container {
    margin-bottom: 1.5rem;
  }

  .hero-section .search-input {
    font-size: 0.9rem;
  }

  .hero-section .search-btn {
    padding: 0.75rem;
    min-width: 44px;
  }

  .hero-section .btn-text {
    display: none;
  }

  .quick-link i {
    font-size: 1.2rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .view-all-btn {
    align-self: flex-end;
  }
}

/* ===== FOOTER STYLES ===== */
.main-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  color: var(--text-primary);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem 1rem;
}

/* Footer Content Grid */
.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Brand Section */
.brand-section {
  grid-column: span 1;
}

.footer-brand {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.footer-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.social-icon {
  font-size: 1.1rem;
}

/* Footer Sections */
.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-link:hover {
  color: var(--primary-color);
  text-decoration: none;
  transform: translateX(3px);
}

/* Newsletter Section */
.newsletter-section {
  grid-column: span 1;
}

.newsletter-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.newsletter-form {
  margin-bottom: 2rem;
}

.newsletter-input-group {
  position: relative;
  display: flex;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  transition: all 0.3s ease;
}

.newsletter-input-group:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
}

.newsletter-input::placeholder {
  color: var(--text-secondary);
}

.newsletter-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
}

.newsletter-btn:hover {
  background: #1d4ed8;
}

.newsletter-btn:disabled {
  background: var(--text-secondary);
  cursor: not-allowed;
}

.newsletter-disclaimer {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: 0.5rem;
  line-height: 1.4;
  display: block;
}

/* Footer Stats */
.footer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  flex: 1;
}

.copyright p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.powered-by {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.bottom-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.bottom-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Back to Top Button */
.back-to-top {
  display: flex;
  align-items: center;
}

.back-to-top-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
}

.back-to-top-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 1rem;
}

.btn-text {
  font-weight: 500;
}

/* Footer Mobile Responsive */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .brand-section {
    grid-column: span 3;
    text-align: center;
    margin-bottom: 1rem;
  }

  .newsletter-section {
    grid-column: span 3;
    text-align: center;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
  }
}

@media (max-width: 768px) {
  .footer-container {
    padding: 2rem 1rem 1rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .brand-section {
    grid-column: span 2;
    text-align: center;
    margin-bottom: 1rem;
  }

  .newsletter-section {
    grid-column: span 2;
  }

  .footer-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .stat-item {
    padding: 0.75rem;
  }

  .stat-number {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-bottom-links {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .brand-section {
    grid-column: span 1;
  }

  .newsletter-section {
    grid-column: span 1;
  }

  .footer-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .newsletter-input-group {
    flex-direction: column;
    border-radius: var(--radius-md);
  }

  .newsletter-input {
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
  }

  .newsletter-btn {
    width: 100%;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .social-links {
    justify-content: center;
  }
}

/* ===== BROWSE PAGE STYLES ===== */
.browse-page {
  background: var(--bg-secondary);
  min-height: 100vh;
}

/* Page Header */
.page-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 2rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-info h1.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.title-icon {
  font-size: 1.75rem;
  opacity: 0.8;
}

.page-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  max-width: 600px;
}

.header-stats {
  display: flex;
  gap: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  min-width: 100px;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Browse Navigation */
.browse-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--primary-color);
  background: var(--primary-light);
  border-color: var(--primary-color);
  text-decoration: none;
  transform: translateY(-2px);
}

.nav-tab.active {
  color: white;
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.tab-icon {
  font-size: 1rem;
  opacity: 0.9;
}

.tab-text {
  font-weight: 500;
}

/* Browse Content */
.browse-content {
  padding: 2rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Images Grid */
.images-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.image-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.image-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.image-preview.loaded {
  opacity: 1;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.image-card:hover .image-overlay {
  opacity: 1;
}

.overlay-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text-primary);
}

.like-btn.liked {
  background: #ef4444;
  color: white;
}

.like-btn.liked:hover {
  background: #dc2626;
  color: white;
}

.download-btn {
  background: var(--primary-color);
  color: white;
}

.download-btn:hover {
  background: #1d4ed8;
  color: white;
}

.btn-icon {
  font-size: 1rem;
}

.btn-count,
.btn-text {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Image Info */
.image-info {
  padding: 1.25rem;
}

.image-title {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.image-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.image-title a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.image-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.author-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.author-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.author-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  min-width: 40px;
  justify-content: center;
}

.page-link:hover {
  color: var(--primary-color);
  background: var(--primary-light);
  text-decoration: none;
}

.page-link.current {
  color: white;
  background: var(--primary-color);
}

.prev-link,
.next-link {
  padding: 0.5rem 1rem;
}

.page-dots {
  color: var(--text-secondary);
  padding: 0 0.5rem;
  font-weight: 500;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.empty-description {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 2rem 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .header-info h1.page-title {
    font-size: 1.75rem;
  }

  .header-stats {
    justify-content: center;
  }

  .nav-tabs {
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .nav-tab {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .images-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .prev-link,
  .next-link {
    order: -1;
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .images-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }

  .image-info {
    padding: 1rem;
  }

  .overlay-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* Dashboard Styles */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  background: var(--bg-color);
  width: 100%;
  margin: 0;
  padding: 0;
  max-width: none;
}

/* Override Bootstrap container restrictions for dashboard */
.dashboard-page .container,
.dashboard-page .container-fluid {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

.dashboard-sidebar {
  width: 260px;
  background: var(--card-bg);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.dashboard-main {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  background: var(--bg-color);
  width: calc(100% - 260px);
  max-width: none;
}

.dashboard-header {
  background: var(--card-bg);
  padding: 1rem 2rem;
  margin: -2rem -2rem 2rem -2rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: auto;
  z-index: 50;
}

.dashboard-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-nav li {
  margin-bottom: 0.5rem;
}

.dashboard-nav a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  margin: 0 1rem;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
  background: var(--primary-color);
  color: white;
  transform: translateX(4px);
}

.dashboard-nav i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.welcome-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.welcome-section * {
  color: var(--text-primary) !important;
}

.welcome-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary) !important;
}

.welcome-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted) !important;
  margin: 0;
}

.welcome-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.welcome-content {
  position: relative;
  z-index: 2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-icon.primary {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}
.stat-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
.stat-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}
.stat-icon.info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}
.stat-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}
.stat-icon.pink {
  background: rgba(236, 72, 153, 0.1);
  color: #ec4899;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.trend-up {
  color: #10b981;
}
.trend-down {
  color: #ef4444;
}

.dashboard-sections {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.section-card {
  background: var(--card-bg);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.section-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(var(--primary-rgb), 0.03);
}

.section-content {
  padding: 1.5rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.action-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.action-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-hover)
  );
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.action-card:hover::before {
  transform: scaleX(1);
}

.action-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.activity-feed {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.activity-time {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Mobile Dashboard */
@media (max-width: 768px) {
  .dashboard-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .dashboard-main {
    margin-left: 0;
    padding: 1rem;
  }

  .dashboard-header {
    margin: -1rem -1rem 1rem -1rem;
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .dashboard-sections {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .quick-actions {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .welcome-section {
    padding: 1.5rem;
    text-align: center;
  }

  .stat-number {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-nav a {
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
  }
}

/* Dashboard Index Layout */
.dashboard-overview {
  padding: 0;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.dashboard-col-8,
.dashboard-col-4 {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
}

.section-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(var(--primary-rgb), 0.02);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.section-action {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.section-action:hover {
  text-decoration: underline;
}

/* Quick Actions Grid */
.action-grid {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.action-card:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
  border-color: var(--primary-color);
}

.action-card:hover * {
  color: white;
}

.action-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.action-content {
  flex: 1;
}

.action-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.action-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.action-arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.action-card:hover .action-arrow {
  transform: translateX(4px);
}

/* Activity List */
.activity-list {
  padding: 1.5rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.activity-icon.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.activity-time {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.activity-time-stamp {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Info Cards */
.info-cards {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
}

.info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-content {
  flex: 1;
}

.info-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.info-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Account Status */
.account-status {
  padding: 1.5rem;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.status-item:last-child {
  border-bottom: none;
}

.status-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.status-value {
  color: var(--text-primary);
  font-weight: 500;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--primary-color);
  color: white;
}

.badge.success {
  background: #10b981;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .dashboard-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .action-card {
    padding: 1rem;
  }

  .action-icon {
    font-size: 1.5rem;
  }

  .section-header {
    padding: 1rem;
  }

  .activity-list,
  .info-cards,
  .account-status {
    padding: 1rem;
  }
}

/* Dashboard Header Component Styles */
.dashboard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.dashboard-overlay.active {
  display: block;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 100%;
  height: auto;
  max-height: 50px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
}

.user-info {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  overflow: hidden;
}

.user-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 0.875rem;
}

/* Ensure images inside user-avatar are properly sized */
.user-avatar-img,
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.user-role {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
}

.nav-link.active {
  background: var(--primary-color);
  color: white;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: white;
}

.nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-text {
  font-weight: 500;
}

.nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 1rem 1.5rem;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.theme-toggle-container {
  margin-bottom: 1rem;
}

.theme-toggle {
  width: 100%;
  padding: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.theme-toggle:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.logout-btn {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid #e74c3c;
  border-radius: 0.5rem;
  color: #e74c3c;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.logout-btn:hover {
  background: #e74c3c;
  color: white;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(var(--primary-rgb), 0.1);
}

.mobile-only {
  display: none;
}

/* Dashboard Header Styles */
.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 300px;
  padding: 0.5rem 1rem;
  padding-right: 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-btn {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
}

.notification-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.notification-btn:hover {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #e74c3c;
  color: white;
  font-size: 0.7rem;
  padding: 0.125rem 0.375rem;
  border-radius: 1rem;
  min-width: 18px;
  text-align: center;
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  transition: background-color 0.2s ease;
}

.user-menu-trigger:hover {
  background: rgba(var(--primary-rgb), 0.1);
}

.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.user-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 280px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

/* Ensure solid background for light mode */
[data-theme="light"] .user-menu-dropdown {
  background: #ffffff;
}

/* Ensure solid background for dark mode */
[data-theme="dark"] .user-menu-dropdown {
  background: #1f2937;
}

.user-menu-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.user-info-compact .user-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.user-email {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.menu-items {
  padding: 0.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.menu-item:hover {
  background: rgba(var(--primary-rgb), 0.1);
}

.menu-item.text-danger {
  color: #e74c3c;
}

.menu-item.text-danger:hover {
  background: rgba(231, 76, 60, 0.1);
}

.menu-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }

  .search-container {
    display: none;
  }

  .search-input {
    width: 200px;
  }

  .dashboard-sidebar.mobile-open {
    transform: translateX(0);
  }

  .user-menu-dropdown {
    width: 240px;
  }
}

/* ===============================
   DASHBOARD DARK MODE FIXES
   =============================== */

/* Dashboard Header Section Dark Mode */
[data-theme="dark"] .dashboard-header-section {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .dashboard-main-title {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .dashboard-main-subtitle {
  color: var(--text-secondary) !important;
}

/* Stats Grid Dark Mode */
[data-theme="dark"] .stats-grid .stat-card {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .stat-number {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .stat-label {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .stat-meta {
  color: var(--text-muted) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .stat-header {
  color: var(--text-primary) !important;
}

/* Section Cards Dark Mode */
[data-theme="dark"] .section-card {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .section-title {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .section-subtitle {
  color: var(--text-secondary) !important;
}

/* Action Cards Dark Mode */
[data-theme="dark"] .action-card {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .action-title {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .action-description {
  color: var(--text-secondary) !important;
}

/* Dashboard Sections Dark Mode */
[data-theme="dark"] .dashboard-section {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* Welcome Section Dark Mode */
[data-theme="dark"] .welcome-section {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .welcome-title {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .welcome-description {
  color: var(--text-secondary) !important;
}

/* Upload/Multi-Upload Containers Dark Mode */
[data-theme="dark"] .upload-container,
[data-theme="dark"] .multi-upload-container {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* Form Controls Dark Mode */
[data-theme="dark"] .form-control {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .form-control:focus {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25) !important;
}

[data-theme="dark"] .form-label {
  color: var(--text-primary) !important;
}

/* Table Dark Mode */
[data-theme="dark"] .table {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .table th {
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .table td {
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* Badge Dark Mode */
[data-theme="dark"] .badge {
  background: var(--primary-color) !important;
  color: white !important;
}

/* Progress Bar Dark Mode */
[data-theme="dark"] .progress {
  background: var(--bg-secondary) !important;
}

[data-theme="dark"] .progress-bar {
  background: var(--primary-color) !important;
}

/* Icon Classes Dark Mode */
[data-theme="dark"] .action-icon,
[data-theme="dark"] .upload-icon,
[data-theme="dark"] .summary-icon,
[data-theme="dark"] .metric-icon,
[data-theme="dark"] .health-icon,
[data-theme="dark"] .empty-icon {
  color: var(--text-primary) !important;
}

/* Alert & Notification Dark Mode */
[data-theme="dark"] .alert {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .alert-success {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

[data-theme="dark"] .alert-warning {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

[data-theme="dark"] .alert-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

/* Dropdown Dark Mode */
[data-theme="dark"] .dropdown-menu {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .dropdown-item {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .dropdown-item:hover {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

/* Modal Dark Mode */
[data-theme="dark"] .modal-content {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .modal-header {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .modal-footer {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .modal-title {
  color: var(--text-primary) !important;
}

/* List Group Dark Mode */
[data-theme="dark"] .list-group-item {
  background: var(--card-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .list-group-item:hover {
  background: var(--bg-secondary) !important;
}

/* Card Additional Dark Mode */
[data-theme="dark"] .card-title {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .card-subtitle {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .card-text {
  color: var(--text-primary) !important;
}

/* Image Gallery Dark Mode */
[data-theme="dark"] .image-item {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .image-info {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .image-meta {
  color: var(--text-secondary) !important;
}

/* Timeline Components Dark Mode */
[data-theme="dark"] .activity-timeline .timeline-item {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .timeline-content h5 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .timeline-content p {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .timeline-meta {
  color: var(--text-secondary) !important;
}

/* Tips Grid Dark Mode */
[data-theme="dark"] .tips-grid .tip-item {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .tip-content h5 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .tip-content p {
  color: var(--text-secondary) !important;
}

/* Contributors List Dark Mode (Analytics Page) */
[data-theme="dark"] .contributors-list .contributor-row {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .contributor-rank {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .contributor-name {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .contributor-username {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .contributor-stats .stat-number {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .contributor-stats .stat-label {
  color: var(--text-secondary) !important;
}
