@font-face {
  font-family: "Helvetica";
  src: url(../assets/fonts/HelveticaNowDisplay-Hairline.ttf);
  font-weight: 100;
}

@font-face {
  font-family: "Helvetica";
  src: url(../assets/fonts/HelveticaNowDisplay-Thin.ttf);
  font-weight: 200;
}

@font-face {
  font-family: "Helvetica";
  src: url(../assets/fonts/HelveticaNowDisplay-Light.ttf);
  font-weight: 300;
}

@font-face {
  font-family: "Helvetica";
  src: url(../assets/fonts/HelveticaNowDisplay-Regular.ttf);
  font-weight: 400;
}

@font-face {
  font-family: "Helvetica";
  src: url(../assets/fonts/HelveticaNowDisplay-Medium.ttf);
  font-weight: 500;
}

@font-face {
  font-family: "Helvetica";
  src: url(../assets/fonts/HelveticaNowDisplay-Bold.ttf);
  font-weight: 600;
}

@font-face {
  font-family: "Helvetica";
  src: url(../assets/fonts/HelveticaNowDisplay-ExtraBold.ttf);
  font-weight: 700;
}

@font-face {
  font-family: "Helvetica";
  src: url(../assets/fonts/HelveticaNowDisplay-Black.ttf);
  font-weight: 800;
}

@font-face {
  font-family: "Helvetica";
  src: url(../assets/fonts/HelveticaNowDisplay-ExtBlk.ttf);
  font-weight: 900;
}
:root {
  /* Light mode colors */
  --bg-primary: #080808;
  --bg-secondary: #000000;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --accent-primary: #ffb3d1;
  --accent-secondary: #ff8fb3;
  --border-color: #404040;
  --card-bg: #000000;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-heavy: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] {
  /* Dark mode colors with baby pink accents */
  --bg-primary: #080808;
  --bg-secondary: #000000;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --accent-primary: #ffd334;
  --accent-secondary: #d4b02d;
  --border-color: #404040;
  --card-bg: #000000;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-heavy: rgba(0, 0, 0, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
  font-family: "Helvetica";
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Responsive utilities */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }
}

/* Login Styles */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: var(--card-bg);
  padding: 48px 40px;
  border-radius: 16px;
  box-shadow: 0 1px 20px var(--shadow-light);
  text-align: center;
  border: 1px solid var(--border-color);
}

.login-card h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.5px;
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 16px;
}

.login-form input {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  font-size: 16px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(230, 0, 35, 0.1);
}

[data-theme="dark"] .login-form input:focus {
  box-shadow: 0 0 0 4px rgba(255, 179, 209, 0.2);
}

.login-form button {
  width: 100%;
  padding: 16px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-form button:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
}

/* Header */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--shadow-light);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: none;
  color: var(--accent-primary);
  letter-spacing: -0.5px;
}

.dark-mode-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

[data-theme="dark"] .sun-icon {
  display: none;
}

.moon-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

.logout-btn,
.back-btn {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 24px;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 14px;
}

.logout-btn:hover,
.back-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Mobile Sections */
.mobile-sections {
  display: none;
}

@media (max-width: 768px) {
  .mobile-sections {
    display: block;
  }

  .desktop-view {
    display: none;
  }
}

.mobile-section {
  display: none;
}

.mobile-section.active {
  display: block;
}

/* Search Header for Mobile Search Section */
.search-header {
  position: sticky;
  top: 60px;
  z-index: 99;
  padding: 16px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px var(--shadow-light);
}

@media (max-width: 768px) {
  .search-header {
    top: 56px;
    padding: 12px 16px;
  }
}

/* Stats Header */
.stats-header {
  position: sticky;
  top: 60px;
  z-index: 99;
  padding: 20px 20px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px var(--shadow-light);
  text-align: center;
}

.stats-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stats-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 768px) {
  .stats-header {
    top: 56px;
    padding: 16px 16px 12px;
  }

  .stats-header h2 {
    font-size: 1.5rem;
  }
}

