* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #FFC1CC;
  --secondary: #D7BDE2;
  --accent: #FFD700;
  --background: #FFF5F7;
  --text: #333333;
  --secondary-text: #8A8A8A;
  --border: #FFE4E9;
}

body {
  font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif;
  background-color: var(--background);
  color: var(--text);
  position: relative;
}

.cute-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><path fill="%23FFE4E9" fill-opacity="0.2" d="M25 10c-5 0-9 4-9 9 0 2 1 4 3 6l6 6 6-6c2-2 3-4 3-6 0-5-4-9-9-9z"/></svg>') repeat;
  z-index: -1;
}

.container {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  padding: 20px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: #FF66B2;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
  text-align: center;
  position: relative;
}

.logo::after {
  content: '✩';
  position: absolute;
  top: -10px;
  right: -20px;
  font-size: 20px;
  opacity: 0.5;
}

.post-form {
  background-color: #FFFFFF;
  padding: 20px;
  border-radius: 20px;
  border: 3px solid var(--primary);
  box-shadow: 0 6px 15px rgba(255, 193, 204, 0.3);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.post-form::before {
  content: '✩';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 30px;
  opacity: 0.3;
}

.post-form-header {
  display: flex;
  gap: 15px;
}

.user-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid var(--secondary);
  object-fit: cover;
  transition: transform 0.3s ease;
}

.user-avatar img:hover {
  transform: scale(1.1);
}

.post-form textarea {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 15px;
  padding: 15px;
  font-size: 16px;
  resize: none;
  min-height: 80px;
  background: linear-gradient(45deg, #FFF5F7, #F5F0FA);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
}

.post-form textarea:focus {
  outline: none;
  border-color: #FF99CC;
  box-shadow: 0 0 8px rgba(255, 153, 204, 0.5);
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.post-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.char-count {
  font-size: 12px;
  color: #FF66B2;
  background: #FFF5F7;
  padding: 4px 8px;
  border-radius: 10px;
}

.action-icon {
  background: none;
  border: none;
  color: #FF99CC;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.action-icon:hover {
  transform: scale(1.2);
}

.submit-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  font-size: 14px;
  color: var(--secondary-text);
  text-shadow: 0 1px rgba(0, 0, 0, 0.1);
}

.submit-btn {
  background: linear-gradient(45deg, #FFC1CC, #FF99CC);
  color: #FFFFFF;
  padding: 10px 25px;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.submit-btn::after {
  content: '🌸';
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.submit-btn:hover {
  background: linear-gradient(45deg, #FF99CC, #FF66B2);
  transform: scale(1.05);
}

.submit-btn:hover::after {
  opacity: 1;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-card {
  background-color: #FFFFFF;
  padding: 20px;
  border-radius: 20px;
  border: 2px solid var(--border);
  box-shadow: 0 6px 15px rgba(255, 193, 204, 0.2);
  position: relative;
  transition: transform 0.3s ease;
}

.post-card:hover {
  transform: translateY(-5px);
}

.post-card::before {
  content: '🌸';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 30px;
  opacity: 0.3;
}

.pinned-post {
  background-color: #FFF9E6;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

.pinned-label {
  display: inline-block;
  background: linear-gradient(45deg, var(--accent), #FFECB3);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
  text-shadow: 0 1px rgba(0, 0, 0, 0.2);
}

.post-header {
  display: flex;
  gap: 15px;
  align-items: center;
}

.post-meta {
  display: flex;
  flex-direction: column;
}

.username {
  font-weight: 700;
  font-size: 16px;
  color: #FF66B2;
}

.timestamp {
  font-size: 13px;
  color: var(--secondary-text);
}

.post-content {
  font-size: 15px;
  line-height: 1.6;
  margin: 12px 0;
  color: var(--text);
  padding-right: 10px;
}

.post-link {
  color: #FF99CC;
  text-decoration: none;
  transition: all 0.2s ease;
}

.post-link:hover {
  text-decoration: underline;
  color: #FF66B2;
  transform: scale(1.05);
  display: inline-block;
}

.post-image {
  max-width: 100%;
  border-radius: 15px;
  margin-top: 10px;
  border: 2px solid var(--secondary);
  object-fit: cover;
}

.post-actions {
  display: flex;
  gap: 30px;
  margin-top: 12px;
}

.post-actions .action-icon {
  color: #FF99CC;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.2s ease;
}

.post-actions .action-icon:hover {
  color: #FF66B2;
  transform: scale(1.2);
}

.post-replies {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.reply {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  padding: 8px;
  background-color: #FFF5F7;
  border-radius: 10px;
}

.reply-username {
  font-weight: 700;
  font-size: 14px;
  color: #FF99CC;
}

.reply-content {
  font-size: 13px;
  color: var(--text);
}

.reply-timestamp {
  font-size: 12px;
  color: var(--secondary-text);
}

.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(45deg, #FFC1CC, #FF99CC);
  color: #FFFFFF;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 193, 204, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  z-index: 1000; /* 最前面に */
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: linear-gradient(45deg, #FF99CC, #FF66B2);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  main {
    padding: 15px;
  }
  .post-form,
  .post-card {
    padding: 15px;
  }
  .user-avatar img {
    width: 40px;
    height: 40px;
  }
  .post-form textarea {
    font-size: 14px;
  }
  .reply {
    font-size: 12px;
    padding: 6px;
  }
  .post-content {
    font-size: 14px;
  }
  .scroll-to-top {
    padding: 10px 15px;
    font-size: 12px;
  }
}