:root {
  --ios-background: #f2f2f7;
  --ios-card: #ffffff;
  --ios-blue: #007aff;
  --ios-red: #ff3b30;
  --ios-gray: #8e8e93;
  --ios-light-gray: #e5e5ea;
  --ios-green: #34c759;
  --ios-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

#app {
  width: 375px;
  height: 812px;
  background-color: var(--ios-background);
  overflow: hidden;
  position: relative;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  min-width: 375px; /* Prevent shrinking below this width */
  min-height: 812px; /* Prevent shrinking below this height */
  transform-origin: center;
  margin: 0 auto; /* Center the app */
}

/* Profile Action Buttons */
.profile-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

.profile-button {
  padding: 10px 15px;
  background-color: white;
  color: black;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  text-align: center;
}

.profile-button:hover {
  background-color: #f5f5f5;
}

.profile-button:active {
  transform: scale(0.98);
}

/* Authentication view styles */
.auth-view {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.app-container {
  width: 375px;
  height: 812px;
  background-color: #000;
  overflow: hidden;
  position: relative;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px 30px;
  margin-bottom: 60px;
}

.logo-container {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  font-size: 80px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
}

.tagline {
  font-size: 20px;
  color: white;
  opacity: 0.8;
  font-weight: 300;
  margin-bottom: 10px;
}

.emphasis {
  font-weight: 700;
}

.auth-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.3s ease;
}

.auth-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--ios-gray);
  font-size: 18px;
  font-weight: 600;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-btn.active {
  color: white;
  border-bottom: 2px solid var(--ios-blue);
}

.submit-btn {
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  border: none;
  background-color: var(--ios-blue);
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.submit-btn:hover {
  background-color: #0066cc;
}

.footer {
  text-align: center;
  color: var(--ios-gray);
  font-size: 14px;
  margin-top: 60px;
}

/* Profile action buttons */
.profile-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.profile-button {
  padding: 10px 15px;
  background-color: white;
  color: black;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
  text-align: center;
}

.logout-button {
  background-color: var(--ios-red);
  color: white;
}

.error-message {
  color: var(--ios-red);
  font-size: 14px;
  margin-top: 5px;
  display: block;
}

/* Friend Code Popup */
.friend-code-popup {
  text-align: center;
}

.friend-code-display {
  margin: 20px 0;
}

.friend-code-value {
  font-family: monospace;
  letter-spacing: 2px;
  font-size: 28px;
  font-weight: 600;
  color: var(--ios-blue);
  background-color: rgba(0, 122, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  display: inline-block;
  margin: 0;
}

/* Copy Notification */
.copy-notification {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(52, 199, 89, 0.9); /* iOS green with opacity */
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  85% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

.friend-code {
  font-size: 14px;
  color: #007aff;
  text-align: center;
  letter-spacing: 0.5px;
  margin: 5px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

.friend-code-container {
  background-color: var(--ios-background);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  margin: 15px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.friend-code-label {
  font-size: 16px;
  color: var(--ios-gray);
  margin-bottom: 5px;
}

.friend-code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

/* For the smaller "No code available" display */
.no-code {
  font-size: 14px;
  color: #8e8e93;
  text-align: center;
  font-style: italic;
}

.friend-code-value {
  letter-spacing: 2px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ios-blue);
  background-color: white;
  padding: 10px;
  border-radius: 8px;
  margin: 0;
}

/* Use this for the title above the code */
.about-me-title {
  font-size: 16px;
  color: #8e8e93;
  margin-bottom: 8px;
  text-align: center;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--ios-font);
  background-color: #222;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

#app {
  width: 375px;
  height: 812px;
  background-color: var(--ios-background);
  overflow: hidden;
  position: relative;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background-color: var(--ios-card);
  font-size: 12px;
  color: var(--ios-gray);
  z-index: 10;
}

.status-icons {
  display: flex;
  align-items: center;
}

.signal-icon {
  margin-right: 10px;
}

.app-header {
  padding: 20px 15px;
  background-color: var(--ios-card);
  border-bottom: 1px solid var(--ios-light-gray);
  z-index: 10;
}

.app-header h1 {
  font-size: 27px;
  font-weight: bold;
  text-align: left;
  margin-bottom: 5px;
  margin-left: 10px;
}

.edit-profile-btn:hover,
.small-button:hover,
.add-button:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  filter: brightness(1.05);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Tab Content */
.tab-content {
  height: calc(100% - 98px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 60px;
  position: absolute;
  top: 105px; /* Height of status bar + app header */
  left: 0;
  right: 0;
  bottom: 60px; /* Height of tab bar */
}

.calendar-container {
  padding: 15px;
  background-color: var(--ios-card);
  margin: 15px;
  border-radius: 10px;
}

.popup-container {
  z-index: 200;
}

.filter-container select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--ios-light-gray);
  border-radius: 8px;
  appearance: none;
  background-color: var(--ios-background);
  margin-bottom: 15px;
}

.add-button {
  width: 100%;
  padding: 12px;
  background-color: var(--ios-blue);
  color: white;
  border: none;
  border-radius: 10px;
  margin-bottom: 15px;
  font-weight: bold;
  cursor: pointer; /* FIX #3: Ensure cursor shows it's clickable */
  transition: background-color 0.2s;
}

.add-button:hover {
  background-color: #0066cc; /* Darker blue on hover */
}

.month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.month-nav span {
  color: var(--ios-blue);
  cursor: pointer;
}

.calendar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 5px;
}

.calendar th {
  color: var(--ios-gray);
  font-size: 12px;
  padding-bottom: 10px;
}

.calendar td {
  text-align: center;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
}

.calendar td.has-entry {
  background-color: var(--ios-blue);
  color: white;
}

.calendar td.is-today {
  background-color: var(--ios-light-gray);
  font-weight: bold;
}

.calendar td.is-favorite {
  background-color: var(--ios-red);
  color: white;
}

.popup-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

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

.popup-content {
  background-color: var(--ios-card);
  width: 90%;
  max-width: 350px;
  padding: 20px;
  border-radius: 15px;
  text-align: left;
  max-height: 90vh;
  overflow-y: auto;
}
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  position: relative;
}
.popup-header h3 {
  font-weight: bold;
  color: var(--ios-blue);
}

