@font-face {
    font-family: "Noto Emoji";
    src: url("NotoEmoji-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.noto-emoji {
    font-family: "Noto Emoji", sans-serif;
}

.view-toggle-icon-svg {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.view-tabs {
    display: flex;
    gap: 4px;
    background: #152a40;
    border-radius: 6px;
    padding: 2px;
}

.view-tab {
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #7a8ba6;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.view-tab:hover {
    background: #1a3350;
    color: #d4d9e4;
}

.view-tab.active {
    background: #1a5276;
    color: #fff;
}

/* User bubble in header */
 .user-bubble {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     background: #1a5276;
     color: #fff;
     padding: 6px 12px;
     border: 1px solid transparent;
     border-radius: 20px;
     font-size: 0.85rem;
     margin-left: 12px;
     position: relative;
     font-family: inherit;
     cursor: pointer;
     transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
 }

 .user-bubble:hover {
     background: #21618c;
 }

 .user-bubble:focus {
     outline: none;
     box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.5);
 }

 .user-bubble:focus-visible {
     box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.5);
 }

 .user-bubble[aria-expanded="true"] {
     background: #21618c;
     border-color: rgba(74, 144, 217, 0.6);
 }

 .user-menu-btn {
     background: transparent;
     border: none;
     color: #fff;
     cursor: pointer;
     padding: 2px 4px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 0.7rem;
     line-height: 1;
 }

 .user-menu-btn:hover {
     color: #d4d9e4;
 }

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    min-width: 160px;
    z-index: 100;
    overflow: hidden;
}

.user-dropdown.hidden {
    display: none;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    text-align: left;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.user-dropdown-item:hover {
    background: #f0f4f8;
}

.dropdown-icon {
    font-size: 0.85rem;
    color: #555;
}

/* Time filter in header */
#filter-time-map {
    margin-left: 12px;
    min-width: 120px;
}

#filter-time-map .custom-select-trigger {
    padding: 6px 12px;
    background: #152a40;
    border-radius: 6px;
    color: #7a8ba6;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#filter-time-map .custom-select-trigger:hover {
    background: #1a3350;
    color: #d4d9e4;
}

#filter-time-map .custom-select-options {
    top: 100%;
    margin-top: 4px;
}

#user-name {
    font-weight: 500;
}

.logout-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.logout-btn:hover {
    opacity: 1;
}

/* Remove old view-toggle styles */
.view-toggle {
    display: none;
}

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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0b1a2e;
    color: #d4d9e4;
}

#app {
    max-width: 900px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #0f2238;
    padding: 12px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1000;
}

/* Burger menu button */
.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #152a40;
    border: 1px solid #1a3350;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.menu-btn:hover {
    background: #1a3350;
    border-color: #4a90d9;
}

.menu-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.3);
}

.menu-icon {
    font-size: 1.25rem;
    color: #d4d9e4;
    transition: transform 0.3s ease;
}

.menu-btn.open .menu-icon {
    transform: rotate(90deg);
}

/* Menu backdrop */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-backdrop.open {
    opacity: 1;
    visibility: visible;
}

/* Menu panel */
.menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: #0f2238;
    border-right: 1px solid #1a3350;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.menu-panel.open {
    transform: translateX(0);
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #1a3350;
}

.menu-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.menu-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #152a40;
    border: 1px solid #1a3350;
    border-radius: 6px;
    color: #d4d9e4;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.menu-close-btn:hover {
    background: #1a3350;
    border-color: #4a90d9;
}

.menu-content {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-section:last-child {
    margin-bottom: 0;
}

.menu-section h3 {
    margin: 0 0 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7a8ba6;
}

/* Custom selects inside menu */
.menu-panel .custom-select {
    width: 100%;
    min-width: 0;
}

.menu-panel .custom-select-trigger {
    width: 100%;
}

.menu-panel .filter-btn {
    width: 100%;
    text-align: left;
}

/* View tabs in menu */
.menu-panel .view-tabs {
    width: 100%;
}

.menu-panel .view-tab {
    flex: 1;
    text-align: center;
}

/* Ensure dropdowns work in menu */
.menu-panel .custom-select-options {
    z-index: 1300;
}

/* Remove the old filter-time-map styles */
#filter-time-map {
    display: none;
}

