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

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background-image: url('../assets/FreentBG.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #fff;
  min-height: 100vh;
  margin: 0;
}

/* Header - Match Homepage Style */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: #191919;
  border-bottom: 1px solid #FFD700;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  display: flex;
  align-items: center;
}

.logo img {
  height: 90px;
  max-width: 100%;
}

.nav-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  position: relative;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.main-nav a:hover {
  background-color: #FFD700;
  color: #000;
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

.main-nav a.active {
  color: #FFD700;
}

/* Services dropdown styles */
.services-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(135deg, #191919 0%, #2d2d2d 100%);
  padding: 0.5rem 0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 2px solid #FFD700;
  z-index: 10;
  min-width: 220px;
  list-style: none;
}

.dropdown-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dropdown-menu li::before {
  content: none !important;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: #FFD700;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-decoration: none;
}

.dropdown-menu li a:hover {
  background: rgba(255, 215, 0, 0.1);
  padding-left: 1.5rem;
}

.dropdown-menu li a i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.search-wrapper {
  margin-left: 1rem;
}

.search-form {
  margin: 0;
}

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

.search-icon {
  position: absolute;
  left: 12px;
  color: #999;
  pointer-events: none;
}

#search-input {
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.9rem;
  width: 200px;
  transition: all 0.3s ease;
}

#search-input:focus {
  outline: none;
  border-color: #FFD700;
  background: rgba(255, 255, 255, 0.15);
  width: 250px;
}

#search-input::placeholder {
  color: #999;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 1rem; /* Add padding to prevent edge overlap */
}

/* Notification Bell */
.notification-bell {
  position: relative;
  margin-right: 1rem;
}

.notification-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  position: relative;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.notification-btn:hover {
  color: #FFD700;
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.notification-dropdown {
  position: fixed; /* detach from header so it doesn't affect messages layout */
  top: 80px; /* placed below sticky header */
  right: 20px;
  width: 350px;
  max-width: calc(100% - 40px);
  max-height: 60vh;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  margin-top: 0.5rem;
  z-index: 99999;
}

.notification-dropdown.active {
  display: flex;
}

.notification-dropdown-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #000;
}

.notification-dropdown-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #FFD700;
}

.notification-dropdown-list {
  overflow-y: auto;
  max-height: 300px;
  color: #000;
}

.notification-loading {
  padding: 2rem;
  text-align: center;
  color: #999;
}

.user-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #FFD700;
  margin-right: 1rem;
}

