.login-container {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  position: relative;
  overflow: hidden;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.login-box {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.2);
  width: 90%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

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

.login-box h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-box .subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
  font-weight: 500;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.email-input {
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-base);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.email-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(220, 20, 60, 0.1);
  transform: translateY(-1px);
}

.login-button {
  padding: 1rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-button:hover::before {
  left: 100%;
}

/* Mobile ergonomics */
@media (max-width: 768px) {
  .login-box {
    padding: 2rem;
  }

  .login-box h1 {
    font-size: 2rem;
  }

  .login-button {
    min-height: 48px;
    font-size: 1.0625rem;
  }
}

@media (max-width: 480px) {
  .login-box h1 {
    font-size: 1.75rem;
  }
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-primary);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.google-login-button {
  width: 100%;
  padding: 1rem;
  background: white;
  color: #3c4043;
  border: 2px solid #dadce0;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.google-login-button:hover:not(:disabled) {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border-color: #c8ccd0;
  transform: translateY(-1px);
}

.google-login-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-login-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.google-icon {
  flex-shrink: 0;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: var(--spacing-md) 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.login-divider span {
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.98);
  position: relative;
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: var(--spacing-xs) 0;
  padding-bottom: max(var(--spacing-xs), env(safe-area-inset-bottom));
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm);
  border: none;
  background: none;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-secondary);
  font-size: 0.75rem;
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-md);
}

.bottom-nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.bottom-nav-item.active {
  color: var(--primary-color);
  font-weight: 600;
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: scale(1.1);
}

.bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.bottom-nav-icon svg,
.bottom-nav-icon-svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.bottom-nav-label {
  font-size: 0.6875rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bottom-nav-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #ef4444;
  color: white;
  border-radius: 9px;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.bottom-nav-item.active .bottom-nav-badge {
  background: rgba(255, 68, 68, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Desktop: make it more compact */
@media (min-width: 769px) {
  .bottom-nav {
    padding: var(--spacing-sm) 0;
    padding-bottom: max(var(--spacing-sm), env(safe-area-inset-bottom));
  }

  .bottom-nav-item {
    padding: var(--spacing-sm);
    gap: 0.375rem;
  }

  .bottom-nav-label {
    font-size: 0.75rem;
  }

  .bottom-nav-icon svg {
    width: 22px;
    height: 22px;
  }
}

/* Large screens: center the nav with max width */
@media (min-width: 1024px) {
  .bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}
.my-trboo {
  max-width: 1200px;
  padding: 2rem;
  margin: 0 auto;
}

/* Welcome Section */
.my-trboo-welcome-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.my-trboo-welcome-section--minimal {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 0 0.75rem 0;
}

/* Align title row with actions on a single line */
.my-trboo-welcome-content.feed-header-simple {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.my-trboo-welcome-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.my-trboo-welcome-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.my-trboo-search {
  width: 100%;
  max-width: 320px;
}

.search-toggle-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-toggle-btn:hover {
  background: rgba(220, 20, 60, 0.1);
}

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

.search-input-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  pointer-events: none;
  line-height: 1;
}

.search-input {
  width: 100%;
  padding: 0.75rem 2.75rem 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
  background: var(--bg-primary);
}

.search-input-wrapper.with-icon .search-input {
  padding-left: 2.75rem;
}

.search-input:focus {
  outline: none;
  border-color: #DC143C;
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  transition: all 0.2s;
}

.search-clear-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.my-trboo-welcome-icon {
  font-size: 2rem;
  filter: grayscale(0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.my-trboo-welcome-icon svg {
  display: block;
  vertical-align: middle;
}

.my-trboo-welcome-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.my-trboo-welcome-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  padding-left: 3rem;
}

.my-trboo-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.my-trboo-header h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.my-trboo .subtitle {
  color: var(--text-secondary);
  font-weight: 500;
}

.add-recommendation-btn {
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

@media (max-width: 768px) {
  .my-trboo {
    padding: 1rem;
  }

  .my-trboo-welcome-section {
    padding: 1.5rem;
  }

  .my-trboo-welcome-header {
    gap: 0.5rem;
  }

  .my-trboo-search {
    max-width: none;
  }

  .my-trboo-welcome-icon {
    font-size: 1.5rem;
  }

  .my-trboo-welcome-title {
    font-size: 1.5rem;
  }

  .my-trboo-welcome-subtitle {
    font-size: 0.875rem;
    padding-left: 0;
  }

  .my-trboo-header {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0; /* Center content on mobile; avoid horizontal offset */
    flex-wrap: wrap;
    margin-bottom: 1rem;
    margin-top: 0;
    justify-content: center; /* center header horizontally */
  }
  
  .my-trboo-header > div {
    flex: 0 1 auto;
    min-width: 0; /* Allow text to wrap if needed */
    display: flex;
    align-items: center; /* Vertical centering */
    justify-content: center; /* center inner content */
    gap: 0.5rem;
    margin: 0 auto;
  }
  
  .my-trboo-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0;
    line-height: 1.2;
    text-align: center;
    width: 100%;
  }
  
  .my-trboo-header .subtitle {
    font-size: 0.75rem;
    display: none; /* Hide subtitle on mobile for cleaner look */
  }

  /* Prevent the first list item from sitting under the floating menu button */
  .recommendation-list {
    margin-top: 3.5rem;
  }

  .add-recommendation-btn {
    min-height: 44px;
  }
}

.add-recommendation-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.recommendation-list-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.recommendation-list-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.recommendation-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.recommendation-list-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.recommendation-list-icon {
  font-size: 1.5rem;
}

.recommendation-list-title h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.recommendation-list-view-all {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.recommendation-list-view-all:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.recommendation-list-tiles {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.recommendation-list-tiles::-webkit-scrollbar {
  height: 6px;
}

.recommendation-list-tiles::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.recommendation-list-tiles::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

.recommendation-list-tiles::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.recommendation-tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
  min-width: 150px;
  max-width: 200px;
  width: 150px;
}

.recommendation-tile:hover {
  transform: translateY(-2px);
}

.recommendation-tile-image {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.recommendation-tile-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.recommendation-tile-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.recommendation-tile-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.recommendation-tile-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .recommendation-list {
    gap: 0.75rem;
  }

  .recommendation-list-item {
    padding: 1rem;
  }

  .recommendation-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .recommendation-list-view-all {
    align-self: flex-end;
  }

  .recommendation-list-title h3 {
    font-size: 1.125rem;
  }

  .recommendation-list-tiles {
    gap: 0.75rem;
  }

  .recommendation-tile {
    min-width: 120px;
    max-width: 150px;
    width: 120px;
  }
}

.type-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.type-count {
  color: var(--primary-color);
  font-weight: 600;
  opacity: 0.8;
}

.add-recommendation-full-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
  background: var(--bg-secondary);
}

/* Remove border and center title for AddRecommendation page */
.add-recommendation-full-page .discover-welcome-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2rem 0;
  box-shadow: none;
  margin-bottom: 2rem;
}

.add-recommendation-full-page .discover-welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.add-recommendation-full-page .discover-welcome-header {
  justify-content: center;
}

/* Add icon styling in header for AddRecommendation */
.add-recommendation-full-page .discover-welcome-icon.add-icon,
.add-recommendation-full-page .add-icon {
  color: #DC143C !important;
  -webkit-text-fill-color: #DC143C !important;
  filter: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.add-recommendation-full-page .discover-welcome-icon.add-icon svg {
  display: block;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .add-recommendation-full-page {
    padding: 1rem;
  }

  .add-recommendation-full-page .discover-welcome-section {
    margin-left: 0;
    margin-right: 0;
    padding: 1.5rem 0;
  }

  .add-recommendation-full-page .discover-welcome-content {
    padding: 0 1.5rem;
  }
}

.add-recommendation-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: var(--spacing-lg);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
}

.add-recommendation-header h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin: 0;
  font-weight: 700;
}

.add-recommendation-header p {
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
  font-weight: 500;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: #DC143C;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.close-btn:hover {
  background: #f5f5f5;
}

.add-recommendation-form {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

@media (max-width: 768px) {
  .add-recommendation-form {
    padding: 0;
    margin: 0;
    max-width: 100%;
  }

  .add-recommendation-form > div {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 1rem;
  width: 90%;
  max-width: 600px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .modal {
    width: 95%;
    padding: 1.5rem;
    max-height: 95vh;
  }
}

.modal-header {
  margin-bottom: 2rem;
}

.modal-header h2 {
  font-size: 1.75rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.modal-header p {
  color: #666;
  font-size: 0.875rem;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all var(--transition-base);
  background: var(--bg-primary);
  color: var(--text-primary);
  box-sizing: border-box;
}

.form-group select {
  padding-right: 2.5rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(220, 20, 60, 0.1);
  transform: translateY(-1px);
}

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

.helper-text {
  color: #999;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.char-count {
  color: #999;
  font-size: 0.75rem;
  text-align: right;
  margin-top: 0.25rem;
}

.share-options {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.share-option {
  flex: 1;
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-base);
  color: var(--text-secondary);
}

.share-option:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-light);
}

.share-option.active {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-md);
  font-weight: 600;
}

/* Mobile improvements for share options */
@media (max-width: 768px) {
  .share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .share-option {
    min-height: 44px; /* touch-friendly */
    font-size: 0.9rem;
    padding: 0.75rem;
  }
}

@media (max-width: 420px) {
  .share-options {
    grid-template-columns: 1fr; /* stack on very small screens */
  }
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-actions button {
  flex: 1;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px; /* Touch-friendly minimum size */
}

@media (max-width: 768px) {
  .modal-actions {
    flex-direction: column;
  }
  
  .modal-actions button {
    width: 100%;
  }
}

.cancel-btn {
  background: white;
  border: 1px solid #e0e0e0;
  color: #666;
}

.cancel-btn:hover {
  background: #f5f5f5;
}

.save-btn {
  background: var(--primary-gradient);
  border: none;
  color: white;
  box-shadow: var(--shadow-md);
}

.save-btn:hover {
  box-shadow: var(--shadow-lg), var(--shadow-primary);
  transform: translateY(-2px);
}

.save-btn:active {
  transform: translateY(0);
}

/* Share options styles */
.share-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-option {
  background: #f8f9fa;
  color: #666;
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  min-width: 120px;
}

.share-option:hover {
  background: #e9ecef;
}

.share-option.active {
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  color: white;
  border-color: #DC143C;
}

/* Friend selector styles */
.friend-selector {
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.no-friends-message {
  padding: 1.5rem;
  text-align: center;
  color: #666;
  background: #f8f9fa;
}

.no-friends-message p {
  margin: 0.5rem 0;
}

.friends-list {
  padding: 0.5rem;
}

.friend-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 0.25rem;
}

.friend-item:hover {
  background: #f8f9fa;
}

.friend-item.selected {
  background: #e8f5e9;
  border: 1px solid #4caf50;
}

.friend-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  font-size: 0.875rem;
  color: #4caf50;
  font-weight: bold;
}

.friend-item.selected .friend-checkbox {
  background: #4caf50;
  border-color: #4caf50;
  color: white;
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.friend-email {
  font-size: 0.875rem;
  color: #666;
}

/* Group selector styles */
.group-selector {
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.no-groups-message {
  padding: 1.5rem;
  text-align: center;
  color: #666;
  background: #f8f9fa;
}

.no-groups-message p {
  margin: 0.5rem 0;
}

.groups-list {
  padding: 0.5rem;
}

.group-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 0.25rem;
}

.group-item:hover {
  background: #f8f9fa;
}

.group-item.selected {
  background: #e3f2fd;
  border: 1px solid #2196f3;
}

.group-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  font-size: 0.875rem;
  color: #2196f3;
  font-weight: bold;
}

.group-item.selected .group-checkbox {
  background: #2196f3;
  border-color: #2196f3;
  color: white;
}

.group-info {
  flex: 1;
}

.group-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.group-meta {
  font-size: 0.875rem;
  color: #666;
}
.type-detail {
  max-width: 1000px;
}

.back-btn {
  background: none;
  border: none;
  color: #DC143C;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.back-btn:hover {
  color: #5568d3;
}

.type-icon-large {
  font-size: 4rem;
}

.my-trboo-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.my-trboo-header h2 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .type-detail {
    padding-left: 0; /* Center content on mobile; avoid horizontal offset */
  }
  
  .my-trboo-header {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }
  
  .my-trboo-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0;
    flex: 1;
  }
  
  .my-trboo-header .subtitle {
    font-size: 0.75rem;
    display: none; /* Hide on mobile for cleaner look */
  }
  /* Keep cards visually consistent and centered on small screens */
  .recommendations-list {
    gap: 1rem;
  }
  .recommendation-card {
    flex-direction: column;
    align-items: stretch;
  }
  .recommendation-content {
    width: 100%;
  }
}

