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

html,
body {
  height: 100%;
  overflow: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #eef2f7;
  color: #1f2937;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  width: 100%;
  height: auto;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 1rem;
  left: 0;
  right: 0;
  margin: 0 1.5rem;
  border-radius: 32px;
  z-index: 1000;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.3rem;
  color: #111827;
  background-color: #eef2ff;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-container input[type="search"] {
  width: 420px;
  max-width: 100%;
  padding: 0.85rem 1.2rem 0.85rem 1.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 999px;
  outline: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background-color: #f9fafb;
}

.search-container input[type="search"]::placeholder {
  color: #9ca3af;
}

.search-container input[type="search"]:hover {
  border-color: #d1d5db;
  background-color: #ffffff;
}

.search-container input[type="search"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background-color: #ffffff;
}

.search-container button {
  position: absolute;
  right: 1.2rem;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.6rem;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.search-container button:hover {
  color: #6366f1;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-links a {
  color: #475569;
  font-weight: 600;
  padding: 0.5rem 1rem 0.5rem 1.5rem;
  border-radius: 999px;
  position: relative;
  transition: color 0.2s ease;
}

.navbar-links a::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background-color: rgba(99, 102, 241, 0.35);
  opacity: 0.8;
}

.navbar-links a:hover {
  color: #111827;
}

.navbar-links a.active {
  color: #4338ca;
}

.navbar-links a.active::before {
  background-color: #4338ca;
  opacity: 1;
}
.page-grid {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 2rem 2rem;
  align-items: start;
  min-height: calc(100vh - 8rem);
  height: calc(100vh - 8rem);
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  top: 6rem;
  align-self: start;
}

.sidebar-brand {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 1.2rem;
}

.sidebar-nav {
  display: grid;
  gap: 0.75rem;
}

.sidebar-link {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background-color: #ffffff;
  display: grid;
  place-items: center;
  color: #6b7280;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  background-color: #eef2ff;
  color: #4338ca;
  transform: translateY(-2px);
}

.content-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.content-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

.page-title {
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 1.05;
  max-width: 680px;
  color: #111827;
}

.top-actions {
  display: flex;
  gap: 0.75rem;
}

.icon-action {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  color: #4b5563;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-action:hover {
  border-color: #c7d2fe;
  background-color: #f8fafc;
}

.search-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #ffffff;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.search-panel i {
  color: #6b7280;
  font-size: 1rem;
}

.search-panel input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.95rem;
  color: #111827;
}

.search-panel button {
  border: none;
  background-color: #4338ca;
  color: #ffffff;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.search-panel button:hover {
  background-color: #3730a3;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip {
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  color: #374151;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.active,
.chip:hover {
  border-color: #c7d2fe;
  background-color: #eef2ff;
  color: #1d4ed8;
}

.gallery-grid {
  column-width: 280px;
  column-gap: 1.25rem;
  width: min(1800px, 100%);
  margin: 0 auto;
  padding-inline: 0.25rem;
}

.photo-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.25rem;
  border-radius: 24px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
}

.about-panel {
  padding: 2rem 0;
}

.about-box {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  max-width: 760px;
  margin: auto;
}

.about-box h2 {
  margin-bottom: 1rem;
  font-size: 1.75rem;
  color: #111827;
}

.about-box p {
  color: #4b5563;
  line-height: 1.8;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 55px rgba(15, 23, 42, 0.12);
}

.photo-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.photo-overlay h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.photo-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.like-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s;
}

.like-btn:hover {
  color: #ff6b6b;
}

.like-btn.liked {
  color: #ff6b6b;
}

.likes-count {
  font-size: 0.9rem;
  color: white;
}

/* ========================================
   SETTINGS PANEL
======================================== */
.settings-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.settings-panel:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.settings-content {
  background-color: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 3rem 2rem 2rem;
  transform: scale(0.95) translateY(15px);
  transition: all 0.3s ease;
}

.settings-panel:not(.hidden) .settings-content {
  transform: scale(1) translateY(0);
}

.settings-content h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #111827;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.setting-item label {
  font-size: 1rem;
  color: #374151;
}

.setting-item input[type="file"] {
  margin-left: 1rem;
}

.setting-item button {
  margin-left: 0.5rem;
  background-color: #4338ca;
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.setting-item button:hover {
  background-color: #3730a3;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4338ca;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.settings-content button#close-settings {
  background-color: #6b7280;
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
  margin-top: 1rem;
}

.settings-content button#close-settings:hover {
  background-color: #4b5563;
}