/* Desktop Search Container */
.search-container {
  position: sticky;
  top: 60px;
  z-index: 99;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px var(--shadow-light);
}

.search-bar {
  margin-bottom: 16px;
}

.search-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 12px 50px 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 24px;
  font-size: 16px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.2s ease;
  width: 100%;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(230, 0, 35, 0.1);
}

[data-theme="dark"] .search-input:focus {
  box-shadow: 0 0 0 4px rgba(255, 179, 209, 0.2);
}

.search-btn-inline {
  position: absolute;
  right: 8px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-btn-inline:hover {
  background: var(--accent-secondary);
  transform: scale(1.05);
}

.search-btn {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-btn:hover {
  background: var(--accent-secondary);
  transform: scale(1.05);
}

.filters-toggle {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.filters-toggle:hover {
  background: var(--border-color);
}

.filters-toggle.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.filters.show {
  max-height: 200px;
}

@media (min-width: 769px) {
  .filters-toggle {
    display: none;
  }

  .filters {
    max-height: none;
    overflow: visible;
  }
}

.filter-select,
.filter-date {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.filter-select:focus,
.filter-date:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.clear-filters {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: none;
  padding: 8px 16px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.clear-filters:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

/* Stats Styles */
.stats-container {
  max-width: 1200px;
  margin: 0 auto;
}

.stats-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  flex-direction: column;
  gap: 16px;
}

.stats-loading .loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.stats-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.stats-error .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.stats-error h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.summary-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

.summary-card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.summary-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.summary-card-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stats-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.stats-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.category-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-light);
}

.category-icon {
  font-size: 1.8rem;
  margin-right: 16px;
  width: 40px;
  text-align: center;
}

.category-info {
  flex: 1;
}

.category-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.category-bar {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 3px;
  transition: width 0.8s ease;
}

.monthly-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
  align-items: end;
  height: 200px;
  padding: 20px 0;
}

.month-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.month-bar-container {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: end;
  margin-bottom: 8px;
}

.month-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.8s ease;
  position: relative;
}

.month-bar-fill:hover::after {
  content: attr(data-count);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.month-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

.yearly-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.year-item {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.year-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-light);
}

.year-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.year-label {
  font-size: 1.2rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.year-count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Responsive adjustments for stats */
@media (max-width: 768px) {
  .stats-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .summary-card {
    padding: 16px;
  }

  .summary-card-icon {
    font-size: 2rem;
  }

  .summary-card-value {
    font-size: 1.5rem;
  }

  .stats-section {
    padding: 16px;
    margin-bottom: 16px;
  }

  .category-stats {
    grid-template-columns: 1fr;
  }

  .monthly-chart {
    grid-template-columns: repeat(6, 1fr);
    height: 150px;
    gap: 8px;
  }

  .month-label {
    font-size: 10px;
  }

  .yearly-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-summary {
    grid-template-columns: 1fr;
  }

  .monthly-chart {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Desktop Stats Styles */
.desktop-stats {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.desktop-stats .stats-header {
  position: relative;
  top: 0;
  padding: 20px 0;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.desktop-stats .stats-header h2 {
  margin: 0;
}

.desktop-stats .stats-header p {
  margin: 0;
}

.desktop-stats .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 50px;
  background: var(--bg-secondary);
  transition: all 0.3s ease;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.desktop-stats .back-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
  transform: translateX(-4px);
}

.desktop-stats .stats-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  flex-direction: column;
  gap: 16px;
}

.desktop-stats .stats-loading .loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.desktop-stats .stats-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.desktop-stats .stats-error .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.desktop-stats .stats-error h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
}

/* Ensure desktop stats sections have proper spacing */
.desktop-stats .stats-section {
  margin-bottom: 32px;
}

.desktop-stats .stats-summary {
  margin-bottom: 40px;
}

/* Hide desktop stats on mobile */
@media (max-width: 768px) {
  .desktop-stats {
    display: none !important;
  }
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 120px;
}

/* CSS Grid Layout - Moments ordered by rows (newest first) */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
  grid-auto-flow: row;
  transition: opacity 0.1s ease;
}

@media (max-width: 1400px) {
  .moments-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 1024px) {
  .moments-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .moments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .moments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.moment-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid transparent;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.moment-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow-medium);
  border-color: var(--border-color);
}