.my-trboo-header .subtitle {
  color: #666;
}

.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.recommendation-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

.recommendation-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

/* Card image/poster section - full width at top */
.recommendation-card-image-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.recommendation-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.recommendation-card:hover .recommendation-card-image-wrapper img {
  transform: scale(1.05);
}

/* Badge over image */
.recommendation-card .image-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.recommendation-card .image-badge .recommendation-type-badge {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-transform: capitalize;
}

/* Legacy poster support (for backward compatibility) */
.recommendation-poster {
  position: relative;
  flex-shrink: 0;
  width: 180px;
  height: 240px;
  overflow: hidden;
  border-radius: 0.75rem;
}

@media (max-width: 768px) {
  .recommendation-card-image-wrapper {
    height: 220px;
  }
  
  .recommendation-header {
    flex-direction: column;
  }
  
  .recommendation-actions {
    flex-wrap: wrap;
  }
  
  .recommendation-actions button {
    min-height: 44px;
  }
}

.recommendation-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.movie-rating {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  width: auto;
  max-width: fit-content;
}

.movie-rating .star {
  font-size: 0.875rem;
}

.movie-year {
  color: #666;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.movie-overview {
  color: #666;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-clamp: 3;
}

/* Card content section */
.recommendation-card-content {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.recommendation-content {
  flex: 1;
}

.recommendation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.recommendation-title-with-icon {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.recommendation-icon {
  width: 32px;
  height: 32px;
  border-radius: 0.375rem;
  object-fit: cover;
  flex-shrink: 0;
}

.recommendation-header h3,
.recommendation-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.recommendation-badge {
  flex-shrink: 0;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-mine {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-shared {
  background: #e3f2fd;
  color: #1565c0;
}

.recommendation-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.recommendation-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-tertiary);
  text-decoration: underline;
  text-decoration-color: var(--text-tertiary);
  text-underline-offset: 3px;
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  transition: color 0.2s, text-decoration-color 0.2s;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
}

.recommendation-link:hover {
  background: transparent;
  color: var(--primary-color);
  text-decoration-color: var(--primary-color);
  opacity: 1;
}

.recommendation-link:visited {
  color: var(--text-tertiary);
  opacity: 0.6;
}

.recommendation-meta {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.meta-separator {
  color: #ccc;
}

.shared-by {
  color: #DC143C;
  font-weight: 500;
}

.recommendation-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.like-dislike-container {
  display: flex;
  align-items: center;
}

.dual-button {
  display: flex;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  background: white;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.like-side,
.dislike-side {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 60px;
  justify-content: center;
  position: relative;
}

/* Mobile ergonomics */
@media (max-width: 768px) {
  .recommendation-actions {
    gap: 0.75rem;
  }

  .action-btn {
    min-height: 44px;
    font-size: 1rem;
  }

  .share-btn,
  .public-share-btn,
  .edit-btn,
  .remove-library-btn {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    flex: 0 0 auto;
  }

  .dual-button {
    width: 100%;
  }

  .dual-button .icon {
    font-size: 1rem;
  }

  .dual-button .count {
    font-size: 0.875rem;
  }

  .like-side,
  .dislike-side {
    padding: 0.5rem 0.875rem;
    min-width: 72px;
  }

  .comments-btn {
    min-height: 44px;
    padding: 0.5rem 1rem;
    flex: 0 0 auto;
  }

  .add-library-btn {
    min-height: 44px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .recommendation-header h3 {
    font-size: 1.25rem;
  }

  .recommendation-link {
    font-size: 0.95rem;
    padding: 0.625rem 1rem;
  }
}

.like-side {
  border-right: 1px solid #e0e0e0;
}

.like-side:hover {
  background: #fff5f5;
  color: #ff6b6b;
}

.dislike-side:hover {
  background: #f5f5f5;
  color: #999;
}

.like-side.active {
  background: #ff6b6b;
  color: white;
}

.dislike-side.active {
  background: #999;
  color: white;
}

.dual-button .icon {
  font-size: 0.875rem;
}

.dual-button .count {
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}

.action-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

/* Icon-only buttons */
.share-btn,
.public-share-btn,
.edit-btn,
.add-library-btn {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.share-btn {
  background: #DC143C;
  color: white;
}

.share-btn:hover {
  background: #5568d3;
}

.public-share-btn {
  background: #4caf50;
  color: white;
}

.public-share-btn:hover {
  background: #45a049;
}

.edit-btn {
  background: #f0f0f0;
  color: #333;
}

.edit-btn:hover {
  background: #e0e0e0;
}

.delete-btn {
  background: #ff4444;
  color: white;
}

.delete-btn:hover {
  background: #cc0000;
}

.comments-btn {
  background: #f0f0f0;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.comments-btn:hover {
  background: #e0e0e0;
}

.add-library-btn {
  background: var(--success-color);
  color: white;
}

.add-library-btn:hover:not(:disabled) {
  background: #45a049;
}

.add-library-btn:disabled {
  background: #cccccc;
  color: #666;
}

.remove-library-btn {
  background: #ff4444;
  color: white;
}

.remove-library-btn:hover:not(:disabled) {
  background: #cc0000;
}

.share-modal {
  max-width: 600px;
}

.share-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.share-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: #666;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.share-tab:hover {
  color: #DC143C;
  background: #f5f5f5;
}

.share-tab.active {
  color: #DC143C;
  border-bottom-color: #DC143C;
  background: #f9f9ff;
}

.empty-friends {
  padding: 3rem;
  text-align: center;
  color: #999;
}

.friends-list-modal {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.friend-select-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.friend-select-item:hover {
  background: #f5f5f5;
}

.friend-select-item.selected {
  background: #eff6ff;
  border-left: 3px solid #DC143C;
}

.friend-select-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}

.friend-select-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.friend-select-info {
  flex: 1;
}

.friend-select-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.friend-select-email {
  color: #666;
  font-size: 0.875rem;
}

.friend-select-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #DC143C;
  flex-shrink: 0;
}

.friend-select-item.selected .friend-select-checkbox {
  background: #DC143C;
  border-color: #DC143C;
  color: white;
}

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

.empty-state {
  background: white;
  padding: 3rem;
  border-radius: 1rem;
  text-align: center;
  color: #999;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h2 {
  font-size: 1.5rem;
  color: #333;
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #DC143C;
}

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

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-header p {
  color: #666;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.char-count {
  color: #999;
  font-size: 0.75rem;
  text-align: right;
  margin-top: 0.25rem;
}

.modal-actions button {
  flex: 1;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-actions .delete-btn {
  background: #ff4444;
  border: none;
  color: white;
  flex: 0 0 auto;
  width: auto;
  padding: 0.75rem 1.5rem;
}

.modal-actions .delete-btn:hover {
  background: #cc0000;
}

.cancel-btn {
  background: white;
  border: 1px solid #e0e0e0;
  color: #666;
}

.cancel-btn:hover {
  background: #f5f5f5;
}

.save-btn {
  background: #DC143C;
  border: none;
  color: white;
}

.save-btn:hover {
  background: #5568d3;
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  background: white;
  color: #666;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn:hover {
  border-color: #DC143C;
  color: #DC143C;
}

.toggle-btn.active {
  background: #DC143C;
  border-color: #DC143C;
  color: white;
}

.map-container-wrapper {
  margin-top: 1rem;
}

.map-container {
  background: #f5f5f5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.places-list-beneath-map {
  margin-top: 2rem;
}

.places-list-beneath-map h3 {
  font-weight: 600;
  color: #333;
}

/* Public share button styles - moved to icon-only buttons section above */
.modal.recommendation-detail-modal {
  padding: 0;
  background: transparent;
  box-shadow: none;
  width: min(920px, 95vw) !important;
  max-width: none !important;
}

.recommendation-detail-card {
  background: var(--bg-primary);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}

.detail-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.detail-close-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

.recommendation-detail-hero {
  display: flex;
  flex-direction: row; /* Explicit: image left, info right on desktop */
  gap: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
}

.detail-hero-media {
  flex: 0 0 220px;
  border-radius: 1.25rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.detail-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fullscreen image overlay */
.fullscreen-image-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
}

.fullscreen-image-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.fullscreen-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  cursor: pointer;
  z-index: 10000;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.fullscreen-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.detail-hero-placeholder {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.4);
}

.detail-hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.detail-type-pill {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-title {
  font-size: 2rem;
  margin: 0;
  color: #1f1f1f;
}

.detail-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-weight: 600;
  color: #ff9800;
  width: fit-content;
}

.detail-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail-chip {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  color: #444;
}

.detail-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.detail-action-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-action-button.active,
.detail-action-button:hover {
  background: #111;
  color: #fff;
}

.detail-action-button.delete-button {
  border-color: rgba(0, 0, 0, 0.1);
  color: #000;
}

.detail-action-button.delete-button:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

.recommendation-detail-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-section {
  background: var(--bg-secondary, #fff);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.detail-hero-share-badge {
  margin-top: -0.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-hero-share-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.detail-hero-share-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.detail-hero-share-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-share-avatar span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
}

.detail-hero-share-text {
  font-size: 0.95rem;
  color: #1f1f1f;
}

.detail-hero-share-reason {
  margin: 0.35rem 0 0;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.5;
}

.detail-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-info-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 0.75rem;
}

.detail-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-info-label {
  font-size: 0.85rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-info-value {
  color: #222;
  line-height: 1.5;
}

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

.section-label {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: #222;
}

.section-subtitle,
.section-meta {
  margin: 0;
  color: #777;
  font-size: 0.9rem;
}

.detail-section-text {
  margin: 0;
  color: #333;
  line-height: 1.6;
  white-space: pre-wrap;
}

.detail-read-more-btn {
  margin-top: 0.75rem;
  border: none;
  background: transparent;
  color: #DC143C;
  font-weight: 600;
  cursor: pointer;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.detail-meta-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 1rem;
}

.meta-label {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.35rem;
  display: block;
}

.meta-value {
  font-weight: 600;
  color: #222;
}

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

.detail-recommended-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
}

.recommended-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #DC143C;
  flex-shrink: 0;
  overflow: hidden;
}

.recommended-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommended-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.recommended-name {
  font-weight: 600;
  color: #222;
}

.recommended-date {
  font-size: 0.85rem;
  color: #999;
}

.recommended-reason {
  margin: 0.35rem 0 0;
  color: #555;
  line-height: 1.5;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail-links-inline {
  margin-top: 1rem;
}

.friends-talk-section .section-header {
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.friends-talk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.friends-talk-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.friends-talk-stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.friends-talk-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.friends-talk-stat-label {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
}

.friends-talk-likes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.friends-talk-like-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.friends-talk-like-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.friends-talk-like-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friends-talk-like-name {
  font-weight: 500;
  color: #222;
}

.friends-talk-comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.friends-talk-comment-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.friends-talk-comment-textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border-light);
  padding: 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 90px;
  background: var(--bg-primary);
}

.friends-talk-comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #777;
}

.friends-talk-comment-count {
  color: #999;
}

.friends-talk-comment-remaining {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 0.85em;
}

.friends-talk-comment-submit {
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  border: none;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.friends-talk-comment-submit:hover:not(:disabled) {
  background: var(--primary-dark);
}

.friends-talk-comment-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.friends-talk-comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.friends-talk-comment-item {
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 1rem;
  background: var(--bg-primary);
}

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

.friends-talk-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.friends-talk-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friends-talk-comment-author {
  margin: 0;
  font-weight: 600;
  color: #222;
  font-size: 0.95rem;
}

.friends-talk-comment-date {
  margin: 0;
  font-size: 0.8rem;
  color: #999;
}

.friends-talk-comment-body {
  margin: 0;
  color: #444;
  line-height: 1.5;
  font-size: 0.9rem;
}

.friends-talk-loading {
  text-align: center;
  padding: 1.5rem;
  color: #999;
  font-style: italic;
}

/* Shared With Friends Section */
.shared-with-section {
  margin-top: 1.5rem;
}

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

.shared-with-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  transition: box-shadow 0.2s ease;
}

.shared-with-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.shared-with-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #DC143C;
  flex-shrink: 0;
  overflow: hidden;
}

.shared-with-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shared-with-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.shared-with-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.shared-with-name {
  font-weight: 600;
  color: #222;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.shared-with-wishlist-icon {
  width: 16px;
  height: 16px;
  color: #DC143C;
  flex-shrink: 0;
}

.shared-with-date {
  font-size: 0.85rem;
  color: #999;
}

.shared-with-why {
  margin: 0;
  color: #555;
  line-height: 1.5;
  font-size: 0.9rem;
}

.shared-with-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.25rem;
  width: fit-content;
}