.popup-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.favorite-toggle {
  font-size: 24px;
  cursor: pointer;
  margin-right: 10px;
  /* Add z-index to ensure it's clickable */
  position: relative;
  z-index: 15;
}

.popup-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.popup-content p {
  margin-bottom: 10px;
}

.popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.popup-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer; /* FIX #3: Ensure cursor shows it's clickable */
}

.primary-button {
  background-color: var(--ios-blue);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: bold;
  cursor: pointer; /* FIX #3: Ensure cursor shows it's clickable */
}

.secondary-button {
  background-color: var(--ios-light-gray);
  color: var(--ios-gray);
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: bold;
  cursor: pointer; /* FIX #3: Ensure cursor shows it's clickable */
}

.danger-button {
  background-color: var(--ios-red);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: bold;
  cursor: pointer; /* FIX #3: Ensure cursor shows it's clickable */
}

.full-width-button {
  width: 100%;
  padding: 12px;
  background-color: var(--ios-blue);
  color: white;
  border: none;
  border-radius: 10px;
  margin-top: 15px;
  font-weight: bold;
  cursor: pointer; /* FIX #3: Ensure cursor shows it's clickable */
}

.small-button {
  padding: 5px 10px;
  background-color: var(--ios-blue);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer; /* FIX #3: Ensure cursor shows it's clickable */
}

/* Fix for buttons to ensure they're properly clickable */
.secondary-button,
.danger-button,
.primary-button {
  position: relative;
  z-index: 10;
  cursor: pointer !important;
  pointer-events: auto !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Add active state for better user feedback */
.secondary-button:active,
.danger-button:active,
.primary-button:active,
.favorite-toggle:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.edit-button {
  position: relative;
  z-index: 15;
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* FIX #4: Style for Edit Profile button in profile header */
.edit-profile-btn {
  position: absolute !important;
  top: 15px;
  right: 15px;
  z-index: 15;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--ios-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--ios-light-gray);
  border-radius: 8px;
}

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

.uploaded-image {
  max-width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.form-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
}

.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  z-index: 10;
  border-top: 1px solid var(--ios-light-gray);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  opacity: 0.5;
}

.tab-item.active {
  opacity: 1;
  color: var(--ios-blue);
}

.tab-item span {
  font-size: 24px;
  margin-bottom: 5px;
}

.tab-item small {
  font-size: 10px;
  color: var(--ios-gray);
}

