/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: rgb(242, 241, 237);
  background-color: rgb(29, 29, 29);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(29, 29, 29);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.loading-screen.show {
  opacity: 1;
}

.loading-logo {
  max-width: 250px;
  width: 75%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.loading-logo.show {
  opacity: 1;
}

.main-content {
  opacity: 0;
  transition: opacity 0.5s ease-in;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content.show {
  opacity: 1;
}

/* Container for centring and max-width */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header Styles */
header {
  height: 70px;
  border-bottom: 1px solid rgb(65, 65, 65);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: rgb(29, 29, 29);
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.8rem;
  color: rgb(242, 241, 237);
}

/* Logo Styles */
.logo__mobile {
  height: auto;
  width: 110px;
  max-height: 50px;
  display: none;
  flex: 0 0 auto;
}

.logo__desktop {
  height: auto;
  width: 110px;
  max-height: 50px;
  display: block;
  flex: 0 0 auto;
}

/* Burger Menu */
.burger-menu {
  display: none; /* Hidden by default, only show on mobile */
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  padding: 5px;
}

.burger-menu span {
  width: 25px;
  height: 3px;
  background-color: rgb(242, 241, 237);
  border-radius: 2px;
}

.burger-menu:hover span {
  background-color: rgb(255, 255, 255);
}

/* Header Right Section */
.header-right {
  flex: 0 0 auto;
  min-width: 100px; /* Same approximate width as logo to balance layout */
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Glass Icon */
.glass-icon {
  height: auto;
  width: auto;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.glass-icon:hover {
  opacity: 0.8;
}

/* Profile Menu */
.profile-menu {
  position: relative;
}
.profile-menu a {
  text-decoration: none;
}

.profile-icon {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgb(60, 60, 60);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: rgb(242, 241, 237);
  transition: background-color 0.3s ease;
}

.profile-avatar:hover {
  background-color: rgb(80, 80, 80);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: rgb(247, 63, 13);
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  line-height: 20px;
  text-align: center;
}

/* Profile Dropdown */
.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: rgb(40, 40, 40);
  border: 1px solid rgb(65, 65, 65);
  border-radius: 8px;
  min-width: 160px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  margin-top: 10px;
}

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

.profile-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.profile-dropdown li {
  margin: 0;
}

.profile-dropdown a {
  display: block;
  padding: 12px 16px;
  color: rgb(242, 241, 237);
  text-decoration: none;
  transition: background-color 0.3s ease;
  font-size: 14px;
}

.profile-dropdown a:hover {
  background-color: rgb(60, 60, 60);
  color: rgb(255, 255, 255);
}

/* Search Dropdown */
.search-menu {
  position: relative;
  margin-right: 15px;
}

.glass-icon {
  cursor: pointer;
  width: 24px;
  height: 24px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  margin-top: 6px;
}

.glass-icon:hover {
  opacity: 1;
}

.search-dropdown {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(29, 29, 29);
  border: 1px solid rgb(65, 65, 65);
  border-radius: 0;
  width: 100%;
  height: 100vh;
  max-width: none;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

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

.search-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgb(65, 65, 65);
  background-color: rgb(29, 29, 29);
  border-radius: 0;
  max-width: 1000px;
  margin: auto;
  position: sticky;
  top: 0;
  z-index: 10;
}

.search-dropdown-header h3 {
  color: rgb(242, 241, 237);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.search-dropdown-body {
  padding: 0 0 20px 0;
  max-width: 1000px;
  margin: 0 auto;
  min-height: calc(100vh - 70px - 60px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.search-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgb(65, 65, 65);
}

.search-section:last-child {
  border-bottom: none;
  padding-bottom: 40px;
}

.search-section h4 {
  color: rgb(242, 241, 237);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

/* Expandable area options */
.expandable-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.expandable-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: rgb(242, 241, 237);
  font-size: 14px;
}

.expand-btn {
  background: none;
  border: 1px solid rgb(65, 65, 65);
  color: rgb(242, 241, 237);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expand-btn:hover {
  background-color: rgb(60, 60, 60);
}

/* Expandable content */
.expandable-content {
  display: none;
  overflow: hidden;
  margin-left: 16px;
  padding: 8px 0;
}

.expandable-content.expanded {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}

.county-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.county-item {
  padding: 6px 10px;
  color: rgb(180, 180, 180);
  font-size: 13px;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.2s ease;
}

.county-item:hover {
  background-color: rgb(50, 50, 50);
  color: rgb(242, 241, 237);
}

.county-item.active,
.county-item.selected {
  background-color: rgb(249, 237, 219);
  color: rgb(29, 29, 29);
  font-weight: 500;
}

/* County searchable dropdown */
.county-search-container {
  position: relative;
  margin-bottom: 12px;
}

.county-search-input {
  width: 100%;
  padding: 10px 12px;
  background-color: rgb(50, 50, 50);
  border: 1px solid rgb(65, 65, 65);
  border-radius: 4px;
  color: rgb(242, 241, 237);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.county-search-input:focus {
  border-color: rgb(70, 130, 180);
}

.county-search-input::placeholder {
  color: rgb(150, 150, 150);
}

.county-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background-color: rgb(40, 40, 40);
  border: 1px solid rgb(65, 65, 65);
  border-radius: 4px;
  margin-top: 4px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.county-dropdown-list::-webkit-scrollbar {
  width: 8px;
}

.county-dropdown-list::-webkit-scrollbar-track {
  background: rgb(30, 30, 30);
  border-radius: 4px;
}

.county-dropdown-list::-webkit-scrollbar-thumb {
  background: rgb(70, 70, 70);
  border-radius: 4px;
}

.county-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: rgb(90, 90, 90);
}

.county-dropdown-item {
  padding: 10px 12px;
  color: rgb(180, 180, 180);
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.county-dropdown-item:hover {
  background-color: rgb(50, 50, 50);
  color: rgb(242, 241, 237);
}

.county-dropdown-item .county-region {
  font-size: 11px;
  color: rgb(130, 130, 130);
  margin-left: 8px;
}

.county-dropdown-item.selected {
  background-color: rgb(60, 90, 120);
  color: rgb(242, 241, 237);
}

.county-dropdown-no-results {
  padding: 16px 12px;
  color: rgb(150, 150, 150);
  font-size: 13px;
  text-align: center;
}

/* Selected county chips */
.selected-counties-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  min-height: 20px;
}

.county-chip {
  background-color: rgb(70, 71, 67);
  color: rgb(194, 195, 193);
  padding: 6px 10px 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.county-chip:hover {
  background-color: rgb(80, 80, 80);
}

.county-chip .remove-btn {
  background: none;
  border: none;
  color: rgb(194, 195, 193);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.county-chip .remove-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgb(255, 255, 255);
}

/* Postcode input */
.postcode-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.postcode-group label {
  color: rgb(242, 241, 237);
  font-size: 14px;
  min-width: 80px;
}

.postcode-input {
  flex: 1;
  padding: 8px 12px;
  background-color: rgb(50, 50, 50);
  border: 1px solid rgb(65, 65, 65);
  border-radius: 4px;
  color: rgb(242, 241, 237);
  font-size: 14px;
  outline: none;
}

.postcode-input:focus {
  border-color: rgb(70, 130, 180);
}

/* Range options for postcode */
.range-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.range-group label {
  color: rgb(242, 241, 237);
  font-size: 14px;
  min-width: 80px;
}

.range-buttons {
  display: flex;
  gap: 8px;
  flex: 1;
}

.range-btn {
  flex: 1;
  padding: 8px 16px;
  background-color: rgb(70, 71, 67);
  color: rgb(194, 195, 193);
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.range-btn:hover {
  background-color: rgb(80, 80, 80);
}

.range-btn.active {
  background-color: rgb(249, 237, 219);
  color: rgb(50, 50, 50);
  font-weight: 500;
}

/* Timeframe buttons */
.timeframe-buttons {
  display: flex;
  gap: 0;
  margin: 12px 0;
}

.timeframe-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  color: rgb(242, 241, 237);
  border: 1px solid rgb(65, 65, 65);
  background-color: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
}

.timeframe-btn:first-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.timeframe-btn:last-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.timeframe-btn:not(:first-child) {
  border-left: none;
}

.timeframe-btn:hover {
  background-color: rgb(50, 50, 50);
}

.timeframe-btn.active {
  background-color: rgb(60, 60, 60);
}

/* Keywords */
.keyword-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.keyword-category {
  /* border: 1px solid rgb(65, 65, 65);
  border-radius: 6px;
  background-color: rgb(50, 50, 50); */
}

.keyword-category:not(.expanded) .keyword-tags {
  display: none;
}

.keyword-category.expanded .keyword-tags {
  display: flex;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  color: rgb(242, 241, 237);
  font-size: 14px;
  font-weight: 500;
}

.keyword-tags {
  padding: 0 16px 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-tag {
  background-color: rgb(70, 71, 67);
  color: rgb(194, 195, 193);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.keyword-tag:hover {
  background-color: rgb(80, 80, 80);
  transform: translateY(-1px);
}

.keyword-tag.selected {
  background-color: rgb(70, 130, 180);
  color: rgb(255, 255, 255);
  font-weight: 500;
  transform: translateY(-1px);
}

/* Action buttons container */
.search-action-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

/* Bottom apply button */
.apply-btn-bottom {
  padding: 12px 24px;
  border-radius: 2px;
  font-size: 16px;
  /* font-weight: 600; */
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  min-width: 120px;
  background-color: rgb(249, 237, 219);
  color: rgb(29, 29, 29);
}

.apply-btn-bottom:hover {
  background-color: rgb(255, 255, 255);
  box-shadow: 0 4px 12px rgba(249, 237, 219, 0.1);
}

/* Bottom clear button */
.clear-btn-bottom {
  padding: 12px 24px;
  border-radius: 2px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgb(200, 200, 200);
  min-width: 120px;
  background-color: transparent;
  color: rgb(100, 100, 100);
}

.clear-btn-bottom:hover {
  background-color: rgb(245, 245, 245);
  border-color: rgb(180, 180, 180);
  color: rgb(29, 29, 29);
}

/* Navigation Styles */
nav {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

/* When nav is active (mobile menu open) */
nav.active ul {
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  background-color: rgb(29, 29, 29);
  border-top: 1px solid rgb(65, 65, 65);
  border-bottom: 1px solid rgb(65, 65, 65);
  flex-direction: column;
  gap: 0;
  padding: 20px 0;
  margin: 0;
  z-index: 999;
}

nav.active ul li {
  text-align: center;
}

nav.active ul li a {
  padding: 15px 20px;
  display: block;
}

nav a {
  color: rgb(242, 241, 237);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: bold;
}

nav a:hover {
  color: rgb(255, 255, 255);
}

nav a.active {
  color: rgb(249, 237, 219);
  position: relative;
}

/* nav a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: rgb(249, 237, 219);
} */

/* Main Content */
main {
  flex: 1;
  padding: 40px 0;
}

/* Leaderboard Styles */
.leaderboard {
  max-width: 1000px;
  width: 100%;
}

.leaderboard-header {
  position: relative;
  /* height: 150px; */
  border-radius: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
}

.leaderboard-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to bottom, rgb(29, 29, 29) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.leaderboard-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to top, rgb(29, 29, 29) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.leaderboard-header .header-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
}

.leaderboard-header h1 {
  color: rgb(242, 241, 237);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.leaderboard-header p {
  color: rgb(242, 241, 237);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
}

.leaderboard-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 20px;
}

.control-group {
  display: contents;
}

.control-item {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-height: 80px;
  text-align: center;
  border: 1px solid rgb(65, 65, 65);
}

.control-item:first-child {
  border-right: none;
}

.control-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-icon {
  color: rgb(242, 241, 237);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.control-label {
  color: rgb(160, 160, 160);
  font-size: 0.9rem;
}

.control-value {
  color: rgb(242, 241, 237);
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
}

.ranking-section {
  max-width: 800px;
  margin: 0 auto;
  /* max-width: 1000px;
  margin-bottom: 40px;
  padding: 0 20px; */
  width: 100%;
}

.leader-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: rgb(242, 241, 237);
  margin-bottom: 8px;
  text-align: center;
}

.ranking-title {
  font-size: 1rem;
  font-weight: 400;
  color: rgb(242, 241, 237);
  margin-bottom: 4px;
  text-align: right;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ranking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  transition: background-color 0.2s ease;
  border-left: 1px solid rgb(249, 237, 219);
}

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

.ranking-item:nth-child(1) {
  background-color: rgb(90, 85, 79);
}

.ranking-item:nth-child(2) {
  background-color: rgb(72, 68, 64);
}

.ranking-item:nth-child(3) {
  background-color: rgb(53, 51, 49);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgb(60, 60, 60);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgb(242, 241, 237);
}

.user-avatar.has-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent; /* Hide any text when showing photo */
}

.user-avatar.placeholder {
  background-color: rgb(45, 45, 45);
  color: rgb(120, 120, 120);
}

.user-details {
  flex: 1;
}

.user-details h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgb(255, 255, 255);
  margin: 0 0 2px 0;
  line-height: 1.3;
}

.user-details p {
  font-size: 0.8rem;
  color: rgb(242, 241, 237);
  margin: 0;
  line-height: 1.2;
}

.ranking-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(249, 237, 219);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgb(45, 45, 45);
}

/* Notification Styles */
.notification-item {
  cursor: pointer;
}

.notification-item.unread {
  background-color: rgba(247, 63, 13, 0.1);
  border-left: 3px solid rgb(247, 63, 13);
}

.notification-info {
  gap: 14px;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon.achievement {
  background-color: rgba(34, 197, 94, 0.2);
  color: rgb(34, 197, 94);
}

.notification-icon.message {
  background-color: rgba(59, 130, 246, 0.2);
  color: rgb(59, 130, 246);
}

.notification-icon.ranking {
  background-color: rgba(249, 237, 219, 0.2);
  color: rgb(249, 237, 219);
}

.notification-icon.system {
  background-color: rgba(156, 163, 175, 0.2);
  color: rgb(156, 163, 175);
}

.notification-icon.social {
  background-color: rgba(168, 85, 247, 0.2);
  color: rgb(168, 85, 247);
}

.notification-icon.payment {
  background-color: rgba(16, 185, 129, 0.2);
  color: rgb(16, 185, 129);
}

.notification-details h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgb(242, 241, 237);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.notification-details p {
  font-size: 0.85rem;
  color: rgb(160, 160, 160);
  margin: 0 0 4px 0;
  line-height: 1.4;
}

.notification-time {
  font-size: 0.75rem;
  color: rgb(120, 120, 120);
  font-style: italic;
}

.notification-status {
  position: relative;
}

.unread-dot {
  width: 8px;
  height: 8px;
  background-color: rgb(247, 63, 13);
  border-radius: 50%;
  position: absolute;
  top: -2px;
  right: -2px;
}

/* Footer Styles */
footer {
  background-color: rgb(20, 20, 20);
  padding: 30px 0;
  border-top: 1px solid rgb(65, 65, 65);
  margin-top: auto;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  color: rgb(242, 241, 237);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: rgb(242, 241, 237);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: rgb(255, 255, 255);
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
  nav.active ul {
    position: static;
    background-color: transparent;
    border: none;
    flex-direction: row;
    gap: 30px;
    padding: 0;
    margin: 0;
  }

  nav.active ul li {
    border-bottom: none;
  }

  nav.active ul li a {
    padding: 0;
    display: inline;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 0 0;
    padding: 0 0;
  }

  .burger-menu {
    display: flex;
  }

  header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 70px;
  }

  header {
    height: 70px;
    padding: 0;
  }

  .logo__mobile {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-height: 40px;
    margin-top: -7px;
  }

  .logo__desktop {
    display: none;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgb(29, 29, 29);
    border-top: 1px solid rgb(65, 65, 65);
    z-index: 999;
  }

  nav.active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 20px 0;
  }

  nav ul li {
    text-align: center;
    border-bottom: 1px solid rgb(45, 45, 45);
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav ul li a {
    padding: 15px 20px;
    display: block;
  }

  nav a.active::after {
    display: none;
  }

  .header-right {
    flex: 0 0 auto;
    gap: 15px;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero {
    padding: 40px 0;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Leaderboard Mobile Styles */
  .leaderboard {
    max-width: none;
    padding: 0 15px;
  }

  .leaderboard-header {
    /* height: 150px; */
    padding: 10px;
  }

  .leaderboard-header h1 {
    font-size: 24px;
  }

  .leaderboard-header p {
    font-size: 14px;
  }

  .leaderboard-controls {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .control-item {
    padding: 18px;
    min-height: 70px;
  }

  .control-item:first-child {
    border-right: 1px solid rgb(65, 65, 65);
  }

  .ranking-item {
    padding: 12px;
  }

  .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.8rem;
  }

  .user-details h3 {
    font-size: 0.9rem;
  }

  .user-details p {
    font-size: 0.75rem;
  }

  .ranking-number {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  footer .container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    padding-bottom: 20px;
  }

  .footer-links {
    gap: 15px;
    flex-direction: column;
  }

  footer {
    padding: 25px 0 30px 0;
  }

  /* Search dropdown mobile fixes */
  .search-dropdown {
    height: calc(100vh - 70px);
    overflow: hidden;
  }

  .search-dropdown-body {
    height: calc(100vh - 70px - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 60px;
  }

  .search-section:last-child {
    padding-bottom: 80px;
  }

  .search-action-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .apply-btn-bottom,
  .clear-btn-bottom {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .content-item {
    padding: 20px;
  }

  /* Loading Screen Phone Styles */
  .loading-logo {
    width: 50%;
    max-width: 175px;
    transform: translateY(-250%);
  }

  /* Leaderboard Small Mobile Styles */
  .leaderboard {
    padding: 0 0;
  }

  .leaderboard-header {
    /* height: 100px; */
    padding: 10px;
  }

  .leaderboard-header h1 {
    font-size: 20px;
  }

  .leaderboard-header p {
    font-size: 12px;
  }

  .control-item {
    padding: 16px;
    min-height: 60px;
  }

  .ranking-item {
    padding: 12px;
  }

  .user-info {
    gap: 10px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }

  .user-details h3 {
    font-size: 0.85rem;
  }

  .user-details p {
    font-size: 0.7rem;
  }

  .ranking-number {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
  }
}

/* Dropdown Styles */
.leaderboard-controls {
  position: relative;
}

.dropdown-trigger {
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background-color: rgb(29, 29, 29);
  border: 1px solid rgb(65, 65, 65);
  border-top: none;
  border-radius: 0;
  width: 50%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-top: 0;
}

#timeline-dropdown,
#settings-dropdown {
  left: 50%;
}

.dropdown-menu.show {
  display: block !important;
  opacity: 1;
  visibility: visible;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgb(65, 65, 65);
}

.dropdown-header h3 {
  color: rgb(242, 241, 237);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.dropdown-close {
  color: rgb(180, 180, 180);
  font-size: 20px;
  font-weight: normal;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
  padding: 0 4px;
}

.dropdown-close:hover {
  color: rgb(255, 255, 255);
}

.dropdown-body {
  padding: 20px 0;
}

.area-options {
  margin-bottom: 20px;
}

.area-option {
  display: flex;
  align-items: center;
  padding: 14px 26px;
  color: rgb(242, 241, 237);
  cursor: pointer;
  transition: all 0.3s ease;
}

.area-option:last-child {
  margin-bottom: 0;
}

.area-option:hover {
  background-color: rgb(60, 60, 60);
  border-color: rgb(80, 80, 80);
}

.area-option.active {
  background-color: rgb(90, 85, 79);
  border-color: rgb(90, 85, 79);
  color: rgb(255, 255, 255);
}

.area-option span {
  font-size: 14px;
  font-weight: 500;
}

/* Timeline Options */
.timeline-options {
  padding: 0 20px;
}

.timeline-option {
  display: flex;
  align-items: center;
  padding: 14px 26px;
  color: rgb(242, 241, 237);
  border: 1px solid rgb(65, 65, 65);
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin: 0 0 10px 0;
  box-sizing: border-box;
}

.timeline-option:hover {
  background-color: rgb(50, 50, 50);
}

.timeline-option.active {
  background-color: rgb(60, 60, 60);
}

.timeline-option span {
  font-size: 14px;
  font-weight: 500;
}

/* Settings within timeline-option */
.timeline-option .setting-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgb(242, 241, 237);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  padding: 4px 0;
  /* Ensure touch targets are large enough on mobile */
  min-height: 44px;
}

.timeline-option .setting-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: rgb(249, 237, 219);
  flex-shrink: 0;
  /* Improve touch target on mobile */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.timeline-option:has(.setting-checkbox) {
  cursor: pointer;
  /* Prevent text selection on mobile */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.timeline-option:hover .setting-label {
  color: rgb(255, 255, 255);
}

/* Active state for mobile touch feedback */
.timeline-option:active {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Mark all as read button in postcode section */
.postcode-section .mark-all-read-btn,
.postcode-section .save-settings-btn {
  width: 100%;
  padding: 12px 24px;
  border-radius: 2px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background-color: rgb(249, 237, 219);
  color: rgb(29, 29, 29);
  font-weight: 500;
}

.postcode-section .mark-all-read-btn:hover,
.postcode-section .save-settings-btn:hover {
  background-color: rgb(255, 255, 255);
  box-shadow: 0 4px 12px rgba(249, 237, 219, 0.1);
}

/* Filter Options */
.filter-options {
  padding: 0 20px;
}

.filter-option {
  display: flex;
  align-items: center;
  padding: 14px 26px;
  color: rgb(242, 241, 237);
  border: 1px solid rgb(65, 65, 65);
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin: 0 0 10px 0;
  box-sizing: border-box;
}

.filter-option:hover {
  background-color: rgb(50, 50, 50);
}

.filter-option.active {
  background-color: rgb(60, 60, 60);
}

.filter-option span {
  font-size: 14px;
  font-weight: 500;
}

/* Dropdown Actions */
.dropdown-actions {
  padding: 20px 20px 0 20px;
  border-top: 1px solid rgb(65, 65, 65);
  margin-top: 20px;
}

.mark-all-read-btn,
.save-settings-btn {
  width: 100%;
  padding: 12px 24px;
  background-color: rgb(249, 237, 219);
  color: rgb(29, 29, 29);
  border: none;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mark-all-read-btn:hover,
.save-settings-btn:hover {
  background-color: rgb(255, 255, 255);
  box-shadow: 0 4px 12px rgba(249, 237, 219, 0.1);
}

/* Settings Section */
.settings-section {
  padding: 0 20px;
  margin-bottom: 20px;
}

.settings-section h4 {
  color: rgb(242, 241, 237);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  padding: 0 6px;
}

.setting-item {
  padding: 10px 6px;
}

.setting-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgb(242, 241, 237);
  font-size: 14px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* Ensure adequate touch targets on mobile */
  min-height: 44px;
  padding: 4px 0;
}

.setting-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: rgb(249, 237, 219);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.setting-label:hover {
  color: rgb(255, 255, 255);
}

.postcode-section {
  border-top: 1px solid rgb(65, 65, 65);
  padding-top: 20px;
  padding: 20px 20px 0 20px;
}

.postcode-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.postcode-input-group label {
  color: rgb(242, 241, 237);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

.postcode-input-group input {
  flex: 1;
  padding: 10px 12px;
  background-color: rgb(50, 50, 50);
  border: 1px solid rgb(65, 65, 65);
  border-radius: 2px;
  color: rgb(242, 241, 237);
  font-size: 13px;
  transition: all 0.3s ease;
}

.postcode-input-group input:focus {
  outline: none;
  border-color: rgb(249, 237, 219);
  box-shadow: 0 0 0 2px rgba(247, 63, 13, 0.1);
}

.postcode-input-group input::placeholder {
  color: rgb(120, 120, 120);
}

.apply-btn {
  padding: 10px 16px;
  background-color: rgb(249, 237, 219);
  color: rgb(29, 29, 29);
  border: none;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.apply-btn:hover {
  background-color: rgb(255, 255, 255);
  box-shadow: 0 2px 8px rgba(249, 237, 219, 0.3);
}

.apply-btn:active {
  transform: translateY(1px);
}

/* Mobile Dropdown Styles */
@media (max-width: 768px) {
  .dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
  }

  #timeline-dropdown,
  #settings-dropdown {
    left: 0;
  }
}

@media (max-width: 480px) {
  .dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
  }

  #timeline-dropdown,
  #settings-dropdown {
    left: 0;
  }

  .dropdown-header {
    padding: 14px 16px;
  }

  .dropdown-header h3 {
    font-size: 14px;
  }

  .dropdown-body {
    padding: 16px;
  }

  .postcode-input-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .postcode-input-group label {
    align-self: flex-start;
  }

  .apply-btn {
    align-self: flex-end;
    padding: 10px 20px;
  }
}

/* Message Container Styles */
#message-container {
  margin: 15px 0;
}

#message-container .error-message {
  background-color: rgba(244, 67, 54, 0.1);
  border: 1px solid rgb(244, 67, 54);
  color: rgb(239, 154, 154);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

#message-container .success-message {
  background-color: rgba(76, 175, 80, 0.1);
  border: 1px solid rgb(76, 175, 80);
  color: rgb(129, 199, 132);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

#message-container ul {
  margin: 5px 0 0 15px;
  padding: 0;
}

#message-container li {
  margin: 2px 0;
}

/* Password hint styling */
.password-hint {
  color: #666;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Loading button states */
.login-btn:disabled,
.create-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Guest profile menu styling */
.guest-profile {
  cursor: pointer;
}

.guest-profile .profile-avatar {
  background-color: #f5f5f5;
  color: #666;
  border: 2px solid #ddd;
}

.guest-profile:hover .profile-avatar {
  background-color: #e0e0e0;
  border-color: #ccc;
}

.guest-profile .profile-avatar svg {
  width: 16px;
  height: 16px;
}

/* Profile picture styling */
.profile-avatar.profile-picture {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent; /* Hide any text content */
}

/* Upload Message Box Styles */
.upload-message-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin-top: 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.upload-message-box .upload-message-text {
  flex: 1;
}

.upload-message-box .upload-message-close {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 0 0 0 10px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.upload-message-box .upload-message-close:hover {
  opacity: 1;
}

/* Success message - green */
.upload-message-success {
  background-color: rgba(40, 167, 69, 0.15);
  color: #5dd879;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.upload-message-success .upload-message-close {
  color: #5dd879;
}

/* Error message - red */
.upload-message-error {
  background-color: rgba(220, 53, 69, 0.15);
  color: #ff6b7a;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.upload-message-error .upload-message-close {
  color: #ff6b7a;
}

/* Progress message - amber/yellow */
.upload-message-progress {
  background-color: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}