.shared-with-status-pending {
  background: rgba(255, 193, 7, 0.15);
  color: #f57c00;
}

.shared-with-status-accepted {
  background: rgba(76, 175, 80, 0.15);
  color: #388e3c;
}

.shared-with-status-rejected {
  background: rgba(244, 67, 54, 0.15);
  color: #d32f2f;
}

.shared-with-status-read {
  background: rgba(33, 150, 243, 0.15);
  color: #1976d2;
}

.shared-with-loading {
  text-align: center;
  padding: 1.5rem;
  color: #999;
  font-style: italic;
}

.shared-with-empty {
  text-align: center;
  padding: 2rem;
  color: #777;
}

.shared-with-empty p {
  margin: 0.5rem 0;
}

.shared-with-empty-hint {
  font-size: 0.9rem;
  color: #999;
  font-style: italic;
}

/* Ensure consistent overlay padding for recommendation detail modal
   This overrides conflicting .modal-overlay padding from other CSS files.
   Using !important because multiple CSS files define .modal-overlay and 
   bundling order differs between dev and production builds. */
.modal-overlay:has(.recommendation-detail-modal) {
  padding: 1rem !important;
}

@media (max-width: 768px) {
  /* Add bottom padding to modal overlay to account for bottom nav */
  /* This targets the modal-overlay when it contains recommendation-detail-modal */
  .modal-overlay:has(.recommendation-detail-modal) {
    padding-bottom: 80px !important;
    padding-top: 0.5rem !important; /* Reduce top spacing */
    align-items: flex-start !important; /* Align modal to top instead of center */
  }

  .modal.recommendation-detail-modal {
    max-height: calc(100vh - 80px - 0.5rem); /* Account for bottom nav and small top padding */
    margin-top: 0.5rem;
  }

  .recommendation-detail-hero {
    flex-direction: column;
    padding: 1.5rem;
  }

  .detail-hero-media {
    width: 100%;
    min-height: 200px;
  }

  .detail-hero-actions {
    flex-direction: column;
  }

  .recommendation-detail-content {
    padding: 1.25rem;
    padding-bottom: calc(1.25rem + 80px); /* Add space for bottom nav */
  }

  .detail-section {
    padding: 1.25rem;
  }

  .detail-engagement-panel {
    flex-direction: column;
  }

  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .friends-talk-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .friends-talk-stat-value {
    font-size: 2rem;
  }

  .detail-close-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.5rem;
  }
}

.home-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Welcome Section */
.home-welcome-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.home-welcome-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-welcome-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.home-welcome-icon {
  font-size: 2rem;
  filter: grayscale(0.3);
}

.home-welcome-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.home-welcome-clown {
  font-size: 2.5rem;
  display: inline-flex;
  align-items: center;
  transform: translateY(0.15rem);
}

.home-welcome-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  padding-left: 3rem;
}

.home-header {
  margin-bottom: 2rem;
}

.home-header h1 {
  font-size: 2rem;
  color: var(--text-primary);
  margin: 0;
}

/* Your Stats Section */
.your-stats-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.your-stats-header {
  margin-bottom: 1.25rem;
}

.your-stats-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.your-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.your-stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.your-stat-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.your-stat-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.your-stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.your-stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.your-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

@media (max-width: 1024px) {
  .your-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .your-stats-section {
    padding: 1rem;
  }

  .your-stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .your-stat-item {
    padding: 0.875rem;
  }

  .your-stat-icon {
    font-size: 1.5rem;
  }

  .your-stat-value {
    font-size: 1.5rem;
  }
}

/* Latest Updates Section */
.latest-updates-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.latest-updates-header {
  margin-bottom: 1.25rem;
}

.latest-updates-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Stats Cards Section */
.home-stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.latest-updates-section .home-stats-cards {
  margin-bottom: 0;
}

.home-stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-base);
}

.home-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.home-stat-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
  min-height: 2.5em; /* Fixed height for 2 lines to align numbers */
  line-height: 1.25;
  display: flex;
  align-items: flex-start;
}

.home-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.home-stat-link {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: all var(--transition-base);
  white-space: nowrap;
  margin-top: auto;
}

.home-stat-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.home-view-all-link {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.home-view-all-link:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .home-stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-container {
    padding: 1rem;
  }

  .home-welcome-section {
    padding: 1.5rem;
  }

  .home-welcome-header {
    gap: 0.5rem;
  }

  .home-welcome-icon {
    font-size: 1.5rem;
  }

  .home-welcome-title {
    font-size: 1.5rem;
  }

  .home-welcome-subtitle {
    font-size: 0.875rem;
    padding-left: 0;
  }

  .latest-updates-section {
    padding: 1rem;
  }

  .home-stats-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .home-stat-card {
    padding: 1rem;
  }

  .home-stat-title {
    font-size: 0.75rem;
    min-height: 2.5em;
  }

  .home-stat-value {
    font-size: 1.75rem;
  }

  .home-stat-link {
    font-size: 0.75rem;
  }
}

/* Friend Requests Section */
.friend-requests-section {
  margin-top: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.friend-requests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.friend-requests-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.friend-requests-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.friend-requests-title h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.friend-requests-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--text-secondary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: auto;
}

.friend-requests-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
}

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

.friend-request-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.friend-request-item:hover {
  box-shadow: var(--shadow-sm);
}

.friend-request-avatar {
  flex-shrink: 0;
}