.moment-image {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  /* Remove fixed height to allow natural aspect ratio */
  min-height: 200px;
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.moment-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
  /* Ensure minimum height while maintaining aspect ratio */
  min-height: 200px;
  max-height: 400px;
}

/* For very tall images, limit the height */
@media (max-width: 768px) {
  .moment-image {
    min-height: 150px;
    max-height: 300px;
  }

  .moment-image img {
    min-height: 150px;
    max-height: 300px;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .moment-image {
    min-height: 120px;
    max-height: 250px;
  }

  .moment-image img {
    min-height: 120px;
    max-height: 250px;
  }
}

/* Overlay content on image */
.moment-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
  padding: 16px 12px 12px;
  color: white;
  opacity: 1;
  transition: all 0.3s ease;
}

.moment-overlay h3 {
  font-size: 14px;
  margin-bottom: 4px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 1px 3px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.moment-overlay .moment-date {
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 400;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 0.8);
}

.moment-overlay .moment-image-count {
  position: absolute;
  top: -40px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
}

.moment-video-indicator {
  position: absolute;
  top: -40px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
}

.moment-video-indicator svg {
  color: var(--accent-primary);
}

/* Remove the old moment-content styles */
.moment-content {
  display: none;
}

.moment-category {
  display: none;
}

.moment-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
}

.moment-card:hover .moment-actions {
  opacity: 1;
  transform: translateY(-2px);
}

.share-btn {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .share-btn {
  background: rgba(38, 38, 38, 0.95);
  color: var(--text-primary);
}

.share-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Alternative design for cards without hover (mobile) */
@media (hover: none) {
  .moment-overlay {
    opacity: 1;
  }

  .moment-actions {
    opacity: 1;
  }
}

/* Improved Pinterest-style hover effects */
@media (hover: hover) {
  .moment-card {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  }

  .moment-card:hover {
    box-shadow: 0 25px 50px var(--shadow-medium);
  }
}

/* Image loading and error states */
.moment-image img[src="/placeholder.svg"],
.moment-image img:not([src]) {
  opacity: 0;
}

.moment-image img {
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Loading state */
.moment-image.loading {
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.moment-image.loading::before {
  content: "📸";
  font-size: 2rem;
  opacity: 0.5;
}

/* Aspect ratio containers for consistent sizing */
.moment-image.aspect-square {
  aspect-ratio: 1 / 1;
}

.moment-image.aspect-portrait {
  aspect-ratio: 3 / 4;
}

.moment-image.aspect-landscape {
  aspect-ratio: 4 / 3;
}

/* Better object-fit support */
.moment-image img {
  object-fit: cover;
  object-position: center;
}

/* For images that are too wide */
.moment-image img.wide {
  object-fit: cover;
  object-position: center top;
}

/* For images that are too tall */
.moment-image img.tall {
  object-fit: cover;
  object-position: center center;
}

/* Empty States */
.empty-state,
.search-empty-state,
.search-initial-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.empty-state h2,
.search-empty-state h2,
.search-initial-state h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 600;
}

.empty-state p,
.search-empty-state p,
.search-initial-state p {
  font-size: 16px;
}

/* Add Button - Pinterest Style */
.add-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1000;
}

.add-btn:hover {
  background: var(--accent-secondary);
  transform: scale(1.1) translateY(-2px);
}

.add-btn svg {
  width: 24px;
  height: 24px;
}

/* Form Styles */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 1px 20px var(--shadow-light);
  border: 1px solid var(--border-color);
}

.moment-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  font-size: 16px;
  transition: all 0.2s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(230, 0, 35, 0.1);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
  box-shadow: 0 0 0 4px rgba(255, 179, 209, 0.2);
}

.form-group small {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.submit-btn {
  padding: 16px 32px;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
}

.submit-btn:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
}