/* Profile page specific styles */
.profile-container {
  padding: 15px;
  overflow-y: auto;
  height: calc(100% - 15px);
  padding-bottom: 70px;
}

.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  background-color: var(--ios-card);
  padding: 15px;
  border-radius: 15px;
  position: relative; /* FIX #4: For positioning the edit button */
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
  flex-shrink: 0; /* Prevent shrinking */
  position: relative; /* Add positioning context */
  background-color: var(--ios-light-gray);
}

.profile-avatar img {
  position: absolute; /* Take image out of normal flow */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-info {
  flex: 1;
  padding-right: 70px; /* FIX #4: For positioning the edit button */
}

.profile-info h2 {
  margin-bottom: 5px;
}

.profile-info p {
  color: var(--ios-gray);
  font-size: 14px;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  background-color: var(--ios-card);
  padding: 15px;
  border-radius: 15px;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 20px;
  font-weight: bold;
}

.stat-number.clickable {
  cursor: pointer;
}

.stat-label {
  color: var(--ios-gray);
  font-size: 12px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 10px 0;
}

.section-title h3 {
  font-size: 16px;
  font-weight: 600;
}

.friends-list {
  background-color: var(--ios-card);
  border-radius: 15px;
  padding: 10px;
}

.friend-card {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--ios-light-gray);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.friend-card:hover {
  background-color: var(--ios-background);
}

.friend-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 15px;
  height: 100%;
  width: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' stroke='%238E8E93' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 15px;
  opacity: 0.5;
}

.friend-card:hover::after {
  opacity: 1;
}

.friend-card:last-child {
  border-bottom: none;
}

.friend-card img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover; /* FIX #5: Ensure images display properly */
}

.friend-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.friend-name {
  font-weight: 600;
}

.friend-status {
  font-size: 12px;
}

.friend-status.online {
  color: var(--ios-green);
}

.friend-status.away {
  color: orange;
}

.friend-status.offline {
  color: var(--ios-gray);
}

.small-button,
.add-button,
.friend-tag-item,
.primary-button,
.secondary-button {
  position: relative;
  z-index: 10;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Active state feedback */
.edit-profile-btn:active,
.small-button:active,
.add-button:active,
.friend-tag-item:active,
.primary-button:active,
.secondary-button:active {
  transform: scale(0.95);
  opacity: 0.9;
}
.recent-entries {
  background-color: var(--ios-card);
  border-radius: 15px;
  padding: 10px;
}

.entry-card {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--ios-light-gray);
  cursor: pointer;
}

.entry-card:last-child {
  border-bottom: none;
}

.entry-image {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  margin-right: 15px;
}

.entry-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.entry-title {
  font-weight: 600;
}

.entry-location {
  font-size: 14px;
  color: var(--ios-gray);
}

.entry-rating {
  color: #ffcc00;
  font-size: 12px;
}

.entry-date {
  font-size: 12px;
  color: var(--ios-gray);
  margin-bottom: 4px;
}

.empty-state {
  padding: 20px;
  text-align: center;
  color: var(--ios-gray);
}

.avatar-upload {
  display: flex;
  align-items: center;
  gap: 15px;
}

.edit-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.coming-soon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
}

.coming-soon-container h2 {
  color: var(--ios-blue);
  margin-bottom: 15px;
}

.coming-soon-container p {
  color: var(--ios-gray);
}

/* Friend Profile View Styles */
.large-profile-picture {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px auto;
  /* Add these properties */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ios-light-gray);
}
.large-profile-picture img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
}

.friend-profile-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 0;
}

