/* === Profile Dashboard === */

.profile-body {
  flex: 1; overflow-y: auto; padding: 24px 16px 48px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}

/* === Hero === */
.profile-hero {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding-bottom: 8px;
}
.profile-hero img {
  width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent-mid);
}
.profile-hero-name {
  font-size: 22px; font-weight: 700; color: var(--accent-dark);
}
.profile-hero-sub {
  font-size: 13px; color: var(--gray-text); text-align: center;
}

/* === Card === */
.profile-card {
  width: 100%; max-width: 460px;
  background: var(--card-bg); border-radius: 14px;
  box-shadow: var(--card-shadow);
}
.profile-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 10px; font-size: 14px; font-weight: 700;
  color: var(--accent-dark); border-bottom: 1px solid var(--gray-mid);
}
.profile-card-icon { font-size: 16px; }
.profile-card-badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--accent-light); color: var(--accent-dark);
  padding: 1px 8px; border-radius: 10px;
}
.profile-card-body { padding: 14px 16px 16px; }

/* === About You Card (form fields) === */
.profile-card .form-section { max-width: 100%; margin-bottom: 14px; }
.profile-card .form-section:last-child { margin-bottom: 0; }

/* === Special Dates === */
.special-date-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--gray-mid);
  font-size: 13px;
}
.special-date-item:last-child { border-bottom: none; }
.special-date-label { flex: 1; font-weight: 600; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.special-date-countdown {
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 10px; white-space: nowrap; flex-shrink: 0;
  background: var(--accent-light); color: var(--accent-dark);
}
.special-date-countdown.today {
  background: #fff3cd; color: #856404;
  animation: todayPulse 2s ease-in-out infinite;
}
@keyframes todayPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 8px rgba(133, 100, 4, 0.3); }
}
.special-date-date { font-size: 11px; color: var(--gray-text); flex-shrink: 0; }
.special-date-delete {
  background: none; border: none; color: var(--gray-text); cursor: pointer;
  font-size: 16px; padding: 0 2px; flex-shrink: 0; opacity: 0;
  transition: color 0.2s, opacity 0.15s;
}
.special-date-item:hover .special-date-delete { opacity: 1; }
.special-date-delete:hover { color: #ef5350; }

.special-dates-empty {
  font-size: 12px; color: var(--gray-text); font-style: italic; padding: 8px 0;
}

/* Add row */
.special-dates-add {
  display: flex; gap: 8px; margin-top: 12px; align-items: center;
}
.special-dates-add input[type="text"] {
  flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--gray-mid);
  border-radius: 8px; font-size: 13px; font-family: inherit; outline: none;
  transition: border-color 0.2s;
}
.special-dates-add input[type="date"] {
  padding: 7px 10px; border: 1px solid var(--gray-mid); border-radius: 8px;
  font-size: 13px; font-family: inherit; outline: none;
  background: var(--bg); color: var(--text); transition: border-color 0.2s;
}
.special-dates-add input:focus { border-color: var(--accent-mid); box-shadow: 0 0 0 3px var(--accent-glow); }
.special-dates-add-btn {
  padding: 7px 14px; border: none; border-radius: 8px;
  background: var(--accent-dark); color: white; font-size: 13px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background 0.2s;
}
.special-dates-add-btn:hover { background: var(--accent-mid); }

/* === Profile Memory List === */
.profile-memory-list { max-height: 340px; overflow-y: auto; }
.profile-memory-list .memory-category { margin-bottom: 12px; }
.profile-memory-list .memory-category-header {
  font-size: 11px; font-weight: 700; color: var(--gray-text);
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.profile-memory-list .memory-category-icon { font-size: 14px; }
.profile-memory-list .memory-item {
  display: flex; align-items: flex-start; gap: 6px; padding: 5px 0;
  border-bottom: 1px solid var(--gray-mid); font-size: 12px;
}
.profile-memory-list .memory-item:last-child { border-bottom: none; }
.profile-memory-list .memory-fact { flex: 1; color: var(--text); line-height: 1.4; opacity: 0.8; }
.profile-memory-list .memory-date { font-size: 10px; color: var(--gray-text); flex-shrink: 0; }
.profile-memory-list .memory-delete {
  background: none; border: none; color: var(--gray-text); cursor: pointer;
  font-size: 14px; padding: 0 2px; flex-shrink: 0; transition: color 0.2s; opacity: 0;
}
.profile-memory-list .memory-item:hover .memory-delete { opacity: 1; }
.profile-memory-list .memory-delete:hover { color: #ef5350; }
.profile-memory-empty {
  font-size: 12px; color: var(--gray-text); font-style: italic; padding: 8px 0;
}

/* === Stats Grid === */
.profile-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.profile-stat-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 8px; border-radius: 10px;
  background: var(--accent-pale); text-align: center;
}
.profile-stat-value {
  font-size: 22px; font-weight: 800; color: var(--accent-dark); line-height: 1.1;
}
.profile-stat-label {
  font-size: 11px; color: var(--gray-text); margin-top: 4px; font-weight: 500;
}

/* === Save Button === */
.profile-body .primary-btn { margin-top: 4px; }

/* === Dark Mode === */
[data-theme="dark"] .profile-hero-name { color: var(--accent-mid); }
[data-theme="dark"] .profile-card { background: var(--card-bg); box-shadow: var(--card-shadow); }
[data-theme="dark"] .profile-card-header { color: var(--accent-mid); border-bottom-color: var(--gray-mid); }
[data-theme="dark"] .profile-card-badge { background: var(--accent-light); color: var(--accent-mid); }
[data-theme="dark"] .special-date-countdown { background: var(--accent-light); color: var(--accent-mid); }
[data-theme="dark"] .special-date-countdown.today { background: #3a3520; color: #ffc107; }
[data-theme="dark"] .special-dates-add input[type="text"],
[data-theme="dark"] .special-dates-add input[type="date"] {
  background: #2a2a2a; color: var(--text); border-color: var(--gray-mid);
}
[data-theme="dark"] .profile-stat-tile { background: var(--accent-pale); }
[data-theme="dark"] .profile-stat-value { color: var(--accent-mid); }
[data-theme="dark"] .profile-memory-list .memory-fact { color: var(--text); }

/* === Responsive === */
@media (max-width: 600px) {
  .profile-body { padding: 16px 12px; gap: 16px; }
  .profile-card { border-radius: 12px; }
  .profile-stats-grid { gap: 8px; }
  .profile-stat-tile { padding: 10px 6px; }
  .profile-stat-value { font-size: 18px; }
  .special-dates-add { flex-wrap: wrap; }
  .special-dates-add input[type="text"] { flex: 1 1 100%; }
}

@media (min-width: 601px) and (max-width: 1024px) {
  .profile-body { max-width: 540px; margin: 0 auto; width: 100%; }
}