header h1 {
    font-family: "Story Script", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
}

#status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    margin-left: auto;
    position: relative;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#map {
    flex: 1;
    min-height: 300px;
    z-index: 1;
    position: relative;
}

/* Map control button (center on me) */
.map-control {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 35px;
    color: #333;
    font-weight: bold;
    transition: background 0.2s, box-shadow 0.2s;
}

.map-control:hover:not(:disabled) {
    background: #f0f0f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.map-control:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}



footer {
    padding: 8px 20px;
    background: #0f2238;
    text-align: center;
    font-size: 0.8rem;
    color: #4a5c73;
    border-top: 1px solid #152a40;
}

/* Status text in popups */
.status-text {
    margin-top: 4px;
    color: #d4d9e4;
    line-height: 1.3;
    word-wrap: break-word;
}

.status-time {
    color: #4a5c73;
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Tweet bubble on map */
.tweet-bubble {
    background: #152a40;
    border: 1px solid #1a3350;
    border-radius: 8px;
    padding: 8px 12px;
    max-width: 200px;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
}

.tweet-bubble .tweet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.tweet-bubble .tweet-user {
    font-weight: 600;
    color: #4a90d9;
}

.tweet-bubble .tweet-time {
    color: #4a5c73;
    font-size: 0.65rem;
}

.tweet-bubble .tweet-text {
    color: #d4d9e4;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Tweet bubble on map */
    display: none;
    align-items: center;
    gap: 8px;
    background: #0f2238;
    padding: 8px 12px;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.tweet-panel.open {
    display: flex;
    /* animation: slideUp 0.2s ease forwards; */
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#tweet-input {
    width: 240px;
    padding: 10px 16px;
    background: #152a40;
    border: 1px solid #1a3350;
    border-radius: 20px;
    color: #d4d9e4;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

#tweet-input:focus {
    border-color: #4a90d9;
}

#tweet-input::placeholder {
    color: #4a5c73;
}

#tweet-input:disabled {
    opacity: 0.5;
     cursor: not-allowed;
}

/* MarkerCluster dark theme */
.marker-cluster-small {
    background: rgba(0, 0, 0, 0);
}
.marker-cluster-small div {
    background: linear-gradient(135deg, #8b5cf6, #3e9cc0);
    color: #d4d9e4;
}

.marker-cluster-medium {
    background: rgba(0, 0, 0, 0);
}
.marker-cluster-medium div {
    background: linear-gradient(135deg, #8b5cf6, #3e9cc0);
    color: #d4d9e4;
}

.marker-cluster-large {
    background: rgba(0, 0, 0, 0);
}
.marker-cluster-large div {
    background: linear-gradient(135deg, #8b5cf6, #3e9cc0);
    color: #d4d9e4;
}

/* Leaflet overrides */
.leaflet-control-attribution {
    font-size: 10px !important;
}

.leaflet-container {
    background: #38435c;
}

@font-face {
    font-family: "Story Script";
    src: url("StoryScript-Regular.ttf");
}

.story-script-regular {
  font-family: "Story Script", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* Event markers */
.event-marker {
  background: transparent !important;
  border: none !important;
}

.event-marker-inner {
  width: 20px;
  height: 32px;
  position: relative;
}

.event-marker-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--marker-color-1, #8b5cf6), var(--marker-color-2, #3e9cc0));
  border-radius: 50% 50% 50% 0;
  box-shadow: var(--marker-shadow, 0 2px 8px rgba(139, 92, 246, 0.5));
}

.event-marker-icon {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(15deg);
  font-size: 16px;
  line-height: 1;
  z-index: 1;
  font-family: 'Noto Emoji', sans-serif;
  color: #fff;
}

/* Event popup */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.event-popup {
  min-width: 160px;
  max-width: 240px;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.2s ease;
}

.modal-content {
  position: relative;
  background: #0f2238;
  border: 1px solid #1a3350;
  border-radius: 12px;
  padding: 32px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

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

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-content h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: #fff;
  text-align: center;
}

.modal-content > p {
  margin: 0 0 24px;
  color: #7a8ba6;
  text-align: center;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: #d4d9e4;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: #152a40;
  border: 1px solid #1a3350;
  border-radius: 8px;
  color: #d4d9e4;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.form-group input::placeholder {
  color: #4a5c73;
}

.form-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid #e74c3c;
  border-radius: 6px;
  color: #e74c3c;
  font-size: 0.85rem;
  text-align: center;
}

.form-error.hidden {
  display: none;
}

.btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #1a5276;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #1f6b99;
}

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

.event-popup strong {
  color: #f39c12;
  font-size: 0.9rem;
}

.event-time {
  color: #7a8ba6;
  font-size: 0.75rem;
  margin-top: 2px;
  display: block;
}

.event-summary {
    margin-top: 2px;
    line-height: 1.3;
    display: block;
}

.event-location {
  color: #95a5a6;
  font-size: 0.7rem;
  margin-top: 2px;
  display: inline;
}

.event-distance {
  color: #95a5a6;
  font-size: 0.7rem;
  margin-left: 8px;
  font-weight: 600;
  display: inline;
}

.event-card-location-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.popup-list-link {
  margin-top: 8px;
  padding: 4px 8px;
  background: #1a5276;
  border: 1px solid #4a90d9;
  border-radius: 4px;
  color: #d4d9e4;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.popup-list-link:hover {
  background: #1f6b99;
}

.event-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.share-btn {
  flex: 0;
  margin-left: auto;
  padding: 6px 8px;
}

.event-card-btn {
  flex: 1;
  padding: 6px 12px;
  background: #152a40;
  border: 1px solid #1a3350;
  border-radius: 4px;
  color: #d4d9e4;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.filter-btn {
  padding: 8px 16px;
  background: #152a40;
  border: 1px solid #1a3350;
  border-radius: 6px;
  color: #d4d9e4;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.filter-btn:hover {
  background: #1f6b99;
  border-color: #4a90d9;
}

.filter-btn.active {
  background: #1f6b99;
  border-color: #4a90d9;
  color: #fff;
}

#sort-distance-btn {
  margin-left: auto;
}

.event-card-btn:hover {
  background: #1a3350;
  border-color: #4a90d9;
}

@keyframes highlightFade {
  0% {
    box-shadow: 0 0 0 2px #4a90d9;
  }
  100% {
    box-shadow: none;
  }
}

.event-card.highlight {
  animation: highlightFade 2s ease-out;
}

.event-card.selected {
  box-shadow: 0 0 0 3px #4a90d9, 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: rgba(74, 144, 217, 0.1);
  border-color: #4a90d9;
}

/* Location label overlay (always visible) */
.location-label-overlay {
    background: transparent;
    border: none;
    box-shadow: none;
}

.location-label-text {
    color: #d4d9e4;
    font-family: "Story Script", sans-serif;
    font-size: 14px;
    font-weight: bold;
    padding: 2px 6px;
    white-space: nowrap;
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

/* View Toggle Button */
.view-toggle {
    background: #1a3350;
    border: 1px solid #1a3350;
    border-radius: 6px;
    height: 36px;
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4d9e4;
    margin-left: 8px;
}

.view-toggle:hover {
    background: #1f6b99;
    border-color: #4a90d9;
}

/* List View */
.list-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0b1a2e;
    z-index: 999;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.list-view.hidden {
    display: none;
}

.list-header {
    padding: 20px;
    background: #0f2238;
    border-bottom: 1px solid #1a3350;
    position: sticky;
    top: 0;
    z-index: 10;
}

.list-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.events-list {
    padding: 20px;
    flex: 1;
}

.event-card {
    background: #0f2238;
    border: 1px solid #1a3350;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.event-card-image {
    margin: -16px -16px 12px -16px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    max-height: 200px;
}

.event-card-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 200px;
}

.event-card-distance-row {
  padding: 4px 0;
}

.event-card-distance {
  font-size: 0.9rem;
  color: #4a5c73;
  margin-top: 4px;
  font-weight: 500;
}

/* Mouse-over highlighting removed - use #event-ID in URL for manual highlighting */

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.event-card-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #d4d9e4;
    flex: 1;
}