/* Pinterest-style Modal - Full Screen */
.pinterest-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
}

.pinterest-modal.show {
  opacity: 1;
}

.pinterest-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.pinterest-modal-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.pinterest-modal-content {
  background: var(--card-bg);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  box-shadow: none;
  transform: scale(0.95) translateY(20px);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  display: flex;
  flex-direction: column;
}

.pinterest-modal.show .pinterest-modal-content {
  transform: scale(1) translateY(0);
}

.pinterest-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.pinterest-modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

/* Pinterest Modal Content Styles - Full Screen Layout with Improved Image Display */
.pinterest-moment {
  display: grid;
  grid-template-columns: 1fr 400px;
  height: 100vh;
  overflow: hidden;
}

@media (max-width: 768px) {
  .pinterest-moment {
    grid-template-columns: 1fr;
    grid-template-rows: 60vh 1fr;
    height: 100vh;
  }
}

.pinterest-moment-image {
  position: relative;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  user-select: none;
  width: 100%;
  height: 100%;
}

.pinterest-moment-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  max-width: 100%;
  max-height: 100%;
}

/* ENHANCED CAROUSEL STYLES - Better Image Display */
.pinterest-moment-images {
  position: relative;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.pinterest-carousel {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  width: 100%;
  height: 100%;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.pinterest-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.pinterest-carousel-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  background: #000;
}

/* IMPROVED IMAGE DISPLAY - Show full images properly */
.pinterest-carousel-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Changed from cover to contain to show full image */
  object-position: center;
  transition: transform 0.3s ease;
  user-select: none;
  -webkit-user-drag: none;
}

/* Video carousel item styles */
.pinterest-carousel-item.video-item {
  position: relative;
  background: #000;
}

.carousel-video-player {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
}

/* For desktop, allow images and videos to be larger if they fit */
@media (min-width: 769px) {
  .pinterest-carousel-item img,
  .carousel-video-player {
    /* Allow media to use full available space while maintaining aspect ratio */
    max-width: calc(100vw - 400px); /* Account for sidebar */
    max-height: 100vh;
  }
}

/* For very wide images on desktop */
@media (min-width: 769px) {
  .pinterest-carousel-item img.wide {
    width: 100%;
    height: auto;
    max-height: 100vh;
    object-fit: contain;
  }
}

/* For very tall images on desktop */
@media (min-width: 769px) {
  .pinterest-carousel-item img.tall {
    width: auto;
    height: 100%;
    max-width: calc(100vw - 400px);
    object-fit: contain;
  }
}

/* Smooth scrolling enhancement */
.pinterest-carousel {
  -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

/* Hover effects for desktop - subtle zoom */
@media (hover: hover) {
  .pinterest-carousel-item:hover img {
    transform: scale(1.05);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pinterest-moment-images {
    height: 60vh;
  }

  .pinterest-carousel-item img,
  .carousel-video-player {
    max-width: 100vw;
    max-height: 60vh;
  }
}

/* Video overlay with play button */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.video-play-button {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  backdrop-filter: blur(10px);
}

.video-play-button:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .video-play-button {
    width: 60px;
    height: 60px;
  }

  .video-play-button svg {
    width: 40px;
    height: 40px;
  }
}

/* Media type indicator */
.media-type-indicator {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
  z-index: 10;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .media-type-indicator {
    top: 16px;
    right: 16px;
    padding: 6px 10px;
  }
}

/* SLIDE COUNTER STYLES - Enhanced */
.carousel-slide-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 700;
  font-family: "Helvetica", -apple-system, BlinkMacSystemFont, sans-serif;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 15;
  transition: all 0.3s ease;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 4px 20px var(--shadow-medium);
  letter-spacing: 0.5px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .carousel-slide-counter {
    background: var(--accent-primary);
    color: #000;
    top: 16px;
    left: 16px;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 20px;
  }
}

/* Animation for counter updates - enhanced */
.carousel-slide-counter {
  transform-origin: center;
}

/* Ensure counter stays visible on small screens */
@media (max-width: 480px) {
  .carousel-slide-counter {
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 18px;
  }
}