.logout-btn {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logout-btn:hover {
  transform: translateY(-2px);
}

/* Messages Container */
.messages-container {
  max-width: 1000px;
  margin: 1rem auto;
  padding: 0 1rem;
  height: calc(100vh - 120px);
}

/* Chat Container */
.chat-container {
  background: linear-gradient(135deg, #191919 0%, #2d2d2d 100%);
  border: 2px solid #FFD700;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Chat Header */
.chat-header {
  background: linear-gradient(135deg, #191919 0%, #2d2d2d 100%);
  padding: 1rem 1.5rem;
  border-bottom: 2px solid #FFD700;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.current-responder {
  color: #cfcfcf;
  font-size: 0.9rem;
  margin-top: 4px;
  font-weight: 500;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #FFD700;
  object-fit: cover;
}

.chat-header-info h3 {
  color: #FFD700;
  font-size: 1.1rem;
  margin: 0;
}

.chat-header-info p {
  color: #999;
  font-size: 0.85rem;
  margin: 0;
}

/* Messages Window */
.messages-window {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-bubble {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  word-wrap: break-word;
}

.message-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  border-bottom-right-radius: 4px;
}

.message-bubble.admin {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
  text-align: right;
}

.message-bubble.admin .message-time {
  text-align: left;
}

.message-design-attachment {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 0.5rem;
}

.message-design-attachment img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

.message-design-attachment span {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Message Input Container */
.message-input-container {
  background: rgba(25, 25, 25, 0.95);
  border-top: 2px solid rgba(255, 215, 0, 0.3);
  padding: 1rem 1.5rem;
}

.design-preview-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f3f4f6;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  position: relative;
}

.design-preview-compact img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}

.design-preview-compact span {
  flex: 1;
  font-weight: 600;
  color: #000;
  font-size: 0.9rem;
}

.clear-preview-btn {
  background: #ef4444;
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.input-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

#messageInput {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 24px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

#messageInput:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

#messageInput::placeholder {
  color: #999;
}

.send-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  border: none;
  border-radius: 50%;
  color: #000;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.send-btn:active {
  transform: scale(0.95);
}

/* System Message */
.system-message {
  text-align: center;
  color: #9ca3af;
  font-size: 0.85rem;
  padding: 0.5rem;
  margin: 1rem 0;
}

.loading {
  text-align: center;
  padding: 3rem;
  color: #FFD700;
  font-size: 1.2rem;
}

.no-messages {
  text-align: center;
  padding: 3rem;
  color: #999;
}

.no-messages i {
  font-size: 4rem;
  color: #FFD700;
  margin-bottom: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .nav-wrapper {
    display: none !important;
    width: 100%;
    order: 10;
    flex-basis: 100%;
  }

  .site-header.nav-open .nav-wrapper {
    display: block !important;
  }

  nav {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .messages-container {
    padding: 0 1rem;
  }

  .messages-header h1 {
    font-size: 2rem;
  }

  .design-preview {
    flex-direction: column;
    text-align: center;
  }
}

/* ========== LIGHT THEME SUPPORT ========== */

/* Light theme body */
[data-theme="light"] body {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
  background-attachment: fixed;
  color: #1a1a1a;
}

/* Light theme header */
[data-theme="light"] .site-header {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-bottom-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .main-nav a {
  color: #374151 !important;
}

[data-theme="light"] .main-nav a:hover {
  background-color: #f97316 !important;
  color: #ffffff !important;
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

[data-theme="light"] .main-nav a.active {
  color: #f97316 !important;
}

/* Light theme dropdown menu */
[data-theme="light"] .dropdown-menu {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .dropdown-menu li a {
  color: #374151 !important;
}

[data-theme="light"] .dropdown-menu li a:hover {
  background: #f3f4f6 !important;
  color: #f97316 !important;
}

[data-theme="light"] .dropdown-menu li a i {
  color: #f97316 !important;
}

/* Light theme chat container */
[data-theme="light"] .chat-container {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}

/* Light theme chat header */
[data-theme="light"] .chat-header {
  background: #f8fafc !important;
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .chat-avatar {
  border-color: #f97316 !important;
}

[data-theme="light"] .chat-header-info h3 {
  color: #f97316 !important;
}

[data-theme="light"] .chat-header-info p {
  color: #6b7280 !important;
}

/* Light theme messages window */
[data-theme="light"] .messages-window {
  background: #f9fafb !important;
}

/* Light theme message bubbles */
[data-theme="light"] .message-bubble.user {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #ffffff !important;
}

[data-theme="light"] .message-bubble.admin {
  background: #ffffff !important;
  color: #1a1a1a !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .message-time {
  color: #6b7280 !important;
}

[data-theme="light"] .message-bubble.user .message-time {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Light theme message input */
[data-theme="light"] .message-input-container {
  background: #ffffff !important;
  border-top-color: rgba(249, 115, 22, 0.3) !important;
}

[data-theme="light"] #messageInput {
  background: #f9fafb !important;
  color: #1a1a1a !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
}

[data-theme="light"] #messageInput:focus {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2) !important;
  background: #ffffff !important;
}

[data-theme="light"] #messageInput::placeholder {
  color: #9ca3af !important;
}

[data-theme="light"] .send-btn {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #ffffff !important;
}

[data-theme="light"] .send-btn:hover {
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4) !important;
}

/* Light theme design preview */
[data-theme="light"] .design-preview-compact {
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb;
}

[data-theme="light"] .design-preview-compact span {
  color: #1a1a1a !important;
}

/* Light theme system messages */
[data-theme="light"] .system-message {
  color: #6b7280 !important;
}

[data-theme="light"] .loading {
  color: #f97316 !important;
}

[data-theme="light"] .no-messages {
  color: #6b7280 !important;
}

[data-theme="light"] .no-messages i {
  color: #f97316 !important;
}

/* Light theme search input */
[data-theme="light"] #search-input {
  background: #f9fafb !important;
  color: #1a1a1a !important;
  border-color: #d1d5db !important;
}

[data-theme="light"] #search-input:focus {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2) !important;
}

[data-theme="light"] #search-input::placeholder {
  color: #9ca3af !important;
}

[data-theme="light"] .search-icon {
  color: #6b7280 !important;
}

/* Search suggestions */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #191919 0%, #2d2d2d 100%);
  border: 2px solid #FFD700;
  border-radius: 12px;
  margin-top: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: none;
}