.event-card-date {
    font-size: 0.85rem;
    color: #7a8ba6;
    white-space: nowrap;
    margin-left: 12px;
}

.event-card-location {
    font-size: 0.9rem;
    color: #4a5c73;
    margin-top: 4px;
    margin-right: 4px;
}

.event-card-gradient {
    height: 4px;
    border-radius: 2px;
    margin-bottom: 12px;
}

.no-events {
    text-align: center;
    color: #4a5c73;
    padding: 40px 20px;
    font-size: 1.1rem;
}

/* Map view hidden state */
#map.hidden {
    display: none;
}

/* Filters */
.filters {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: #0f2238;
    border-bottom: 1px solid #1a3350;
    flex-wrap: wrap;
}

.custom-select {
    flex: 1;
    min-width: 140px;
    position: relative;
}

.custom-select-trigger {
    padding: 8px 32px 8px 12px;
    background: #152a40;
    border: 1px solid #1a3350;
    border-radius: 6px;
    color: #d4d9e4;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.custom-select-trigger::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #7a8ba6;
    transition: transform 0.2s;
}

.custom-select.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-trigger:hover {
    border-color: #4a90d9;
}

.custom-select.open .custom-select-trigger {
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
    border-radius: 6px 6px 0 0;
}

.custom-select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #152a40;
    border: 1px solid #4a90d9;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.custom-select.open .custom-select-options {
    display: block;
}