/* Dark Mode */
body.dark-mode {
  background-color: #1a1a1a;
  color: #e5e5e5;
}

body.dark-mode .navbar,
body.dark-mode .photo-card,
body.dark-mode .about-box,
body.dark-mode .settings-content {
  background-color: #2d2d2d;
  color: #e5e5e5;
}

body.dark-mode .navbar-links a,
body.dark-mode .chip {
  color: #b3b3b3;
}

body.dark-mode .navbar-links a.active,
body.dark-mode .chip.active {
  color: #60a5fa;
}

body.dark-mode .search-panel,
body.dark-mode .icon-action {
  background-color: #3d3d3d;
  border-color: #555555;
}

body.dark-mode .settings-panel {
  background-color: rgba(0, 0, 0, 0.7);
}

@media (max-width: 1024px) {
  .page-grid {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    justify-content: center;
    padding: 0;
  }

  .sidebar-nav {
    grid-auto-flow: column;
  }

  .top-bar,
  .search-area {
    gap: 1rem;
  }

  .top-actions {
    justify-content: flex-end;
  }

  .photo-card.wide {
    width: 100%;
  }

  .photo-card.tall {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .navbar {
    flex-wrap: wrap;
    padding: 1rem;
    margin: 0.5rem 0.75rem;
    border-radius: 24px;
  }

  .navbar-left {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .logo {
    padding: 0.5rem 0.85rem;
  }

  .search-container {
    width: 100%;
  }

  .search-container input[type="search"] {
    width: 100%;
    padding-right: 3rem;
    font-size: 0.95rem;
  }

  .search-container button {
    right: 0.9rem;
  }

  .navbar-page {
    width: 100%;
    text-align: left;
  }

  .navbar-page-label,
  .navbar-page-title {
    text-align: left;
  }

  .navbar-page-title {
    font-size: 0.95rem;
  }

  .navbar-auth {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .navbar-auth button {
    flex: 1 1 48%;
    min-width: 0;
  }

  .sidebar {
    padding: 0.5rem;
  }

  .sidebar-brand {
    width: 48px;
    height: 48px;
  }

  .sidebar-nav {
    gap: 0.5rem;
  }

  .sidebar-link {
    width: 48px;
    height: 48px;
  }

  .page-grid {
    padding: 1rem;
    gap: 1rem;
  }

  .gallery-grid {
    column-width: 100%;
    column-gap: 0.75rem;
  }

  .photo-overlay {
    padding: 0.85rem;
  }

  .photo-overlay h3 {
    font-size: 0.95rem;
  }

  .top-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 420px) {
  .navbar-auth button {
    flex: 1 1 100%;
  }

  .logo {
    font-size: 1.1rem;
  }

  .search-container button {
    right: 0.7rem;
  }

  .navbar-page-title {
    font-size: 0.9rem;
  }

  .photo-card {
    margin-bottom: 0.85rem;
  }

  .sidebar-link {
    width: 44px;
    height: 44px;
  }

  .sidebar-brand {
    width: 44px;
    height: 44px;
  }

  .profile-avatar-section,
  .creator-profile-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .upload-item {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-thumbnail {
    width: 100%;
    height: auto;
  }
}

/* ========================================
   BUTTON STYLES
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: #4338ca;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #3730a3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
}

.btn-secondary {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.btn-outline {
  background-color: transparent;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-outline:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.btn-google {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-google:hover {
  background-color: #f9fafb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ========================================
   MODAL STYLES
======================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.modal:not(.hidden) .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.modal-content.notifications-modal {
  padding: 2rem;
  max-width: 520px;
}

.notifications-header {
  margin-bottom: 1.5rem;
}

.notifications-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.notifications-header .modal-subtitle {
  color: #6b7280;
  font-size: 0.95rem;
}

.notifications-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.notification-item {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background-color: #f9fafb;
  color: #111827;
}

.notifications-empty-message {
  color: #6b7280;
  font-size: 0.95rem;
  margin: 0;
}

.notifications-empty-message.hidden {
  display: none;
}

/* ========================================
   AUTHENTICATION MODAL STYLES
======================================== */
.auth-modal .modal-content {
  padding: 0;
  max-width: 400px;
}

.auth-container {
  padding: 3rem 2rem 2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: #6b7280;
  font-size: 0.95rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.auth-footer a {
  color: #4338ca;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e5e7eb;
}

.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  padding: 0 1rem;
}

/* ========================================
   FORM STYLES
======================================== */
form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #111827;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #4338ca;
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group select {
  cursor: pointer;
}

.char-counter {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.char-counter.warning {
  color: #f59e0b;
}

.char-counter.error {
  color: #ef4444;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4338ca;
}

.form-checkbox label {
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  margin-bottom: 0;
}

/* ========================================
   UPLOAD MODAL STYLES
======================================== */
.upload-modal .modal-content {
  padding: 0;
  max-width: 600px;
}

.upload-container {
  padding: 3rem 2rem 2rem;
}

.upload-header {
  text-align: center;
  margin-bottom: 2rem;
}

.upload-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.upload-header p {
  color: #6b7280;
  font-size: 0.95rem;
}

/* ========================================
   FILE UPLOAD STYLES
======================================== */
.file-upload {
  position: relative;
  margin-bottom: 1rem;
}

.file-upload input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  background-color: #f9fafb;
  transition: all 0.2s ease;
  cursor: pointer;
}

.file-upload:hover .file-upload-area {
  border-color: #4338ca;
  background-color: #eef2ff;
}

.file-upload-area i {
  font-size: 3rem;
  color: #9ca3af;
  margin-bottom: 1rem;
  display: block;
}

.file-upload-area p {
  color: #6b7280;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.file-upload-area small {
  color: #9ca3af;
  font-size: 0.85rem;
}

/* ========================================
   UPLOAD PREVIEW STYLES
======================================== */
.upload-preview {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #f9fafb;
}

.upload-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

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

/* ========================================
   USER MENU STYLES
======================================== */
.navbar-auth {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.user-trigger {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.user-trigger .user-profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.user-trigger:hover .user-profile-trigger {
  background-color: #f3f4f6;
}

.user-trigger .trigger-icon {
  font-size: 0.8rem;
  color: #6b7280;
}

.user-menu {
  position: relative;
}

.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.user-menu:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.user-profile:hover {
  background-color: #f3f4f6;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e5e7eb;
}

.user-profile div {
  display: flex;
  flex-direction: column;
}

.user-profile p {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
  margin-bottom: 0.125rem;
}

.user-profile small {
  font-size: 0.8rem;
  color: #6b7280;
}

.trigger-avatar-container {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.trigger-avatar-container .avatar-letter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.avatar-letter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.user-menu .menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 0.9rem;
  width: 100%;
  text-align: left;
}

.user-menu .menu-item:hover {
  background-color: #f3f4f6;
}

.user-menu .menu-item.text-danger {
  color: #dc2626;
}

.user-menu .menu-item.text-danger:hover {
  background-color: #fef2f2;
}

/* ========================================
   DROPDOWN MENU STYLES - Already defined above
======================================== */

/* ========================================
   HIDDEN CLASS
======================================== */
.hidden {
  display: none !important;
}

/* ========================================
   DARK MODE FOR NEW COMPONENTS
======================================== */
body.dark-mode .modal-content {
  background-color: #2d2d2d;
  color: #e5e5e5;
}

body.dark-mode .auth-header h2,
body.dark-mode .upload-header h2,
body.dark-mode .settings-content h3 {
  color: #e5e5e5;
}

body.dark-mode .auth-header p,
body.dark-mode .upload-header p,
body.dark-mode .auth-footer,
body.dark-mode .auth-divider {
  color: #9ca3af;
}

body.dark-mode .form-group label {
  color: #e5e7eb;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea,
body.dark-mode .form-group select {
  background-color: #3d3d3d;
  border-color: #555555;
  color: #e5e5e5;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus,
body.dark-mode .form-group select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

body.dark-mode .char-counter {
  color: #9ca3af;
}

body.dark-mode .char-counter.warning {
  color: #fbbf24;
}

body.dark-mode .char-counter.error {
  color: #f87171;
}

body.dark-mode .file-upload-area {
  background-color: #3d3d3d;
  border-color: #555555;
}

body.dark-mode .file-upload:hover .file-upload-area {
  border-color: #60a5fa;
  background-color: #1e3a8a;
}

body.dark-mode .file-upload-area p,
body.dark-mode .file-upload-area small {
  color: #9ca3af;
}

body.dark-mode .upload-preview {
  background-color: #3d3d3d;
  border-color: #555555;
}

body.dark-mode .user-profile:hover {
  background-color: #374151;
}

body.dark-mode .user-menu .menu-item:hover {
  background-color: #374151;
}

body.dark-mode .user-menu .menu-item.text-danger:hover {
  background-color: #451a1a;
}

/* ========================================
   LOADING AND EMPTY STATES
======================================== */
.loading-state,
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem;
  color: #6b7280;
}

.loading-state p {
  font-size: 1.1rem;
  margin: 0;
}

.empty-state p {
  font-size: 1.1rem;
  margin: 0;
  color: #9ca3af;
}

body.dark-mode .loading-state p,
body.dark-mode .empty-state p {
  color: #9ca3af;
}

/* ========================================
   RESPONSIVE DESIGN FOR NEW COMPONENTS
======================================== */
@media (max-width: 640px) {
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }

  .auth-container,
  .upload-container {
    padding: 2rem 1.5rem 1.5rem;
  }

  .file-upload-area {
    padding: 2rem 1rem;
  }

  .file-upload-area i {
    font-size: 2.5rem;
  }

  .navbar-auth {
    gap: 0.5rem;
  }

  .user-profile p {
    display: none;
  }

  .user-profile small {
    display: none;
  }
}

/* ========================================
   ERROR MESSAGE STYLES
======================================== */
.error-message {
  padding: 0.875rem 1rem;
  margin-top: 1rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.9rem;
  font-weight: 500;
}

body.dark-mode .error-message {
  background-color: #1f1f1f;
  border-color: #7f1d1d;
  color: #fca5a5;
}

/* ========================================
   REQUIRED FIELD INDICATOR
======================================== */
.required {
  color: #dc2626;
  font-weight: 700;
}

/* ========================================
   UPLOAD PROGRESS BAR
======================================== */
.upload-progress {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4338ca, #6366f1);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 999px;
}

#progress-text {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
  margin: 0;
}

body.dark-mode .upload-progress {
  background-color: #2d2d2d;
}

body.dark-mode .progress-bar {
  background-color: #444444;
}

body.dark-mode #progress-text {
  color: #9ca3af;
}

/* ========================================
   SETTINGS PANEL IMPROVEMENTS
======================================== */
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.settings-header h3 {
  font-size: 1.3rem;
  color: #111827;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

body.dark-mode .settings-header {
  border-bottom-color: #444444;
}

body.dark-mode .settings-header h3 {
  color: #e5e5e5;
}

body.dark-mode .close-btn:hover {
  background-color: #374151;
  color: #e5e5e5;
}

/* ========================================
   SETTINGS TABS
======================================== */
.settings-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.settings-tab {
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.settings-tab:hover {
  color: #374151;
}

.settings-tab.active {
  color: #4338ca;
  border-bottom-color: #4338ca;
}

body.dark-mode .settings-tab {
  color: #9ca3af;
}

body.dark-mode .settings-tab:hover {
  color: #e5e5e5;
}

body.dark-mode .settings-tab.active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}

body.dark-mode .settings-tabs {
  border-bottom-color: #444444;
}

/* ========================================
   SETTINGS TAB CONTENT
======================================== */
.settings-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.settings-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========================================
   PROFILE SECTION
======================================== */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-section h4 {
  font-size: 1.1rem;
  color: #111827;
  font-weight: 600;
  margin: 0;
}

.creator-profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.creator-profile-card .profile-avatar-container {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background-color: #e5e7eb;
}

.creator-profile-card .profile-avatar-container .profile-avatar,
.creator-profile-card .profile-avatar-container .avatar-letter {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-profile-card .profile-avatar-container .avatar-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

#creator-view-bio {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0.5rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
}

.profile-avatar-container {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e5e7eb;
}

.profile-avatar-container .avatar-letter {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  position: absolute;
  top: 0;
  left: 0;
}

.profile-avatar-container .avatar-letter {
  width: 60px;
  height: 60px;
}

.profile-username {
  font-weight: 600;
  color: #111827;
  font-size: 1rem;
  margin: 0;
}

.profile-username-input {
  font-weight: 600;
  color: #111827;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.profile-email {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}

body.dark-mode .profile-section h4,
body.dark-mode .profile-username {
  color: #e5e5e5;
}

body.dark-mode .profile-avatar-section {
  background-color: #2d2d2d;
}

body.dark-mode .profile-email {
  color: #9ca3af;
}

/* ========================================
   UPLOADS LIST
======================================== */
.uploads-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  align-items: center;
}

.upload-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background-color: #e5e7eb;
}

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

.upload-info h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-info p {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.upload-info small {
  font-size: 0.8rem;
  color: #9ca3af;
  display: block;
}

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

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

.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

body.dark-mode .upload-item {
  background-color: #2d2d2d;
  border-color: #444444;
}

body.dark-mode .upload-info h5 {
  color: #e5e5e5;
}

body.dark-mode .upload-info p {
  color: #9ca3af;
}

body.dark-mode .upload-info small {
  color: #6b7280;
}

/* ========================================
   PREFERENCE ITEMS
======================================== */
.preference-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.preference-item label {
  font-weight: 600;
  color: #374151;
  margin: 0;
}

body.dark-mode .preference-item {
  background-color: #2d2d2d;
}

body.dark-mode .preference-item label {
  color: #e5e5e5;
}

/* ========================================
   DETAIL MODAL STYLES
======================================== */
.detail-modal {
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}

.detail-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.detail-image-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 12px;
  background-color: #f3f4f6;
}

.detail-image-actions {
  display: flex;
  gap: 1rem;
}

.detail-action-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #ffffff;
  color: #374151;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.detail-action-btn:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.detail-action-btn.liked {
  background-color: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.detail-info-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;
  max-height: 600px;
  padding-right: 1rem;
}

.detail-info-section::-webkit-scrollbar {
  width: 6px;
}

.detail-info-section::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.detail-info-section::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.detail-info-section::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Creator Profile */
.creator-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 12px;
}

.creator-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e5e7eb;
  flex-shrink: 0;
}

.creator-info {
  flex: 1;
}

.creator-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.25rem 0;
}

