/* プロフィールページ専用スタイル */

.profile-content {
  max-width: 900px;
  margin: 0 auto;
}

/* ユーザー情報カード */
.profile-info-section {
  margin-bottom: 2rem;
}

.profile-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: bold;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.profile-card h2 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.user-email {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--bg-secondary);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* タブメニュー */
.profile-tabs {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tab-buttons {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 2px solid #e0e0e0;
}

.tab-button {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-button.active {
  color: var(--primary-color);
  background: white;
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
}

.tab-button:hover:not(.active) {
  background: rgba(102, 126, 234, 0.1);
}

.tab-content {
  display: none;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

.tab-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--bg-secondary);
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

/* 履歴リスト */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item-detail {
  background: var(--bg-secondary);
  border-radius: 15px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.history-item-detail:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.history-date-detail {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.history-slot-badge {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1.1rem;
}

.history-perfume-info {
  margin-bottom: 1rem;
}

.history-perfume-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.history-perfume-brand {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.history-reason {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.history-context {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.context-badge {
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* お気に入りリスト */
.favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.favorite-card {
  background: var(--bg-secondary);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.favorite-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.favorite-slot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 1rem;
}

.favorite-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.favorite-brand {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.favorite-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 設定セクション */
.settings-container {
  max-width: 600px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 15px;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.setting-item:hover {
  background: #e8eaf6;
}

.setting-item.danger:hover {
  background: #ffebee;
}

.setting-info {
  flex: 1;
}

.setting-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.setting-value {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.setting-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.btn-edit, .btn-danger {
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-edit {
  background: var(--primary-color);
  color: white;
}

.btn-edit:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-edit.disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #d32f2f;
  transform: translateY(-2px);
}

.setting-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 1rem 0;
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  transition: all 0.3s ease;
}

.modal-close:hover {
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
}

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

.btn-cancel, .btn-save {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

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

.btn-save:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input, .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--bg-secondary);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* アニメーション */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* レスポンシブ */
@media (max-width: 768px) {
  .profile-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

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

  .tab-buttons {
    flex-direction: row;
  }

  .tab-button {
    font-size: 0.85rem;
    padding: 0.75rem 0.5rem;
  }

  .favorites-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .btn-edit, .btn-danger {
    width: 100%;
  }
}