.friend-request-avatar-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.friend-request-avatar-initials {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.friend-request-details {
  flex: 1;
  min-width: 0;
}

.friend-request-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.friend-request-mutual {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.friend-request-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.friend-request-accept {
  background: var(--text-primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-base);
}

.friend-request-accept:hover {
  background: var(--text-secondary);
}

.friend-request-decline {
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-base);
}

.friend-request-decline:hover {
  background: var(--bg-tertiary);
}

.friend-requests-view-all {
  margin-top: 1rem;
  text-align: center;
}

@media (max-width: 768px) {
  .friend-requests-section {
    padding: 1rem;
  }

  .friend-request-item {
    flex-wrap: wrap;
  }

  .friend-request-actions {
    width: 100%;
    justify-content: stretch;
  }

  .friend-request-accept,
  .friend-request-decline {
    flex: 1;
  }
}

/* Latest Friend Recos Section */
.latest-friend-recos-section {
  margin-top: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.latest-friend-recos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.latest-friend-recos-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.latest-friend-recos-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.latest-friend-recos-title h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.latest-friend-recos-view-more {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.latest-friend-recos-view-more:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.latest-friend-recos-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.latest-friend-reco-tile {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.latest-friend-reco-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.latest-friend-reco-image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.latest-friend-reco-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.latest-friend-reco-tile:hover .latest-friend-reco-image {
  transform: scale(1.05);
}

.latest-friend-reco-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.latest-friend-reco-placeholder-type {
  font-size: 0.875rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-secondary);
}

.latest-friend-reco-rating {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.latest-friend-reco-rating .star {
  font-size: 0.75rem;
}

.latest-friend-reco-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.latest-friend-reco-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.latest-friend-reco-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.latest-friend-reco-category {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 0.75rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.latest-friend-reco-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.latest-friend-reco-avatar,
.latest-friend-reco-avatar-initials {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.latest-friend-reco-avatar {
  object-fit: cover;
}

.latest-friend-reco-avatar-initials {
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
}

.latest-friend-reco-author-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .latest-friend-recos-rail {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .latest-friend-recos-section {
    padding: 1rem;
  }

  .latest-friend-recos-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .latest-friend-recos-view-more {
    align-self: flex-end;
  }

  .latest-friend-recos-rail {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .latest-friend-reco-image-wrapper {
    height: 180px;
  }
}

/* Recent Friend Recommendations Section */
.recent-friend-recs-section {
  margin-top: 2rem;
}

.recent-friend-recs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.recent-friend-recs-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recent-friend-recs-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.recent-friend-recs-title h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.recent-friend-recs-view-all {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.recent-friend-recs-view-all:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.recent-friend-recs-list {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.recent-friend-recs-list::-webkit-scrollbar {
  height: 8px;
}

.recent-friend-recs-list::-webkit-scrollbar-track {
  background: transparent;
}

.recent-friend-recs-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.recent-friend-recs-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.recent-friend-rec-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
  min-width: 180px;
}

.recent-friend-rec-item:hover {
  transform: translateY(-2px);
}

.recent-friend-rec-image {
  width: 180px;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.recent-friend-rec-placeholder {
  width: 180px;
  height: 240px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.recent-friend-rec-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.recent-friend-rec-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.recent-friend-rec-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.recent-friend-rec-from {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .recent-friend-rec-item {
    min-width: 150px;
  }

  .recent-friend-rec-image,
  .recent-friend-rec-placeholder {
    width: 150px;
    height: 200px;
  }

  .recent-friend-recs-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .recent-friend-recs-view-all {
    align-self: flex-end;
  }
}


/* Home Recommendation Cards - New Design */
.home-recommendations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.home-recommendation-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  position: relative;
}

.home-recommendation-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.home-recommendation-image-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.home-recommendation-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.home-recommendation-card:hover .home-recommendation-image {
  transform: scale(1.05);
}

.recommendation-private-ribbon {
  position: absolute;
  top: 1rem;
  right: -2.5rem;
  width: 9rem;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  padding: 0.4rem 0;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
  pointer-events: none;
}

.recommendation-private-ribbon span {
  display: block;
}

.home-recommendation-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-recommendation-placeholder-type {
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-secondary);
}

.home-recommendation-rating {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.home-recommendation-rating .star {
  font-size: 0.875rem;
}

.home-recommendation-card-content {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.home-recommendation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.home-recommendation-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.3em * 2);
}

.home-recommendation-category {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.home-recommendation-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: calc(1.5em * 2);
}

.home-recommendation-description--empty {
  display: none;
}

.home-recommendation-stars {
  font-size: 1.125rem;
  color: #ffc107;
  letter-spacing: 0.1rem;
}

.home-recommendation-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-recommendation-avatar,
.home-recommendation-avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.home-recommendation-avatar {
  object-fit: cover;
}

.home-recommendation-avatar-initials {
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.home-recommendation-author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.home-recommendation-interactions {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.home-recommendation-action {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.home-recommendation-action:hover {
  background: var(--bg-tertiary);
}

.home-recommendation-action.active {
  color: #e91e63;
}

.home-recommendation-action.bookmark-action.active {
  color: var(--primary-color);
}

.home-recommendation-action.active .action-icon {
  filter: none;
}

.home-recommendation-action.in-library {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-icon {
  font-size: 1.125rem;
}

.action-count {
  font-weight: 600;
  font-size: 0.875rem;
  color: #000000;
}

.home-recommendation-date {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.home-recommendation-platform-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.home-recommendation-platform-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background-color var(--transition-base);
}

.home-recommendation-platform-icons a:hover {
  background-color: var(--bg-tertiary);
}

.home-recommendation-platform-icons img {
  width: 20px;
  height: 20px;
}

/* Category badge colors (from Discover.css) */
.category-movie {
  background: #e3f2fd;
  color: #1976d2;
}

.category-series {
  background: #e1f5fe;
  color: #0277bd;
}

.category-book {
  background: #fff3e0;
  color: #e65100;
}

.category-podcast {
  background: #f3e5f5;
  color: #7b1fa2;
}

.category-music {
  background: #fce4ec;
  color: #c2185b;
}

.category-place {
  background: #fff3e0;
  color: #ef6c00;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.close-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-actions {
  padding: 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.cancel-btn,
.save-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.cancel-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.cancel-btn:hover {
  background: var(--bg-tertiary);
}

.save-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
}

.save-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 1200px) {
  .home-recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-recommendations-grid {
    grid-template-columns: 1fr;
  }

  .home-recommendation-image-wrapper {
    height: 220px;
  }

  .modal-overlay {
    padding: 1rem;
  }
}

.discover-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Welcome Section */
.discover-welcome-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.discover-welcome-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.discover-welcome-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.search-toggle-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
}

.search-toggle-btn:hover {
  background: rgba(102, 126, 234, 0.1);
}

.discover-search {
  flex: 1;
  max-width: 320px;
  width: 100%;
}

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

.search-input-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  pointer-events: none;
  line-height: 1;
}

.search-input {
  width: 100%;
  padding: 0.75rem 2.75rem 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
  background: var(--bg-primary);
}

.search-input-wrapper.with-icon .search-input {
  padding-left: 2.75rem;
}

.search-input:focus {
  outline: none;
  border-color: #DC143C;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  transition: all 0.2s;
}

.search-clear-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.discover-welcome-icon {
  font-size: 2rem;
  filter: grayscale(0.3);
}

.discover-welcome-icon.add-icon {
  color: #DC143C !important;
  filter: none !important;
}

.discover-welcome-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.discover-welcome-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  padding-left: 3rem;
}

/* Header Section */
.discover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 2rem;
}

.discover-header-left {
  flex: 1;
}

.discover-header-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.discover-header-right {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.filter-dropdown-wrapper {
  position: relative;
}

.category-buttons-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 1rem;
}

.category-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.privacy-filter-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.privacy-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.privacy-filter-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.privacy-filter-button.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.privacy-filter-icon {
  font-size: 1rem;
  line-height: 1;
}

.privacy-filter-count {
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.privacy-filter-button.active .privacy-filter-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sort-toggle-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sort-toggle-switch {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2px;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}

.sort-toggle-side {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: calc(var(--radius-lg) - 2px);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
}

.sort-toggle-side:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sort-toggle-side.active {
  background: #424242;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sort-toggle-side.active:hover {
  background: #525252;
}

.sort-arrow {
  color: #333;
  transition: color 0.2s ease;
}

.sort-toggle-side.active .sort-arrow {
  color: white;
}

.sort-toggle-side.active svg {
  color: white;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.8));
}

.category-button {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 0;
}

.category-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.category-button.active {
  background: #424242;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  color: white !important;
}

.category-button.active:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.category-button.active {
  background: #424242 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  color: white !important;
}

.category-button.active svg {
  color: white !important;
  fill: none !important;
}

.category-button.active svg[stroke],
.category-button.active svg path,
.category-button.active svg circle,
.category-button.active svg rect,
.category-button.active svg polyline,
.category-button.active svg polygon,
.category-button.active svg line {
  stroke: white !important;
  fill: none !important;
}

/* Force white stroke on all SVG children */
.category-button.active svg * {
  stroke: white !important;
}

/* Ensure no fill on outline icons */
.category-button.active svg path,
.category-button.active svg circle,
.category-button.active svg rect,
.category-button.active svg polyline,
.category-button.active svg polygon {
  fill: none !important;
}

.filter-dropdown {
  padding: 0.625rem 2.5rem 0.625rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  background: white;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  min-width: 160px;
}

.filter-dropdown:hover {
  border-color: #DC143C;
}

.filter-dropdown:focus {
  outline: none;
  border-color: #DC143C;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}


.clear-filters-btn {
  padding: 0.75rem 1.5rem;
  background: #f44336;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.clear-filters-btn:hover {
  background: #d32f2f;
}

.add-first-reco-btn {
  padding: 0.75rem 1.5rem;
  background: #DC143C;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  margin-top: 1rem;
}

.add-first-reco-btn:hover {
  background: #b0112e;
}

.discover-results {
  margin-top: 1rem;
}

.results-header h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.results-count {
  color: #DC143C;
  font-weight: 400;
}

.no-results {
  text-align: center;
  padding: 3rem;
  background: #f9f9f9;
  border-radius: 0.75rem;
}

.no-results p {
  color: #666;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.recommendation-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

.recommendation-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

/* Card image/poster section - full width at top */
.recommendation-card-image-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.recommendation-card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.recommendation-card:hover .recommendation-card-image-wrapper img {
  transform: scale(1.05);
}

/* Badge over image */
.recommendation-card .image-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.recommendation-card .image-badge .recommendation-type-badge {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-transform: capitalize;
}

/* Movie rating badge - positioned on the left */
.recommendation-card .movie-rating {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  width: auto;
  max-width: fit-content;
}

.recommendation-card .movie-rating .star {
  font-size: 0.875rem;
}

/* Card content section */
.recommendation-card-content {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 200px;
}

.recommendation-category-badge {
  margin-bottom: 0.75rem;
}

.category-tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-movie {
  background: #e3f2fd;
  color: #1976d2;
}

.category-series {
  background: #e1f5fe;
  color: #0277bd;
}

.category-book {
  background: #fff3e0;
  color: #e65100;
}

.category-podcast {
  background: #f3e5f5;
  color: #7b1fa2;
}

.category-music {
  background: #fce4ec;
  color: #c2185b;
}

.category-place {
  background: #fff3e0;
  color: #ef6c00;
}

.recommendation-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
  gap: var(--spacing-sm);
}

.recommendation-type-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

/* Override for image badge */
.recommendation-card .image-badge .recommendation-type-badge {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
}

.recommendation-date {
  font-size: 0.875rem;
  color: #999;
}

.recommendation-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.recommendation-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: var(--spacing-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.recommendation-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-top: 0;
  border-top: none;
  font-size: 0.875rem;
}

.added-by {
  color: #666;
}

.added-by strong {
  color: #333;
}

.likes-count {
  color: #e91e63;
  font-weight: 600;
}

.recommendation-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-tertiary);
  text-decoration: underline;
  text-decoration-color: var(--text-tertiary);
  text-underline-offset: 3px;
  font-size: 0.8125rem;
  font-weight: 400;
  padding: 0;
  background: transparent;
  transition: color 0.2s, text-decoration-color 0.2s;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
}

.recommendation-link:hover {
  color: var(--primary-color);
  text-decoration-color: var(--primary-color);
  opacity: 1;
}

@media (max-width: 1200px) {
  .recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .discover-container {
    padding: 1rem;
  }

  .discover-welcome-section {
    padding: 1.5rem;
  }

  .discover-welcome-header {
    gap: 0.5rem;
  }

  .discover-welcome-icon {
    font-size: 1.5rem;
  }

  .discover-welcome-title {
    font-size: 1.5rem;
  }

  .discover-welcome-subtitle {
    font-size: 0.875rem;
    padding-left: 0;
  }

  .discover-header {
    flex-direction: column;
    gap: 1.5rem;
    justify-content: flex-start;
  }

  .discover-header-filters {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .discover-search {
    max-width: none;
  }

  .category-buttons-wrapper {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .category-buttons {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .category-button {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
    flex-shrink: 0;
  }

  .discover-header-right {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }

  .filter-dropdown-wrapper {
    flex: 1;
    min-width: 0;
  }

  .filter-dropdown {
    width: 100%;
    min-width: 140px;
    font-size: 0.875rem;
  }

  .sort-toggle-wrapper {
    width: auto;
    flex-shrink: 0;
    justify-content: flex-end;
  }

  .sort-toggle-switch {
    padding: 2px;
    gap: 2px;
  }

  .sort-toggle-side {
    width: 40px;
    height: 40px;
    font-size: 1.125rem;
    border-radius: 0.5rem;
  }

  .filter-dropdown {
    width: 100%;
    min-width: 140px;
  }

  .recommendations-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .recommendation-card-image-wrapper {
    height: 220px;
  }

  .filter-dropdown {
    min-height: 44px;
    font-size: 1rem;
  }
}


/* Feed-specific styles */

/* Feed icon styling in header */
.feed-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent-color, #DC143C);
  display: block;
}

/* Wishlist icon styling in header */
.wishlist-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wishlist-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent-color, #DC143C);
  display: block;
}

/* New recommendation highlighting */
.home-recommendation-card.feed-item-new {
  background: rgba(220, 20, 60, 0.08);
  border-color: rgba(220, 20, 60, 0.2);
}

.home-recommendation-card.feed-item-new:hover {
  background: rgba(220, 20, 60, 0.12);
  border-color: rgba(220, 20, 60, 0.3);
}

/* Feed badges */
.feed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  margin: 8px 0;
  width: fit-content;
}

.feed-badge-arrow {
  font-weight: 700;
}

.feed-badge-received {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.feed-badge-sent {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.feed-badge-private {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

/* "Why" text styling */
.feed-why {
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Feed sent author (You + recipients) */
.feed-sent-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 8px 0;
}

.feed-sent-author-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feed-sent-to-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feed-recipients-avatars {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 0.5rem;
}

.feed-recipient-avatar-wrapper {
  position: relative;
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  background: var(--bg-primary);
  margin-left: -8px;
}

.feed-recipient-avatar-wrapper:first-child {
  margin-left: 0;
}

.feed-recipient-avatar-wrapper .home-recommendation-avatar,
.feed-recipient-avatar-wrapper .home-recommendation-avatar-initials {
  display: block;
  border: 2px solid var(--bg-primary);
  box-sizing: border-box;
}

.feed-recipient-avatar-remaining {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--bg-primary);
  margin-left: -8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.feed-recipient-count {
  line-height: 1;
}

/* Wishlist indicator on cards */
.feed-wishlist-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent-color);
  border-radius: 50%;
  padding: 6px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.feed-wishlist-indicator svg {
  width: 14px;
  height: 14px;
}

/* Filter selects */
.feed-filter-select {
  padding: 8px 12px;
  padding-right: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  transition: all 0.2s ease;
}

.feed-filter-select:hover {
  border-color: var(--accent-color);
}

.feed-filter-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.15);
}

.feed-type-filter,
.friend-filter {
  flex-shrink: 0;
}

/* Search and sort row container */
.feed-search-sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.feed-search-sort-row .my-trboo-search {
  flex: 1;
  min-width: 0;
}

/* Sort button */
.feed-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feed-sort-button:hover {
  border-color: var(--accent-color);
  background: var(--bg-tertiary);
}

.feed-sort-button.sort-by-likes {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Sort toggle chips */
.feed-sort-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.feed-sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feed-sort-chip:hover {
  border-color: var(--accent-color);
  background: var(--bg-tertiary);
}

.feed-sort-chip.active {
  border-color: var(--accent-color);
  background: rgba(80, 69, 255, 0.08);
  color: var(--accent-color);
}

.feed-sort-chip.active.sort-by-likes {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.sort-chip-title {
  line-height: 1.3;
}

.feed-sort-button.sort-by-likes:hover {
  background: rgba(239, 68, 68, 0.15);
}

.sort-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sort-icon svg {
  width: 16px;
  height: 16px;
}

.sort-label {
  font-weight: 500;
}

/* Feed stats in header */
.feed-stats {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.feed-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.feed-stat-icon {
  font-size: 1rem;
}

.feed-stat-count {
  font-weight: 600;
  color: var(--text-primary);
}

/* Loading state */
.feed-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
  color: var(--text-secondary);
}

.feed-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: feed-spin 0.8s linear infinite;
}

@keyframes feed-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Loading more state (for infinite scroll) */
.feed-loading-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: var(--text-secondary);
}

.feed-loading-more .feed-loading-spinner {
  width: 32px;
  height: 32px;
  border-width: 2px;
}

/* New/All Filter Toggle */
.feed-new-filter-toggle-wrapper {
  margin-top: 1rem;
  display: flex !important;
  align-items: center;
  width: 100%;
  visibility: visible !important;
  opacity: 1 !important;
}

.feed-new-filter-toggle {
  display: flex !important;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2px;
  gap: 2px;
  box-shadow: var(--shadow-sm);
  width: auto;
  min-width: 200px;
  max-width: 400px;
  visibility: visible !important;
  opacity: 1 !important;
}

.feed-new-filter-toggle-side {
  flex: 1;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: calc(var(--radius-lg) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  /* Assure que les deux boutons ont exactement la même taille */
  width: 50%;
  min-width: 0;
}

.feed-new-filter-toggle-side:hover {
  background: rgba(0, 0, 0, 0.05);
}

.feed-new-filter-toggle-side.active {
  background: var(--accent-color);
  color: white;
  /* Style "enfoncé" avec ombre intérieure */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
  transform: translateY(1px);
}

.feed-new-filter-toggle-side.active:hover {
  background: #b81232;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .feed-new-filter-toggle {
    width: 100%;
    max-width: 100%;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .feed-badge-received {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.3);
  }

  .feed-badge-sent {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.3);
  }

  .feed-badge-private {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.3);
  }

  .feed-filter-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  }

  .feed-sort-button.sort-by-likes {
    background: rgba(239, 68, 68, 0.15);
  }

  .home-recommendation-card.feed-item-new {
    background: rgba(220, 20, 60, 0.12);
    border-color: rgba(220, 20, 60, 0.3);
  }

  .home-recommendation-card.feed-item-new:hover {
    background: rgba(220, 20, 60, 0.16);
    border-color: rgba(220, 20, 60, 0.4);
  }
}

/* Feed Header Simple */
.feed-header-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 1rem;
}

/* Filters Menu */
.feed-filters-container {
  position: relative;
}

.feed-filters-top-right {
  margin-left: auto;
}

.feed-filters-menu-wrapper {
  position: relative;
  display: inline-block;
}

.feed-filters-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  min-width: 36px;
  min-height: 36px;
}

.feed-filters-menu-button:hover {
  border-color: var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.feed-filters-menu-button.has-filters {
  border-color: var(--primary-color);
  background: rgba(220, 20, 60, 0.08);
  color: var(--primary-color);
}

.feed-filters-menu-button.open {
  border-color: var(--primary-color);
  background: rgba(220, 20, 60, 0.12);
  color: var(--primary-color);
}

.filters-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.filters-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.filters-menu-icon svg {
  width: 18px;
  height: 18px;
}

.filters-menu-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 1.5px solid var(--bg-primary);
}