.creator-bio {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0.25rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-creator-work-btn {
  margin-top: 0.5rem;
}

/* Wallpaper Info */
.wallpaper-info {
  padding: 0;
}

.detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.5rem 0;
}

.detail-description {
  font-size: 0.95rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallpaper-meta {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.meta-item i {
  color: #4338ca;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tags-container span {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background-color: #eef2ff;
  color: #4338ca;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Comments Section */
.comments-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
}

.comments-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1rem 0;
}

.add-comment-form {
  margin-bottom: 1.5rem;
}

.add-comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

.add-comment-form textarea:focus {
  border-color: #4338ca;
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

.comment-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  justify-content: flex-end;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment {
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #e5e7eb;
}

.comment-author {
  font-weight: 600;
  color: #111827;
  font-size: 0.9rem;
}

.comment-date {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-left: auto;
}

.comment-content {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.5;
  margin: 0;
}

.login-prompt {
  text-align: center;
  padding: 1rem;
  background-color: #eef2ff;
  border-radius: 8px;
  color: #4338ca;
}

.login-prompt p {
  margin: 0 0 0.75rem 0;
  font-weight: 600;
}

/* Dark Mode for Detail Modal */
body.dark-mode .detail-modal-grid {
  background-color: #1f1f1f;
}

body.dark-mode .detail-action-btn {
  background-color: #2d2d2d;
  color: #e5e5e5;
  border-color: #444444;
}

body.dark-mode .detail-action-btn:hover {
  background-color: #3d3d3d;
  border-color: #555555;
}

body.dark-mode .detail-action-btn.liked {
  background-color: #3d2222;
  color: #fca5a5;
  border-color: #7f1d1d;
}

body.dark-mode .creator-profile {
  background-color: #2d2d2d;
}

body.dark-mode .creator-info h3,
body.dark-mode .detail-title {
  color: #e5e5e5;
}

body.dark-mode .creator-bio,
body.dark-mode .detail-description,
body.dark-mode .meta-item {
  color: #9ca3af;
}

body.dark-mode .tags-container span {
  background-color: #2d2d4d;
  color: #93c5fd;
}

body.dark-mode .comments-section {
  border-top-color: #444444;
}

body.dark-mode .comments-section h3 {
  color: #e5e5e5;
}

body.dark-mode .add-comment-form textarea {
  background-color: #2d2d2d;
  border-color: #444444;
  color: #e5e5e5;
}

body.dark-mode .add-comment-form textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

body.dark-mode .comment {
  background-color: #2d2d2d;
  border-color: #444444;
}

body.dark-mode .comment-author {
  color: #e5e5e5;
}

body.dark-mode .comment-content {
  color: #d1d5db;
}

body.dark-mode .login-prompt {
  background-color: #2d2d4d;
  color: #93c5fd;
}

/* Responsive Design */
@media (max-width: 768px) {
  .detail-modal-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .detail-info-section {
    max-height: none;
    padding-right: 0;
  }

  .detail-image {
    max-height: 400px;
  }
}