.friend-bio-section {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

.friend-bio-section h4 {
  margin-bottom: 10px;
  color: var(--ios-gray);
}

.empty-bio {
  font-style: italic;
  color: var(--ios-gray);
}

.friend-status-badge {
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  margin-bottom: 20px;
}

.friend-status-badge.online {
  background-color: var(--ios-green);
  color: white;
}

.friend-status-badge.away {
  background-color: orange;
  color: white;
}

.friend-status-badge.offline {
  background-color: var(--ios-gray);
  color: white;
}

.shared-memories {
  width: 100%;
}

.shared-memories h4 {
  margin-bottom: 10px;
  color: var(--ios-gray);
}

.shared-entries-list {
  max-height: 200px;
  overflow-y: auto;
}

.shared-entry-card {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: var(--ios-background);
  border-radius: 10px;
  margin-bottom: 10px;
}

.close-button {
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

/* Friend Tagging Styles */
.friends-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.friend-tag-item {
  padding: 5px 10px;
  background-color: var(--ios-light-gray);
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.friend-tag-item.selected {
  background-color: var(--ios-blue);
  color: white;
}

.tagged-friends {
  margin-top: 15px;
  border-top: 1px solid var(--ios-light-gray);
  padding-top: 15px;
}

.tagged-friends-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.tagged-friend {
  padding: 5px 10px;
  background-color: var(--ios-blue);
  color: white;
  border-radius: 15px;
  font-size: 12px;
}

/* Form help text */
.form-help-text {
  font-size: 12px;
  color: var(--ios-gray);
  margin-top: 5px;
  font-style: italic;
}

/* Fix any image loading errors */
img {
  transition: opacity 0.3s;
}

img[src=""] {
  opacity: 0;
}

.logout-container {
  margin-top: 10px;
  margin-bottom: 20px;
  padding: 0 15px;
  width: 100%; /* Ensure it takes full width */
}

.logout-container .full-width-button {
  width: 100%;
  background-color: var(--ios-red);
}

/* Handle smaller screens better */
@media (max-width: 375px) {
  .popup-content {
    width: 95%;
    max-width: none;
  }

  .large-profile-picture {
    width: 120px;
    height: 120px;
  }
}

/* Friend Code System Styles */
.friend-code-section {
  margin-bottom: 15px;
  text-align: center;
}

.friend-profile-view .friend-code {
  letter-spacing: 1px;
  font-weight: 800;
  font-size: 16px;
  color: var(--ios-blue);
  background-color: rgba(0, 122, 255, 0.1);
  padding: 8px 15px;
  border-radius: 8px;
  margin: 10px 0;
  display: inline-block;
}

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

/* Image Input Styles */
.image-input-toggle {
  display: flex;
  margin-bottom: 10px;
  background-color: var(--ios-light-gray);
  border-radius: 8px;
  overflow: hidden;
}

.image-input-toggle span {
  flex: 1;
  text-align: center;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-input-toggle span.active {
  background-color: var(--ios-blue);
  color: white;
  font-weight: bold;
}

.error-text {
  color: var(--ios-red);
  font-size: 12px;
  margin-top: 5px;
}

/* Clickable Shared Memories */
.shared-entry-card.clickable {
  position: relative;
  padding-right: 40px;
  transition: all 0.2s ease;
}

.shared-entry-card.clickable:hover {
  background-color: rgba(0, 122, 255, 0.1); /* Light blue highlight */
}

.copy-code-button {
  background-color: var(--ios-blue);
  color: white;
  border: none;
  border-radius: 15px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-code-button:hover {
  background-color: #0066cc;
}

.copy-code-button:active {
  transform: scale(0.95);
}
.error-text {
  color: var(--ios-red);
  font-size: 14px;
  margin-top: 5px;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}

.view-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--ios-blue);
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 12px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.shared-entry-card.clickable:hover .view-indicator {
  opacity: 1;
}

/* Improved Accessibility */
.primary-button,
.secondary-button,
.danger-button,
.small-button,
.add-button,
.friend-tag-item {
  transition: all 0.2s ease;
}

input[type="url"]:focus,
input[type="text"]:focus,
textarea:focus,
select:focus {
  border-color: var(--ios-blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3);
}

/* Profile image preview */
.profile-image-preview {
  margin-top: 15px;
  text-align: center;
}

.profile-image-preview img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ios-light-gray);
}

/* CSS for Firefox, which has different styling for file inputs */
input[type="file"]::-moz-file-upload-button {
  background-color: var(--ios-blue);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

input[type="file"]::file-selector-button {
  background-color: var(--ios-blue);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 10px;
}

.feed-section {
  margin-bottom: 20px;
}

.feed-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ios-gray);
  margin: 10px 0 5px 10px;
}

.feed-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: 2px;
  padding: 0 10px 10px;
  background-color: var(--ios-card);
}

.feed-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.feed-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

/* gradient + text at bottom-left */
.feed-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
}

.feed-overlay h3 {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.feed-overlay span {
  display: block;
  font-size: 12px;
  opacity: 0.8;
}
