/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
/* ========== レイアウト ========== */
body {
  background-color: #fff;
  color: #0f1419;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

.main-container {
  max-width: 600px;
  margin: 0 auto;
  border-left: 1px solid #eff3f4;
  border-right: 1px solid #eff3f4;
  min-height: 100vh;
}

/* ========== ヘッダー ========== */
.site-header {
  position: sticky;
  top: 0;
  background-color: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  padding: 14px 16px;
  border-bottom: 1px solid #eff3f4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.site-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f1419;
}

.btn-new-post {
  background-color: #1d9bf0;
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-new-post:hover {
  background-color: #1a8cd8;
}

.header-auth {
  font-size: 13px;
  color: #536471;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.header-auth a {
  color: #1d9bf0;
  text-decoration: none;
}

/* ========== 投稿カード ========== */
.post-card {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #eff3f4;
  cursor: pointer;
  transition: background-color 0.15s;
}

.post-card:hover {
  background-color: #f7f9f9;
}

.post-avatar img,
.post-avatar .avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #cfd9de;
  display: block;
}

.post-content {
  flex: 1;
  min-width: 0;
}

.post-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.post-username {
  font-weight: 700;
  color: #0f1419;
  text-decoration: none;
  font-size: 15px;
}

.post-username:hover {
  text-decoration: underline;
}

.post-time {
  color: #536471;
  font-size: 14px;
}

.post-body {
  font-size: 15px;
  line-height: 1.5;
  color: #0f1419;
  margin-bottom: 12px;
  word-break: break-word;
}

/* ========== アクションエリア ========== */
.post-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #536471;
  font-size: 13px;
}

.post-actions a {
  color: #536471;
  text-decoration: none;
}

.post-actions a:hover {
  color: #1d9bf0;
}

.action-comment {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========== いいねボタン ========== */
.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #536471;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.like-btn:hover {
  color: #f91880;
}

.like-btn.liked {
  color: #f91880;
}

/* ========== 編集・削除リンク ========== */
.post-edit { color: #536471; text-decoration: none; }
.post-edit:hover { color: #1d9bf0; }
.post-delete { color: #536471; text-decoration: none; }
.post-delete:hover { color: #f4212e; }

/* ========== プロフィールページ ========== */
.profile-banner {
  width: 100%;
  height: 130px;
  background-color: #cfd9de;
}

.profile-info {
  padding: 12px 16px 16px;
  border-bottom: 1px solid #eff3f4;
}

.profile-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  margin-top: -40px;
}

.profile-avatar img,
.profile-avatar .avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid white;
  background-color: #cfd9de;
  display: block;
}

.btn-edit-profile {
  border: 1px solid #cfd9de;
  border-radius: 9999px;
  padding: 7px 15px;
  font-size: 14px;
  font-weight: 700;
  color: #0f1419;
  text-decoration: none;
  margin-top: 10px;
  display: inline-block;
}

.btn-edit-profile:hover {
  background-color: #f7f9f9;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: #0f1419;
  margin-bottom: 2px;
}

.profile-handle {
  font-size: 14px;
  color: #536471;
  margin-bottom: 10px;
}

.profile-bio {
  font-size: 15px;
  color: #0f1419;
  margin: 0 0 12px;
  line-height: 1.5;
}

.profile-stats {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #536471;
}

.profile-stat {
  text-decoration: none;
  color: #536471;
}

.profile-stat:hover {
  text-decoration: underline;
}

.profile-stat strong {
  color: #0f1419;
}

.back-link {
  color: #536471;
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  color: #1d9bf0;
}

/* ========== プロフィール編集フォーム ========== */
.edit-field {
  margin-bottom: 20px;
}

.edit-label {
  display: block;
  font-size: 13px;
  color: #536471;
  margin-bottom: 6px;
}

.edit-input {
  width: 100%;
  border: 1px solid #cfd9de;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 15px;
  color: #0f1419;
  outline: none;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.1);
}

.edit-input:focus {
  border-color: #1d9bf0;
}