.feed-filters-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  max-width: min(500px, calc(100vw - 32px));
  width: max-content;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-height: 80vh;
  overflow-y: auto;
  animation: feed-filters-fade-in 0.2s ease;
}

@keyframes feed-filters-fade-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feed-filters-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

.feed-filters-menu-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feed-filters-clear-all {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.feed-filters-clear-all:hover {
  background: rgba(220, 20, 60, 0.1);
}

.feed-filters-menu-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feed-filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-filter-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.feed-filter-section .category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-filter-section .category-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 8px;
}

/* Filters Modal */
.feed-filter-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 1200;
}

.feed-filter-modal {
  width: min(720px, 100%);
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  animation: feed-filters-fade-in 0.15s ease;
}

.feed-filter-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.feed-filter-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.feed-filter-modal-kicker {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.feed-filter-modal-close {
  border: none;
  background: transparent;
  width: auto;
  height: auto;
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.feed-filter-modal-close:hover {
  color: var(--accent-color);
}

.feed-filter-modal-content {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feed-filter-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border-light);
}

.feed-filter-modal-reset,
.feed-filter-modal-apply {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.feed-filter-modal-reset {
  background: transparent;
  color: var(--text-primary);
}

.feed-filter-modal-reset:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.feed-filter-modal-reset:not(:disabled):hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.feed-filter-modal-apply {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.feed-filter-modal-apply:hover {
  filter: brightness(0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .feed-filters-menu-dropdown {
    right: -16px;
    left: auto;
    min-width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    max-height: 70vh;
  }

  .feed-filters-menu-content {
    padding: 12px;
    gap: 16px;
  }
  .feed-stats {
    gap: 12px;
  }

  .feed-stat {
    font-size: 0.8125rem;
  }

  .feed-filter-select {
    padding: 6px 10px;
    padding-right: 28px;
    font-size: 0.8125rem;
  }

  .discover-header-filters {
    flex-wrap: wrap;
    gap: 8px;
  }

  .feed-type-filter,
  .friend-filter {
    flex: 1;
    min-width: 120px;
  }

  .feed-filter-select {
    width: 100%;
  }

  /* Search and sort row on mobile */
  .feed-search-sort-row {
    width: 100%;
    order: 10; /* Push to end */
  }

  .feed-search-sort-row .my-trboo-search {
    max-width: none;
  }

  .feed-sort-button {
    padding: 6px 10px;
    font-size: 0.8125rem;
  }

  .sort-label {
    display: none;
  }
}

/* Floating Action Button for Add Friend */
.fab-add-friend {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.4), 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1002; /* Higher than settings menu to ensure always visible */
  animation: fab-appear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fab-appear {
  0% {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.fab-add-friend:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(220, 20, 60, 0.5), 0 12px 32px rgba(0, 0, 0, 0.2);
}

.fab-add-friend:active {
  transform: scale(0.95);
}

.fab-add-friend svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

/* Tablet and mobile positioning - ensure FAB is always above tab bar */
@media (max-width: 1024px) {
  .fab-add-friend {
    /* Use calc to ensure it's always above the tab bar + safe area */
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    right: 1.5rem;
  }
}

@media (max-width: 768px) {
  .fab-add-friend {
    /* Increased to ensure visibility above tab bar on all mobile devices */
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    right: 1.25rem;
    width: 56px;
    height: 56px;
  }
  
  .fab-add-friend svg {
    width: 24px;
    height: 24px;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .fab-add-friend {
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    right: 1rem;
    width: 52px;
    height: 52px;
  }
  
  .fab-add-friend svg {
    width: 22px;
    height: 22px;
  }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
  .fab-add-friend {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    right: 0.875rem;
    width: 48px;
    height: 48px;
  }
  
  .fab-add-friend svg {
    width: 20px;
    height: 20px;
  }
}

/* Center the friends header */
.my-trboo .my-trboo-welcome-section .my-trboo-welcome-header {
  justify-content: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* Friends icon styling in header */
.friends-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.friends-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent-color, #DC143C);
  display: block;
  vertical-align: middle;
}

/* Settings Menu */
.friends-settings-menu {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.settings-menu-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s;
  border-radius: 0.5rem;
}

.settings-menu-button:hover {
  background: rgba(220, 20, 60, 0.1);
  color: #DC143C;
  transform: rotate(45deg);
}

.settings-menu-button svg {
  width: 24px;
  height: 24px;
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  overflow: hidden;
  z-index: 1000;
  animation: dropdown-appear 0.2s ease-out;
}

@keyframes dropdown-appear {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: white;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #333;
  transition: all 0.2s;
  border-bottom: 1px solid #f5f5f5;
}

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

.settings-dropdown-item:hover {
  background: rgba(220, 20, 60, 0.05);
  color: #DC143C;
}

.settings-dropdown-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main content container */
.friends-content {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-primary, white);
  border: 1px solid var(--border-light, #e0e0e0);
  border-radius: var(--radius-lg, 1rem);
  padding: 2rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  overflow: visible;
  position: relative;
}

/* Friend detail view - adjust container for sticky header */
.friends-content:has(.friend-detail-page) {
  padding: 0 !important;
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: #ffffff;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
}

/* Hide header when showing friend detail */
.my-trboo:has(.friend-detail-page) .my-trboo-welcome-section {
  display: none;
}

/* Hide FAB when showing friend detail */
.my-trboo:has(.friend-detail-page) .fab-add-friend {
  display: none;
}

/* Hide bottom nav when showing friend detail */
body:has(.friend-detail-page) .bottom-nav {
  display: none;
}

/* Full-screen mode for friend detail */
.my-trboo:has(.friend-detail-page) {
  padding: 0;
  margin: 0;
  max-width: 100%;
}

/* Fallback for browsers without :has() support */
@supports not (selector(:has(*))) {
  .friend-detail-page {
    margin: -2rem;
    margin-bottom: 0;
    margin-top: -2rem;
  }
  
  .friends-content {
    padding-top: 0 !important;
  }
}

.friends-content:has(.friend-detail-page) .back-to-friends-btn {
  border-radius: var(--radius-lg, 1rem) var(--radius-lg, 1rem) 0 0;
}

/* Ensure no gap at the very top - removed, now handled in main rule */

/* White background layer for sticky headers */
.friend-detail-sticky-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: #ffffff;
  z-index: 97;
  pointer-events: none;
  display: block;
}

@media (max-width: 768px) {
  .friend-detail-sticky-background {
    height: 130px;
  }
}

@media (max-width: 480px) {
  .friend-detail-sticky-background {
    height: 120px;
  }
}

.friend-detail-page .friend-detail-content {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 2rem;
  background: #ffffff;
  position: relative;
  z-index: 1;
}

@media (min-width: 769px) {
  .friend-detail-page .friend-detail-content {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Back to friends button - Sticky */
.back-to-friends-btn {
  background: #ffffff;
  border: none;
  color: #DC143C;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.75rem 1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Full-screen mode: fixed positioning */
.friends-content:has(.friend-detail-page) .back-to-friends-btn {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

.back-to-friends-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  z-index: -1;
}

.back-to-friends-btn:hover {
  background: rgba(220, 20, 60, 0.05);
  transform: translateX(-2px);
}

.back-to-friends-btn:hover::before {
  background: rgba(220, 20, 60, 0.05);
}

.back-to-friends-btn.scrolled {
  border-bottom-color: #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .friends-content {
    padding: 1.5rem 1rem;
    margin-bottom: 2rem; /* Reduced since FAB is higher now */
    padding-bottom: 2rem; /* Extra padding at bottom for scrolling comfort */
  }

  .friends-content:has(.friend-detail-page) {
    padding: 0 !important;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
  }

  .friend-detail-page .friend-detail-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 2rem;
    background: #ffffff;
  }
  
  .settings-dropdown {
    right: -0.5rem; /* Adjust for small screens */
    min-width: 220px;
  }
  
  .settings-dropdown-item {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  
  .friends-settings-menu {
    right: -0.5rem;
  }
  
  .back-to-friends-btn {
    padding: 0.875rem 0.75rem;
    font-size: 0.9375rem;
  }
  
  .search-input {
    font-size: 1rem;
    padding: 0.875rem 2.75rem 0.875rem 3rem;
  }
  
  .search-icon {
    left: 0.875rem;
  }
  
  .search-clear-btn {
    right: 0.625rem;
  }
  
  .skeleton-avatar {
    width: 48px;
    height: 48px;
  }
  
  .skeleton-action {
    width: 44px;
    height: 44px;
  }
}


.search-section {
  margin-bottom: 1.5rem;
}

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

.search-icon {
  position: absolute;
  left: 1rem;
  color: #999;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 0.75rem 2.75rem 0.75rem 3rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #DC143C;
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 1rem;
  transition: all 0.2s;
}

.search-clear-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.friend-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
}

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

/* Friend Request Items in All Tab */
.friend-request-item-inline {
  background: linear-gradient(90deg, rgba(220, 20, 60, 0.03) 0%, transparent 100%);
  border-left: 3px solid #DC143C;
  padding-left: 0.75rem;
  animation: request-appear 0.3s ease-out;
  cursor: default;
}

@keyframes request-appear {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.friend-request-item-inline.received-request {
  border-left-color: #4caf50;
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.05) 0%, transparent 100%);
}

.friend-request-item-inline.sent-request {
  border-left-color: #ff9800;
  background: linear-gradient(90deg, rgba(255, 152, 0, 0.05) 0%, transparent 100%);
}

.friend-request-item-inline:hover {
  background: linear-gradient(90deg, rgba(220, 20, 60, 0.06) 0%, rgba(220, 20, 60, 0.01) 100%);
}

.friend-request-item-inline.received-request:hover {
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.01) 100%);
}

.friend-request-item-inline.sent-request:hover {
  background: linear-gradient(90deg, rgba(255, 152, 0, 0.08) 0%, rgba(255, 152, 0, 0.01) 100%);
}

.friend-request-info {
  color: #666;
  font-size: 0.8125rem;
  font-weight: 500;
}

.friend-request-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.accept-btn-inline,
.reject-btn-inline {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  transition: all 0.2s;
  flex-shrink: 0;
}

.accept-btn-inline {
  background: #4caf50;
  color: white;
}

.accept-btn-inline:hover {
  background: #45a049;
  transform: scale(1.1);
}

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

.reject-btn-inline {
  background: #f44336;
  color: white;
}

.reject-btn-inline:hover {
  background: #da190b;
  transform: scale(1.1);
}

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

.friend-request-status {
  margin-left: auto;
  color: #ff9800;
  font-size: 0.875rem;
  font-weight: 600;
  font-style: italic;
  flex-shrink: 0;
}

/* Skeleton Loaders */
.friend-skeleton {
  pointer-events: none;
  cursor: default;
}

.skeleton-avatar,
.skeleton-name,
.skeleton-stats,
.skeleton-action {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 0.25rem;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-name {
  height: 1.125rem;
  width: 60%;
  margin-bottom: 0.5rem;
}

.skeleton-stats {
  height: 0.875rem;
  width: 40%;
}

.skeleton-action {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
}

/* Divider between requests and friends */
.friends-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1rem;
  margin: 0.5rem 0;
}

.friends-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e0e0e0 50%, transparent 100%);
}

.friends-divider-text {
  color: #999;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.friend-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}

.friend-details {
  flex: 1;
  min-width: 0; /* allow flex child to shrink so actions stay aligned */
}

.friend-name {
  color: #333;
  font-weight: 600;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-stats {
  color: #666;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inline action buttons container to avoid overlapping text */
.friend-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: relative;
}

.friend-menu-btn {
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
}

.friend-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

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

.friend-menu-btn svg {
  width: 20px;
  height: 20px;
}

.friend-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  overflow: hidden;
  z-index: 100;
  animation: dropdown-appear 0.2s ease-out;
}

.friend-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: white;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  transition: all 0.2s;
  border-bottom: 1px solid #f5f5f5;
}

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

.friend-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.friend-dropdown-item.delete-item {
  color: #f44336;
}

.friend-dropdown-item.delete-item:hover {
  background: rgba(244, 67, 54, 0.05);
}

.friend-dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.empty-state {
  padding: 3rem;
  text-align: center;
  color: #999;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
}

.modal h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.add-method-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: #f5f5f5;
  border-radius: 0.5rem;
}

.method-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: transparent;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  color: #666;
}

.method-tab.active {
  background: white;
  color: #DC143C;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #DC143C;
}