.search-suggestions.active {
  display: block;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #FFD700;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

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

.suggestion-item:hover {
  background: rgba(255, 215, 0, 0.1);
  padding-left: 1.25rem;
}

.suggestion-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.suggestion-item .suggestion-text {
  flex: 1;
}

.suggestion-item .suggestion-category {
  font-size: 0.75rem;
  color: #aaa;
  background: rgba(255, 215, 0, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.no-results {
  padding: 1rem;
  text-align: center;
  color: #999;
  font-style: italic;
}

/* Light theme search suggestions */
[data-theme="light"] .search-suggestions {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .suggestion-item {
  color: #374151 !important;
  border-bottom-color: #f0f0f0 !important;
}

[data-theme="light"] .suggestion-item:hover {
  background: #f8f8f8 !important;
  color: #f97316 !important;
}

[data-theme="light"] .suggestion-item i {
  color: #f97316 !important;
}

[data-theme="light"] .suggestion-category {
  color: #6b7280 !important;
  background: rgba(249, 115, 22, 0.1) !important;
}

[data-theme="light"] .no-results {
  color: #6b7280 !important;
}

/* Profile dropdown positioning fix */
.profile-dropdown-container {
  position: relative;
  min-width: 0;
  flex-shrink: 0;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  border: none;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  white-space: nowrap;
  min-width: 120px;
}

.profile-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 2px solid #FFD700;
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
  
  /* Prevent dropdown from going off-screen */
  max-width: calc(100vw - 4rem);
}

.profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.profile-dropdown-item:hover {
  background: rgba(255, 215, 0, 0.1);
  padding-left: 1.5rem;
}

.profile-dropdown-item i {
  color: #FFD700;
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.profile-dropdown-divider {
  height: 1px;
  background: rgba(255, 215, 0, 0.2);
  margin: 0.5rem 0;
}

.profile-dropdown-item.logout-item {
  color: #ef4444;
}

.profile-dropdown-item.logout-item i {
  color: #ef4444;
}

.profile-dropdown-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Light theme profile dropdown */
[data-theme="light"] .profile-btn {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #ffffff !important;
}

[data-theme="light"] .profile-dropdown {
  background: #ffffff !important;
  border-color: #f97316 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .profile-dropdown-item {
  color: #1a1a1a !important;
}

[data-theme="light"] .profile-dropdown-item:hover {
  background: rgba(249, 115, 22, 0.1) !important;
}

[data-theme="light"] .profile-dropdown-item i {
  color: #f97316 !important;
}

/* Responsive adjustments for profile dropdown */
@media (max-width: 1024px) {
  .profile-dropdown {
    right: -1rem;
    min-width: 180px;
  }
}

@media (max-width: 768px) {
  .profile-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: 100px;
  }
  
  .profile-dropdown {
    right: -1.5rem;
    min-width: 160px;
  }
}

@media (max-width: 480px) {
  .profile-dropdown {
    right: -2rem;
    min-width: 140px;
  }
}

/* Light theme theme toggle */
[data-theme="light"] .theme-toggle {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .theme-toggle:hover {
  border-color: #f97316 !important;
  background: #fef3c7 !important;
}

[data-theme="light"] .theme-toggle i {
  color: #f97316 !important;
}

/* Mobile Responsive - Messages Nav */
@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }

  .header-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo img {
    height: 50px;
  }

  .nav-wrapper {
    display: none !important;
    width: 100%;
    order: 10;
    flex-basis: 100%;
  }

  .site-header.nav-open .nav-wrapper {
    display: block !important;
  }

  .main-nav {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 !important;
    list-style: none;
  }

  .search-wrapper {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
  }

  #search-input {
    width: 100%;
  }

  .header-actions {
    order: 2;
    gap: 0.5rem;
    margin-left: auto;
  }

  .user-indicator span {
    display: none;
  }

  .logout-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  .messages-container {
    height: calc(100vh - 100px);
  }
}