.custom-option {
    padding: 8px 12px;
    color: #d4d9e4;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.custom-option:hover {
    background: #1a3350;
}

.custom-option.selected {
    background: #1a5276;
    color: #fff;
}

.custom-option.selected:hover {
    background: #1f6b99;
}

/* Login Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal.hidden {
    display: none;
}

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

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #0f2238;
    border: 1px solid #1a3350;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    margin: 0 0 8px;
    font-family: "Story Script", sans-serif;
    font-size: 1.8rem;
    color: #fff;
    text-align: center;
}

.modal-content > p {
    margin: 0 0 24px;
    color: #7a8ba6;
    text-align: center;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #d4d9e4;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: #152a40;
    border: 1px solid #1a3350;
    border-radius: 6px;
    color: 0 6px 6px 0;
    color: #d4d9e4;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .form-group input:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
  }

  .form-group input::placeholder {
    color: #4a5c73;
  }

  .password-input-wrapper {
    display: flex;
    position: relative;
  }

  .password-input-wrapper input {
    border-radius: 6px 0 0 6px;
    padding-right: 12px;
  }

  .toggle-password-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    padding: 0;
    background: #152a40;
    border: 1px solid #1a3350;
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: #7a8ba6;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
  }

  .toggle-password-btn:hover {
    background: #1a3350;
    color: #d4d9e4;
  }

  .toggle-password-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
  }

  .toggle-password-btn.password-visible {
    position: relative;
  }

  .toggle-password-btn.password-visible::after {
    content: "";
    position: absolute;
    top: 45%;
    left: 50%;
    width: 70%;
    height: 2px;
    background: #7a8ba6;
    transform: translate(-50%, -50%) rotate(-25deg);
    border-radius: 1px;
  }

  .toggle-password-btn.password-visible:hover::after {
    background: #d4d9e4;
  }

.form-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 12px;
    text-align: center;
    min-height: 1.2em;
}

.form-error.hidden {
    display: none;
}

.btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-primary {
    background: #1a5276;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #1f6b99;
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

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