.helper-text {
  color: #999;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.invite-reco-section {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.invite-reco-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.invite-reco-title {
  font-weight: 700;
  color: #333;
}

.invite-reco-counter {
  padding: 0.35rem 0.75rem;
  background: #fff;
  border-radius: 999px;
  border: 1px solid #e0e0e0;
  font-weight: 700;
  color: #c33;
}

.invite-reco-counter.complete {
  border-color: #2ecc71;
  color: #2ecc71;
  background: #e9f7ef;
}

.invite-reco-search {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.invite-reco-search:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.invite-reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
}

.invite-reco-card {
  position: relative;
  text-align: left;
  width: 100%;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 0.75rem;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.invite-reco-card:hover {
  border-color: #DC143C;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.invite-reco-card.selected {
  border-color: #DC143C;
  box-shadow: 0 4px 10px rgba(220, 20, 60, 0.15);
}

.invite-reco-type {
  font-size: 0.75rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invite-reco-name {
  font-weight: 700;
  color: #333;
  margin: 0.35rem 0;
  line-height: 1.2;
}

.invite-reco-desc {
  color: #666;
  font-size: 0.875rem;
  line-height: 1.3;
}

.invite-reco-check {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #DC143C;
}

.invite-reco-card.selected .invite-reco-check {
  border-color: #DC143C;
  background: #fff0f5;
}

.invite-reco-empty {
  padding: 1rem;
  border-radius: 0.5rem;
  background: white;
  border: 1px dashed #e0e0e0;
  color: #777;
}

.invite-why-input {
  width: 100%;
  min-height: 90px;
  padding: 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  resize: vertical;
}

.invite-why-input:focus {
  outline: none;
  border-color: #DC143C;
}

.empty-users {
  padding: 2rem;
  text-align: center;
  color: #999;
  background: #f9f9f9;
  border-radius: 0.5rem;
  border: 1px dashed #e0e0e0;
}

.user-select {
  cursor: pointer;
}

/* User search with autocomplete */
.user-search-container {
  position: relative;
}

.user-search-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.user-search-input:focus {
  outline: none;
  border-color: #DC143C;
}

.user-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}

.user-search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 1px solid #f5f5f5;
}

.user-search-result-item:last-child {
  border-bottom: none;
}

.user-search-result-item:hover {
  background: #f5f5f5;
}

.user-search-result-item.selected {
  background: #f0f4ff;
  border-color: #DC143C;
}

.user-search-result-info {
  flex: 1;
  min-width: 0;
}

.user-search-result-name {
  color: #333;
  font-weight: 500;
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-search-result-email {
  color: #666;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-user-display {
  margin-top: 0.75rem;
}

.selected-user-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: #f0f4ff;
  border: 1px solid #DC143C;
  border-radius: 0.5rem;
  color: #DC143C;
  font-weight: 500;
}

.remove-selected-user {
  background: none;
  border: none;
  color: #DC143C;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.remove-selected-user:hover {
  background: rgba(102, 126, 234, 0.1);
}

.user-search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: #999;
  font-size: 0.875rem;
}

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

.modal-actions button {
  flex: 1;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.cancel-btn {
  background: white;
  border: 1px solid #e0e0e0;
  color: #666;
}

.cancel-btn:hover {
  background: #f5f5f5;
}

.save-btn {
  background: #DC143C;
  border: none;
  color: white;
}

.save-btn:hover:not(:disabled) {
  background: #5568d3;
}

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

/* Lists section */
.lists-section {
  margin-bottom: 2rem;
}

.lists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

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

/* Mobile ergonomics */
@media (max-width: 768px) {
  .settings-menu-button {
    min-width: 44px;
    min-height: 44px;
  }

  .friend-item {
    padding: 1rem 0.75rem;
    align-items: center; /* keep items aligned horizontally */
  }

  .friend-actions {
    margin-left: auto;
    margin-top: 0;
    display: flex;
    flex-direction: row; /* keep icon button inline */
    align-items: center;
    gap: 0.5rem;
  }

  .friend-menu-btn {
    min-width: 44px;
    min-height: 44px;
  }
  
  .friend-dropdown-menu {
    min-width: 200px;
    right: -0.5rem;
  }
  
  .friend-dropdown-item {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  
  /* Friend request items on mobile */
  .friend-request-item-inline {
    gap: 0.75rem;
  }
  
  .accept-btn-inline,
  .reject-btn-inline {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }
  
  .friend-request-info {
    font-size: 0.8rem;
  }
  
  .friend-request-status {
    font-size: 0.8125rem;
  }
  
  /* Add extra spacing at the bottom of lists to ensure last items aren't hidden */
  .friends-list,
  .lists-section,
  .requests-section {
    padding-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .tab {
    font-size: 0.95rem;
    padding: 0.625rem 1rem;
  }
}

.list-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.list-card:hover {
  border-color: #DC143C;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.list-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.list-card-header h3 {
  font-size: 1.25rem;
  color: #333;
  font-weight: 600;
}

.list-friends-count {
  font-size: 0.875rem;
  color: #DC143C;
  font-weight: 600;
}

.list-description {
  color: #666;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* List detail modal */
.list-detail-modal {
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.modal-content-scrollable {
  overflow-y: auto;
  flex: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2rem 1.5rem 2rem;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
  background: white;
}

.modal-header h2 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 0.25rem;
}

.modal-header p {
  color: #666;
  font-size: 0.875rem;
}

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

.close-btn:hover {
  background: #f5f5f5;
  color: #333;
}

/* List friends sections */
.list-friends-section {
  margin-bottom: 2rem;
  padding: 0 2rem;
}

.list-friends-section:first-of-type {
  padding-top: 2rem;
}

.list-add-friends-section {
  padding: 0 2rem 2rem 2rem;
}

.list-friends-section h3,
.list-add-friends-section h3 {
  font-size: 1rem;
  color: #333;
  margin-bottom: 1rem;
  font-weight: 600;
}

.list-friends-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #f9f9f9;
  border-radius: 0.5rem;
  border: 1px solid #e0e0e0;
}

.list-friend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
}

.list-friend-item:hover {
  border-color: #DC143C;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.friend-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.list-friend-name {
  flex: 1;
  color: #333;
  font-weight: 500;
  font-size: 0.9375rem;
}

.remove-from-list-btn,
.add-to-list-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  flex-shrink: 0;
}

.remove-from-list-btn {
  background: #fee;
  color: #c33;
}

.remove-from-list-btn:hover {
  background: #fdd;
}

.add-to-list-btn {
  background: #DC143C;
  color: white;
}

.add-to-list-btn:hover {
  background: #5568d3;
}


.list-available-friends {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #f9f9f9;
  border-radius: 0.5rem;
  border: 1px solid #e0e0e0;
}

.empty-friends {
  padding: 2rem;
  text-align: center;
  color: #999;
  background: #f9f9f9;
  border-radius: 0.5rem;
  border: 1px dashed #e0e0e0;
}

.empty-friends p {
  margin: 0.25rem 0;
}

/* List create modal */
.list-create-modal {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Friend selection for list creation */
.friend-selection-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #f9f9f9;
  border-radius: 0.5rem;
  border: 1px solid #e0e0e0;
}

.friend-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.2s;
}

.friend-checkbox-label:hover {
  border-color: #DC143C;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.friend-checkbox-label input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  margin: 0;
}

.friend-checkbox-name {
  flex: 1;
  color: #333;
  font-weight: 500;
  font-size: 0.9375rem;
}

/* List preview */
.list-friends-preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.list-preview-friend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

.list-more-friends {
  font-size: 0.875rem;
  color: #999;
  font-style: italic;
}

.friend-avatar-tiny {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Friend Detail Modal Styles */
.friend-detail-modal {
  max-width: 800px;
  width: 90%;
}

.friend-recommendations-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 1rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  background: white;
  color: #666;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #DC143C;
  color: #DC143C;
}

.filter-btn.active {
  background: #DC143C;
  border-color: #DC143C;
  color: white;
}

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

.friend-recommendation-item {
  background: #f8f9fa;
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
}

.friend-recommendation-item:hover {
  background: #f0f4ff;
  border-color: #DC143C;
}

.rec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.rec-type-badge {
  background: #DC143C;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.rec-date {
  color: #666;
  font-size: 0.75rem;
}

.friend-recommendation-item h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.1rem;
}