/* Video controls styling */
.carousel-video-player::-webkit-media-controls-panel {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-video-player::-webkit-media-controls-play-button,
.carousel-video-player::-webkit-media-controls-volume-slider,
.carousel-video-player::-webkit-media-controls-timeline {
  filter: invert(1);
}

.pinterest-moment-details {
  padding: 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  background: var(--card-bg);
}

@media (max-width: 768px) {
  .pinterest-moment-details {
    padding: 30px;
    height: auto;
    max-height: 40vh;
  }
}

.pinterest-moment-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
  word-wrap: break-word;
  max-width: 100%;
}

@media (max-width: 768px) {
  .pinterest-moment-header h2 {
    font-size: 2rem;
  }
}

.pinterest-moment-date {
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 500;
}

.pinterest-moment-category {
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  display: inline-block;
  width: fit-content;
}

[data-theme="dark"] .pinterest-moment-category {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.pinterest-moment-description {
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.7;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.pinterest-moment-description p {
  margin-bottom: 16px;
}

.pinterest-moment-actions {
  display: flex;
  gap: 16px;
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.pinterest-action-btn {
  flex: 1;
  padding: 16px 24px;
  border: 2px solid var(--border-color);
  border-radius: 30px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
}

.pinterest-action-btn:hover {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.pinterest-action-btn.primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.pinterest-action-btn.primary:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

/* Share Modal */
.share-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-modal.show {
  opacity: 1;
}

.share-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.share-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--card-bg);
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

.share-modal.show .share-modal-content {
  transform: translate(-50%, -50%) scale(1);
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.share-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.share-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-modal-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.share-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.share-preview-image {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.share-preview-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.share-preview-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.share-actions {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.share-action-btn.whatsapp {
  background: #25d366;
  color: white;
}

.share-action-btn.whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.share-action-btn.download {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.share-action-btn.download:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.share-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 20px;
}

.share-moment {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  max-width: 600px;
  box-shadow: 0 8px 40px var(--shadow-medium);
}

.share-image {
  width: 100%;
  height: auto;
  display: block;
}

.share-content {
  padding: 32px;
}

.share-content h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.share-date {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.share-description {
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
}

/* Messages */
.success-message {
  background: rgba(209, 237, 255, 0.8);
  color: #0074cc;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid #b3d9ff;
  font-weight: 500;
}

[data-theme="dark"] .success-message {
  background: rgba(255, 179, 209, 0.2);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.error-message {
  background: rgba(255, 224, 225, 0.8);
  color: #cc0000;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid #ffb3b3;
  font-weight: 500;
}

[data-theme="dark"] .error-message {
  background: rgba(255, 179, 209, 0.2);
  color: #ff8fb3;
  border-color: #ff8fb3;
}

/* Image Preview */
.image-preview {
  margin-top: 12px;
  text-align: center;
}

.image-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow-light);
  border: 2px solid var(--border-color);
}

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: var(--text-secondary);
}

.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  backdrop-filter: blur(2px);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.search-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: var(--text-secondary);
}

.search-loading .loading-spinner {
  width: 24px;
  height: 24px;
  border-width: 2px;
  margin-right: 12px;
}

.grid-loading {
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Swipe indicator */
.swipe-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  padding: 12px 20px;
  border-radius: 20px;
  box-shadow: 0 4px 20px var(--shadow-medium);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  z-index: 1600;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.swipe-indicator.show {
  opacity: 1;
}

/* Fullscreen Loading Animation */
.fullscreen-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .fullscreen-loading-overlay {
  background: rgba(0, 0, 0, 0.98);
}

.fullscreen-loading-content {
  text-align: center;
  color: white;
  max-width: 400px;
  padding: 40px;
}

.fullscreen-loading-spinner {
  width: 80px;
  height: 80px;
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-top: 6px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin: 0 auto 32px;
}

[data-theme="dark"] .fullscreen-loading-spinner {
  border-top-color: var(--accent-primary);
}

.fullscreen-loading-text {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: white;
}

.fullscreen-loading-subtext {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
  line-height: 1.5;
}

.fullscreen-loading-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.fullscreen-loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

[data-theme="dark"] .fullscreen-loading-progress-bar {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.fullscreen-loading-percentage {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    padding: 12px 16px;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .main-content {
    padding: 16px 12px 100px;
  }

  .form-container {
    padding: 24px 20px;
    margin: 0 12px;
    border-radius: 12px;
  }

  .add-btn {
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
  }

  .add-btn svg {
    width: 20px;
    height: 20px;
  }

  .moments-grid {
    padding: 0 4px;
  }

  .moment-card {
    margin-bottom: 12px;
  }

  .fullscreen-loading-content {
    padding: 20px;
  }

  .fullscreen-loading-spinner {
    width: 60px;
    height: 60px;
    border-width: 4px;
  }

  .fullscreen-loading-text {
    font-size: 20px;
  }

  .fullscreen-loading-subtext {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px;
  }

  .login-card h1 {
    font-size: 1.75rem;
  }

  .header-content {
    gap: 8px;
  }

  .header-actions {
    align-self: flex-end;
  }

  .search-bar {
    flex-direction: column;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select,
  .filter-date {
    width: 100%;
  }
}

/* Hover effects for better Pinterest feel */
@media (hover: hover) {
  .moment-card {
    box-shadow: 0 1px 3px var(--shadow-light);
  }

  .moment-card:hover {
    box-shadow: 0 8px 25px var(--shadow-medium);
  }
}

/* Mobile Footer - Pinterest Style */
.mobile-footer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 12px 0 8px;
  z-index: 1000;
  box-shadow: 0 -2px 10px var(--shadow-light);
}

.mobile-footer-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 400px;
  margin: 0 auto;
}

.footer-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  text-decoration: none;
}

.footer-btn.active {
  color: var(--accent-primary);
}

.footer-btn:hover {
  background: var(--bg-secondary);
  color: var(--accent-primary);
}

.footer-btn.add-btn-footer {
  background: var(--accent-primary);
  color: var(--bg-primary);
  width: 48px;
  height: 48px;
}

.footer-btn.add-btn-footer:hover {
  background: var(--accent-secondary);
  transform: scale(1.05);
}

/* Hide desktop add button on mobile */
@media (max-width: 768px) {
  .add-btn {
    display: none;
  }

  .mobile-footer {
    display: block;
  }

  .main-content {
    padding-bottom: 80px;
  }
}

/* plan-actions styles */
.plan-actions {
  display: flex;
  gap: 8px;
  transition: opacity 0.3s ease;
}

.plan-card:hover .plan-actions {
  opacity: 1;
}

/* Show action buttons always on mobile */
@media (max-width: 768px) {
  .plan-actions {
    opacity: 1;
  }
}

/* Disable hover effects on mobile devices to prevent black screens */
@media (hover: none) and (pointer: coarse) {
  .moment-card:hover {
    transform: none !important;
    box-shadow: none !important;
    background: none !important;
  }
  
  .moment-card {
    transition: none !important;
    will-change: auto !important;
  }
  
  /* Disable any other hover animations */
  *:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Ensure smooth scrolling on mobile */
@media (max-width: 768px) {
  html {
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y; /* Allow vertical scrolling, prevent horizontal */
  }
  
  .moments-grid {
    will-change: auto; /* Disable will-change on mobile for better performance */
    transform: translateZ(0); /* Hardware acceleration */
    backface-visibility: hidden; /* Prevent flickering */
  }
  
  .moment-card {
    will-change: auto; /* Disable will-change on mobile */
    transform: translateZ(0); /* Hardware acceleration */
    backface-visibility: hidden; /* Prevent flickering */
  }
  
  /* Prevent momentum scrolling issues */
  .main-content {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  /* Optimize touch scrolling for mobile */
  * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  
  /* Allow text selection in specific areas */
  .moment-description,
  .moment-title,
  input,
  textarea {
    -webkit-user-select: text;
    user-select: text;
  }
}