.rec-description {
  color: #666;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.rec-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #DC143C;
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.rec-link:hover {
  color: #5568d3;
}

.rec-metadata {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.metadata-item {
  font-size: 0.8rem;
  color: #666;
  background: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #e0e0e0;
}

/* Friend Detail Page View (non-modal) */
.friend-detail-page {
  animation: page-slide-in 0.3s ease-out;
  background: #ffffff;
  min-height: 100vh;
  margin-top: 0;
  padding-top: 0;
}

@keyframes page-slide-in {
  0% {
    opacity: 0;
    transform: translateX(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.friend-detail-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-radius: 0;
  margin-bottom: 0;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 56px;
  z-index: 99;
  transition: box-shadow 0.2s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.friend-detail-header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Full-screen mode: fixed positioning */
.friends-content:has(.friend-detail-page) .friend-detail-header {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  width: 100%;
}

.friend-detail-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  z-index: -1;
}

.friend-detail-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.friend-detail-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.friend-detail-avatar-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.friend-detail-name {
  font-size: 1.5rem;
  color: #333;
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

.friend-detail-content {
  padding: 0;
  padding-top: 2rem;
}

/* Enhanced Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: #333;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.empty-state p {
  color: #666;
  font-size: 1rem;
  margin: 0;
}

.empty-state .search-suggestion {
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.search-suggestion-link {
  background: none;
  border: none;
  color: #DC143C;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s;
}

.search-suggestion-link:hover {
  color: #b01030;
}

/* Timeline Container */
.timeline-container {
  padding: 1rem 0;
  max-width: 900px;
  margin: 0 auto;
}

/* Full-screen mode: add top padding for fixed header */
.friends-content:has(.friend-detail-page) .timeline-container {
  padding-top: 150px;
}

.timeline-day-group {
  margin-bottom: 3rem;
}

.timeline-date-label {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #DC143C;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  padding: 0.5rem 1rem;
  background: rgba(220, 20, 60, 0.05);
  border-radius: 2rem;
  display: inline-block;
  width: auto;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* Timeline Item */
.timeline-item-wrapper {
  margin-bottom: 2rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  position: relative;
  min-height: 200px;
}

.timeline-item.sent .timeline-card-left {
  display: flex;
}

.timeline-item.received .timeline-card-right {
  display: flex;
}

/* Timeline Center Line with Icon */
.timeline-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  position: relative;
  grid-column: 2;
}

.timeline-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(180deg, #e0e0e0 0%, #f0f0f0 100%);
  min-height: 30px;
}

.timeline-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: 3px solid #DC143C;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(220, 20, 60, 0.2);
  z-index: 1;
  margin: 0;
  color: #333;
}

.timeline-icon svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

/* Timeline Cards */
.timeline-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  animation: card-appear 0.4s ease-out;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

@keyframes card-appear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-color: #DC143C;
}

.timeline-card-left {
  grid-column: 1;
  justify-self: stretch;
  text-align: left;
  border-left: 3px solid #DC143C;
}

.timeline-card-right {
  grid-column: 3;
  justify-self: stretch;
  text-align: left;
  border-right: 3px solid #4caf50;
}

.timeline-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.timeline-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.3;
}

/* View Message Button */
.view-message-btn {
  background: rgba(220, 20, 60, 0.05);
  border: 1px solid rgba(220, 20, 60, 0.2);
  color: #DC143C;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.view-message-btn:hover {
  background: rgba(220, 20, 60, 0.1);
  border-color: rgba(220, 20, 60, 0.4);
  transform: translateY(-1px);
}

.view-message-btn:active {
  transform: translateY(0);
}

.timeline-card-right .view-message-btn {
  background: rgba(76, 175, 80, 0.05);
  border-color: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.timeline-card-right .view-message-btn:hover {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.4);
}

/* Hide empty card slots */
.timeline-item.sent .timeline-card-right,
.timeline-item.received .timeline-card-left {
  display: none;
  visibility: hidden;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .back-to-friends-btn {
    padding: 0.875rem 0.75rem;
    font-size: 0.9375rem;
    top: 0;
  }

  .friend-detail-header {
    padding: 1rem 1.25rem;
    gap: 0.875rem;
    top: 52px;
  }

  /* Full-screen mode adjustments */
  .friends-content:has(.friend-detail-page) .friend-detail-header {
    top: 52px;
  }

  .friends-content:has(.friend-detail-page) .timeline-container {
    padding-top: 130px;
  }
  
  .friend-detail-avatar {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
  }

  .friend-detail-avatar-image {
    width: 52px;
    height: 52px;
  }
  
  .friend-detail-name {
    font-size: 1.25rem;
  }

  .timeline-container {
    padding: 0.5rem 0;
  }

  .friend-detail-content {
    padding-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .back-to-friends-btn {
    padding: 0.75rem 0.625rem;
    font-size: 0.875rem;
    top: 0;
  }

  .friend-detail-header {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
    top: 48px;
  }

  /* Full-screen mode adjustments */
  .friends-content:has(.friend-detail-page) .friend-detail-header {
    top: 48px;
  }

  .friends-content:has(.friend-detail-page) .timeline-container {
    padding-top: 120px;
  }
  
  .friend-detail-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.125rem;
  }

  .friend-detail-avatar-image {
    width: 48px;
    height: 48px;
  }
  
  .friend-detail-name {
    font-size: 1.125rem;
  }

  .friend-detail-content {
    padding-top: 1.25rem;
  }

  .friend-detail-page .friend-detail-content {
    background: #ffffff;
  }
}

@media (max-width: 768px) {

  .timeline-item {
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    gap: 0.75rem;
    min-height: 160px;
  }

  .timeline-icon {
    width: 36px;
    height: 36px;
    border-width: 2px;
  }

  .timeline-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .timeline-card {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .timeline-card-image {
    height: 140px;
  }

  .timeline-card-title {
    font-size: 1rem;
  }

  .timeline-card-why {
    font-size: 0.875rem;
    padding: 0.5rem;
  }

  .timeline-date-label {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    margin-bottom: 1.5rem;
  }

  .empty-state {
    padding: 3rem 1rem;
  }

  .empty-icon {
    font-size: 3rem;
  }

  .empty-state h3 {
    font-size: 1.25rem;
  }

  .empty-state p {
    font-size: 0.9375rem;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .timeline-item {
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    gap: 0.5rem;
    min-height: 140px;
  }

  .timeline-icon {
    width: 32px;
    height: 32px;
  }

  .timeline-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  .timeline-card {
    padding: 0.625rem;
  }

  .timeline-card-image {
    height: 120px;
  }

  .timeline-card-title {
    font-size: 0.9375rem;
  }

  .view-message-btn {
    font-size: 0.8125rem;
    padding: 0.4rem 0.75rem;
  }
}

/* Why Message Modal - Minimal Design */
.why-modal {
  max-width: 500px;
  width: 90%;
  max-height: 70vh;
  background: white;
  border-radius: 1rem;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
}

.close-btn-minimal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.close-btn-minimal:hover {
  background: #f5f5f5;
  color: #333;
}

.why-modal-content {
  color: #333;
  font-size: 1.125rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  padding-right: 2.5rem;
}

@media (max-width: 768px) {
  .why-modal {
    width: 95%;
    padding: 2rem;
    max-height: 80vh;
  }

  .close-btn-minimal {
    top: 0.75rem;
    right: 0.75rem;
  }

  .why-modal-content {
    font-size: 1rem;
    line-height: 1.7;
    padding-right: 2rem;
  }
}

@media (max-width: 480px) {
  .why-modal {
    padding: 1.5rem;
  }

  .why-modal-content {
    font-size: 0.9375rem;
    line-height: 1.6;
    padding-right: 1.5rem;
  }
}

/* Timeline Loading Skeleton */
.timeline-skeleton {
  pointer-events: none;
  animation: none;
}

.skeleton-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}

.skeleton-title {
  width: 80%;
  height: 1.5rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 0.25rem;
  margin-top: 0.75rem;
}

.skeleton-button {
  width: 120px;
  height: 2rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.skeleton-icon {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-icon-inner {
  width: 18px;
  height: 18px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 0.25rem;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@media (max-width: 768px) {
  .skeleton-image {
    height: 140px;
  }

  .skeleton-title {
    height: 1.25rem;
  }

  .skeleton-button {
    width: 100px;
    height: 1.75rem;
  }

  .skeleton-icon-inner {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .skeleton-image {
    height: 120px;
  }

  .skeleton-title {
    height: 1.125rem;
  }

  .skeleton-button {
    width: 90px;
    height: 1.5rem;
  }

  .skeleton-icon-inner {
    width: 14px;
    height: 14px;
  }
}
/* =========================================
   ADD FRIEND MODAL - Main Container
   ========================================= */

.add-friend-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

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

.add-friend-modal {
  background: white;
  border-radius: 1rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

/* =========================================
   HEADER
   ========================================= */

.add-friend-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem 0;
  min-height: 48px;
}

.add-friend-back-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: -0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.add-friend-back-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.add-friend-close-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  margin-right: -0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  line-height: 1;
}

.add-friend-close-btn:hover {
  background: #f5f5f5;
  color: #333;
}

/* =========================================
   STEP 1: EMAIL INPUT
   ========================================= */

.add-friend-email-step {
  padding: 1rem 1.5rem 1.5rem;
}

.add-friend-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.add-friend-title-icon {
  width: 40px;
  height: 40px;
  background: #fff0f5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.add-friend-title-icon.success {
  background: #e9f7ef;
  color: #2ecc71;
}

.add-friend-title h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.add-friend-subtitle {
  color: #666;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  padding-left: calc(40px + 0.75rem);
}

.add-friend-form-group {
  margin-bottom: 1rem;
}

.add-friend-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.5rem;
}

.add-friend-email-input {
  position: relative;
}

.add-friend-email-input .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.add-friend-email-input input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  background: white;
}

.add-friend-email-input input:focus {
  outline: none;
  border-color: #DC143C;
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.add-friend-email-input input.error {
  border-color: #e74c3c;
}

.add-friend-email-input input:disabled {
  background: #f9f9f9;
  cursor: not-allowed;
}

.add-friend-email-error {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #e74c3c;
}

.add-friend-continue-btn {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-friend-continue-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.add-friend-continue-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.add-friend-continue-btn .btn-arrow {
  transition: transform 0.2s ease;
}

.add-friend-continue-btn:hover:not(:disabled) .btn-arrow {
  transform: translateX(3px);
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================
   STEP 2: CONFIRM STEP
   ========================================= */

.add-friend-confirm-step {
  padding: 0 1.5rem 1.5rem;
}

/* User Preview Card */
.user-preview-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 0.75rem;
  margin: 1rem 0;
}

.user-preview-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.user-preview-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.user-preview-email {
  font-size: 0.875rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status Messages */
.add-friend-status-message {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin: 1rem 0;
}

.add-friend-status-message.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

/* Invitation Card */
.invitation-card {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fff5f7 0%, #fff0f5 100%);
  border: 2px dashed #DC143C;
  border-radius: 0.75rem;
  margin: 1rem 0;
}

.invitation-card-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.invitation-card-email {
  font-size: 1.125rem;
  font-weight: 600;
  color: #DC143C;
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.invitation-card-status {
  color: #666;
  font-size: 0.9375rem;
}

.invitation-card.was-invited {
  border-color: #f0ad4e;
  background: linear-gradient(135deg, #fff9f0 0%, #fff5e6 100%);
}

.was-invited-notice {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: white;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: #856404;
}

.add-friend-info-text {
  color: #666;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 1rem 0;
}

.add-friend-not-enough-recos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 0.5rem;
  color: #856404;
  font-size: 0.9375rem;
  margin: 1rem 0;
}

/* =========================================
   RECOMMENDATION PICKER
   ========================================= */

.reco-picker-section {
  margin: 1rem 0;
  border: 1px solid #e0e0e0;
  border-radius: 0.75rem;
  overflow: hidden;
}

.reco-picker-section.mandatory {
  border-color: #DC143C;
  border-width: 2px;
}

.reco-picker-header {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  background: #f9f9f9;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
  gap: 0.75rem;
}

.reco-picker-header:hover {
  background: #f0f0f0;
}

.reco-picker-header-mandatory {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: #fff0f5;
  border-bottom: 1px solid #e0e0e0;
}

.reco-picker-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #ccc;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 0.875rem;
  color: white;
}

.reco-picker-checkbox.checked {
  background: #DC143C;
  border-color: #DC143C;
}

.reco-picker-label {
  flex: 1;
}

.reco-picker-label-title {
  font-weight: 600;
  color: #333;
  font-size: 0.9375rem;
}

.reco-picker-label-subtitle {
  font-size: 0.8125rem;
  color: #888;
  margin-top: 0.125rem;
}

.reco-picker-chevron {
  color: #999;
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.reco-picker-chevron.expanded {
  transform: rotate(180deg);
}

.reco-picker-count {
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.reco-picker-count.complete {
  background: #e9f7ef;
  color: #2ecc71;
}

.reco-picker-count.incomplete {
  background: #fff3cd;
  color: #856404;
}

/* Picker Content */
.reco-picker-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.reco-picker-content.expanded {
  max-height: 600px;
  overflow-y: auto;
}

.reco-picker-content.always-visible {
  max-height: none;
}

.reco-picker-inner {
  padding: 1rem;
  border-top: 1px solid #e0e0e0;
}

.reco-picker-search {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.reco-picker-search:focus {
  outline: none;
  border-color: #DC143C;
}

/* Recommendation Grid */
.reco-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.25rem;
}

.reco-picker-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  min-height: 0;
}

.reco-picker-card:hover {
  border-color: #DC143C;
  background: #fafafa;
}

.reco-picker-card.selected {
  border-color: #DC143C;
  background: #fff0f5;
}

.reco-picker-card-check {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0.625rem;
  color: white;
  background: white;
  z-index: 1;
}

.reco-picker-card.selected .reco-picker-card-check {
  background: #DC143C;
  border-color: #DC143C;
}

/* Cover Image */
.reco-picker-card-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 0.375rem;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.375rem;
}

.reco-picker-card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reco-picker-card-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #ccc;
}

.reco-picker-card-cover-placeholder svg {
  width: 32px;
  height: 32px;
}

/* Card Info */
.reco-picker-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.reco-picker-card-type {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #888;
}

/* Small type icon (matches category filter buttons) */
.reco-type-icon-small,
.reco-picker-card-type svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
}

.reco-picker-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-right: 0;
}

.reco-picker-card-why {
  font-size: 0.6875rem;
  color: #666;
  font-style: italic;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.125rem;
}

.reco-picker-empty {
  text-align: center;
  padding: 2rem;
  color: #888;
}

.reco-picker-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* =========================================
   SELECTED RECOMMENDATIONS WITH EDITABLE WHY
   ========================================= */

.selected-recos-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.selected-recos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.selected-recos-title {
  font-weight: 600;
  color: #333;
  font-size: 0.9375rem;
}

.selected-recos-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.selected-recos-badge.complete {
  background: #e9f7ef;
  color: #2ecc71;
}

.selected-recos-badge.incomplete {
  background: #fff3cd;
  color: #856404;
}

/* Selected Recommendation Card */
.selected-reco-card {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 0.625rem;
  margin-bottom: 0.625rem;
  overflow: hidden;
}

.selected-reco-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  background: white;
  border-bottom: 1px solid #e0e0e0;
}

.selected-reco-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.selected-reco-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.selected-reco-type-icon svg {
  width: 18px;
  height: 18px;
  color: #DC143C;
}

.selected-reco-title {
  font-weight: 600;
  color: #333;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-reco-remove {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.selected-reco-remove:hover {
  background: #fdecea;
  color: #e74c3c;
}

/* Editable Why Section */
.selected-reco-why {
  padding: 0.625rem 0.75rem;
}

.selected-reco-why-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.375rem;
}

.selected-reco-why-input {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-family: inherit;
  resize: vertical;
  min-height: 50px;
  transition: all 0.2s ease;
  background: white;
}

.selected-reco-why-input:focus {
  outline: none;
  border-color: #DC143C;
  box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.1);
}

.selected-reco-why-input::placeholder {
  color: #aaa;
  font-style: italic;
}

.selected-reco-why-modified {
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  color: #DC143C;
  font-weight: 500;
}

/* Requirement Warning */
.reco-requirement-warning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 0.375rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #856404;
}

/* =========================================
   ACTION BUTTONS
   ========================================= */

.add-friend-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.add-friend-btn-cancel,
.add-friend-btn-primary {
  flex: 1;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-friend-btn-cancel {
  background: white;
  color: #666;
  border: 1px solid #e0e0e0;
}

.add-friend-btn-cancel:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.add-friend-btn-primary {
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  color: white;
  border: none;
}

.add-friend-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.add-friend-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.add-friend-btn-primary .btn-arrow {
  transition: transform 0.2s ease;
}

.add-friend-btn-primary:hover:not(:disabled) .btn-arrow {
  transform: translateX(3px);
}

.add-friend-btn-primary .spinner {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: white;
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */

@media (max-width: 480px) {
  .add-friend-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .add-friend-modal {
    border-radius: 1rem 1rem 0 0;
    max-height: 95vh;
    animation: mobileSlideUp 0.3s ease;
  }

  @keyframes mobileSlideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .add-friend-subtitle {
    padding-left: 0;
  }

  .reco-picker-grid {
    gap: 0.375rem;
  }

  .reco-picker-card {
    padding: 0.375rem;
  }

  .reco-picker-card-title {
    font-size: 0.6875rem;
  }

  .reco-picker-card-why {
    font-size: 0.625rem;
    -webkit-line-clamp: 1;
  }

  .add-friend-actions {
    flex-direction: column-reverse;
  }

  .add-friend-btn-cancel,
  .add-friend-btn-primary {
    width: 100%;
  }

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

  .user-preview-info {
    text-align: center;
  }

  .user-preview-email {
    white-space: normal;
    word-break: break-all;
  }
}
/* Center the profile header */
.my-trboo .my-trboo-welcome-section .my-trboo-welcome-header {
  justify-content: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Profile icon styling in header */
.profile-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.profile-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent-color);
  display: block;
  vertical-align: middle;
}

.your-stats-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.your-stats-header {
  margin-bottom: 1.25rem;
}

.your-stats-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.your-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.your-stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  min-height: 120px;
}

.your-stat-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.your-stat-icon {
  font-size: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary, #333);
}

.your-stat-icon svg {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.your-stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.your-stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.your-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

@media (max-width: 768px) {

  .your-stats-section {
    padding: 1rem;
  }

  .your-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .your-stat-item {
    padding: 0.875rem;
    min-height: 110px;
  }

  .your-stat-icon {
    font-size: 1.5rem;
  }
  
  .your-stat-icon svg {
    width: 1.5rem;
    height: 1.5rem;
  }

  .your-stat-value {
    font-size: 1.5rem;
  }
  
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .profile-actions {
    flex-direction: column;
  }
  
  .profile-actions button {
    width: 100%;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.profile-card {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.profile-avatar-container {
  position: relative;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 2.5rem;
}

.profile-avatar-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.change-picture-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #DC143C;
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 1.25rem;
}

.profile-info {
  flex: 1;
}

.profile-header h3 {
  color: #333;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.profile-header p {
  color: #666;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #333;
  font-size: 0.875rem;
}

.profile-input {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
  font-family: inherit;
}

.profile-input:focus {
  outline: none;
  border-color: #DC143C;
}

.profile-input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.helper-text {
  color: #999;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.picture-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 0.5rem;
}

.picture-preview-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
}

.remove-picture-btn {
  padding: 0.5rem 1rem;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
}

.remove-picture-btn:hover {
  background: #cc0000;
}

.upload-error {
  color: #ff4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.save-button:disabled,
.cancel-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.profile-input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

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

.edit-button,
.save-button,
.cancel-button {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.edit-button {
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  color: white;
}

.edit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.save-button {
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  color: white;
}

.save-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.cancel-button {
  background: #f5f5f5;
  color: #666;
}

.cancel-button:hover {
  background: #e0e0e0;
}

.admin-link {
  margin-top: 1rem;
}

.admin-link-button {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #111 0%, #444 100%);
  color: white;
  border: none;
  border-radius: 0.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.admin-link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  background: linear-gradient(135deg, #222 0%, #555 100%);
}

.profile-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.logout-button {
  width: 100%;
  padding: 0.75rem;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.logout-button:hover {
  background: #cc0000;
}

.language-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.language-section h3 {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.language-selector {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.language-option {
  flex: 1;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.75rem;
  background: white;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.language-option:hover {
  border-color: #DC143C;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.language-option.active {
  border-color: #DC143C;
  background: linear-gradient(135deg, #DC143C15 0%, #B2222215 100%);
  color: #DC143C;
}

.categories-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.categories-section h3 {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.category-toggle {
  cursor: pointer;
}

.category-toggle input {
  display: none;
}

.category-card {
  border: 2px solid #e0e0e0;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s;
  background: white;
}

.category-card.disabled {
  opacity: 0.5;
  background: #f5f5f5;
}

.category-card.enabled {
  border-color: #DC143C;
  background: linear-gradient(135deg, #DC143C15 0%, #B2222215 100%);
}

.category-toggle input:checked + .category-card {
  border-color: #DC143C;
  background: linear-gradient(135deg, #DC143C15 0%, #B2222215 100%);
}

.category-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.category-label {
  font-size: 0.875rem;
  color: #333;
  font-weight: 600;
}

.email-preferences-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.email-preferences-section h3 {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.email-preferences-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.email-preference-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.email-preference-item:hover {
  border-color: #DC143C;
  background: #fff;
}

.email-preference-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #DC143C;
}

.email-preference-item:has(input[type="checkbox"]:checked) {
  border-color: #DC143C;
  background: linear-gradient(135deg, #DC143C15 0%, #B2222215 100%);
}

.email-preference-label {
  font-size: 1rem;
  color: #333;
  font-weight: 500;
  flex: 1;
}
.dashboard {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  background: var(--bg-secondary);
  position: relative;
}

.dashboard-main {
  flex: 1;
  padding: var(--spacing-xl);
  padding-bottom: calc(var(--spacing-xl) + 80px); /* Add space for bottom nav */
  overflow-y: auto;
  background: var(--bg-secondary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(118, 75, 162, 0.03) 0px, transparent 50%);
}

@media (max-width: 768px) {
  .dashboard-main {
    padding: var(--spacing-md);
    padding-top: var(--spacing-md);
    padding-bottom: calc(var(--spacing-md) + 80px); /* Add space for bottom nav */
  }
}

/* Desktop: Keep normal layout */

@media (min-width: 769px) {
  .dashboard-main {
    padding-top: var(--spacing-xl);
    padding-bottom: calc(var(--spacing-xl) + 70px); /* Slightly less space on desktop */
  }
}

.admin-stats {
  padding: 1.5rem;
}

.admin-stats h2 {
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
  color: #111;
}

.admin-stats-subtitle {
  margin: 0;
  color: #555;
}

.admin-stats-warning {
  margin-top: 0.75rem;
  color: #b22222;
  font-weight: 600;
}

.admin-stats-header {
  margin-bottom: 1.5rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.admin-stats-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
}

.admin-stats-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.admin-stats-label {
  margin: 0;
  font-weight: 700;
  color: #222;
}

.admin-stats-subtext {
  margin: 0.1rem 0 0;
  color: #666;
  font-size: 0.9rem;
}

.admin-stats-growth {
  font-weight: 700;
  font-size: 1rem;
}

.admin-stats-growth.positive {
  color: #0f9d58;
}

.admin-stats-growth.negative {
  color: #d93025;
}

.admin-stats-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-stats-total {
  font-size: 2rem;
  font-weight: 800;
  color: #111;
}

.admin-stats-secondary {
  margin: 0;
  color: #444;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.admin-stats-secondary-label {
  font-size: 0.9rem;
  color: #666;
}

.admin-stats-placeholder {
  margin: 0;
  color: #444;
}

.admin-stats-ranking {
  margin-top: 2rem;
}

.admin-stats-ranking-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 1rem;
}

.admin-stats-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-stats-ranking-item {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-stats-ranking-position {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.admin-stats-ranking-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-stats-ranking-name {
  font-weight: 600;
  color: #222;
  font-size: 1rem;
}

.admin-stats-ranking-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

.admin-stats-ranking-detail-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-stats-ranking-icon {
  color: #667eea;
  flex-shrink: 0;
  width: 18px !important;
  height: 18px !important;
}

.admin-stats-ranking-value {
  font-weight: 600;
  color: #333;
  min-width: 1.5em;
  text-align: right;
}

.admin-stats-ranking-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: #667eea;
  flex-shrink: 0;
}

.admin-stats-emails {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.admin-stats-emails-label {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: #444;
  font-size: 0.9rem;
}

.admin-stats-emails-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
}

.admin-stats-email {
  word-break: break-all;
}

.admin-stats-invited {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.admin-stats-invited .admin-stats-emails-label {
  color: #888;
}

.admin-stats-invited .admin-stats-emails-list {
  color: #999;
}

.admin-stats-chart {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.admin-stats-chart-label {
  font-weight: 600;
  color: #444;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.admin-stats-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  height: 150px;
  padding: 0.5rem 0;
}

.admin-stats-chart-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.admin-stats-chart-bar-wrapper {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}

.admin-stats-chart-bar {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: opacity 0.2s;
  min-height: 4px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.25rem;
}

.admin-stats-chart-bar:hover {
  opacity: 0.8;
}

.admin-stats-chart-bar-value {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-stats-chart-bar-label {
  font-size: 0.7rem;
  color: #666;
  margin-top: 0.5rem;
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  background: var(--bg-secondary);
  position: relative;
}

.dashboard-main {
  flex: 1;
  padding: var(--spacing-xl);
  padding-bottom: calc(var(--spacing-xl) + 80px); /* Add space for bottom nav */
  overflow-y: auto;
  background: var(--bg-secondary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(118, 75, 162, 0.03) 0px, transparent 50%);
}

@media (max-width: 768px) {
  .dashboard-main {
    padding: var(--spacing-md);
    padding-top: var(--spacing-md);
    padding-bottom: calc(var(--spacing-md) + 80px); /* Add space for bottom nav */
  }
}

/* Desktop: Keep normal layout */
@media (min-width: 769px) {
  .dashboard-main {
    padding-top: var(--spacing-xl);
    padding-bottom: calc(var(--spacing-xl) + 70px); /* Slightly less space on desktop */
  }
}
.pwa-install-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 400px;
  width: calc(100% - 40px);
  animation: slideUp 0.3s ease-out;
}

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

.pwa-install-content {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-install-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.pwa-install-text {
  flex: 1;
}

.pwa-install-text h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.pwa-install-text p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.pwa-install-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.pwa-install-btn,
.pwa-dismiss-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.pwa-install-btn {
  background: #007bff;
  color: white;
}

.pwa-install-btn:hover {
  background: #0056b3;
}

.pwa-dismiss-btn {
  background: transparent;
  color: #666;
}

.pwa-dismiss-btn:hover {
  background: #f0f0f0;
}

@media (max-width: 480px) {
  .pwa-install-content {
    flex-direction: column;
    text-align: center;
  }

  .pwa-install-buttons {
    width: 100%;
  }

  .pwa-install-btn,
  .pwa-dismiss-btn {
    width: 100%;
  }
}

.pwa-update-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  max-width: 90%;
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.pwa-update-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid #e0e0e0;
}

.pwa-update-icon {
  font-size: 32px;
  text-align: center;
}

.pwa-update-text {
  text-align: center;
}

.pwa-update-text h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.pwa-update-text p {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.pwa-update-buttons {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.pwa-update-btn {
  flex: 1;
  padding: 12px 24px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.pwa-update-btn:hover:not(:disabled) {
  background: #0056b3;
}

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

.pwa-update-dismiss-btn {
  flex: 1;
  padding: 12px 24px;
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.pwa-update-dismiss-btn:hover:not(:disabled) {
  background: #f5f5f5;
}

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

/* Mode sombre */
@media (prefers-color-scheme: dark) {
  .pwa-update-content {
    background: #2d2d2d;
    border-color: #444;
  }

  .pwa-update-text h3 {
    color: #fff;
  }

  .pwa-update-text p {
    color: #ccc;
  }

  .pwa-update-dismiss-btn {
    color: #ccc;
    border-color: #555;
  }

  .pwa-update-dismiss-btn:hover:not(:disabled) {
    background: #3d3d3d;
  }
}

:root {
  /* Primary Colors */
  --primary-gradient: linear-gradient(135deg, #FF4444 0%, #B22222 100%);
  --primary-color: #DC143C;
  --primary-dark: #B22222;
  --primary-light: #ffe0e0;
  
  /* Secondary Colors */
  --secondary-color: #B22222;
  --accent-color: #ff6b6b;
  --success-color: #4caf50;
  --warning-color: #ffc107;
  --error-color: #ff4444;
  
  /* Neutral Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-tertiary: #999;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f5f5f5;
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --shadow-primary: 0 4px 16px rgba(220, 20, 60, 0.24);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Better touch targets for mobile */
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

button {
  touch-action: manipulation;
  font-family: inherit;
}

#root {
  width: 100%;
  min-height: 100vh;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Mobile-first enhancements */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.5;
  }

  button,
  .btn,
  [role="button"],
  input[type="button"],
  input[type="submit"],
  input[type="reset"] {
    min-height: 44px; /* Better touch target */
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 1rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  button,
  .btn,
  [role="button"],
  input[type="button"],
  input[type="submit"],
  input[type="reset"] {
    min-height: 48px;
    padding: 1rem 1.125rem;
  }
}
