.share-memory-page {
  max-width: 1000px;
  margin: auto;
  padding: 2rem 1rem 3rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Arial", sans-serif;
  color: #1a1a1a;
}

.share-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-bottom: 2px solid #e0e0e0;
}

.share-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.share-header p {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

.submission-section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #333;
  border-right: 4px solid #2c3e50;
  padding-right: 1rem;
}

.open-form-link {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.9rem 2rem;
  background: #2c3e50;
  color: white;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}

.open-form-link:hover {
  background: #3a4f64;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
}

.open-form-link:active {
  transform: translateY(0);
}

.memory-form-modal {
  width: min(92vw, 760px);
}

.memory-form {
  background: white;
  padding: 2.5rem;
  border-radius: 0.8rem;
  border: 1px solid #e0e0e0;
  margin-bottom: 0;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.4rem;
  font-size: 1rem;
  font-family: inherit;
  direction: rtl;
  text-align: right;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.rich-editor {
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem;
  border-bottom: 1px solid #ececec;
  background: #f7f9fc;
}

.toolbar-btn {
  border: 1px solid #d8dfe8;
  background: #fff;
  color: #2c3e50;
  border-radius: 0.35rem;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.toolbar-btn:hover {
  background: #ecf2f8;
}

.editor-surface {
  min-height: 220px;
  padding: 0.8rem;
  line-height: 1.7;
  direction: rtl;
  text-align: right;
}

.editor-surface:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(44, 62, 80, 0.12);
}

.editor-surface:empty::before {
  content: attr(data-placeholder);
  color: #9aa4b2;
}

.editor-surface img {
  max-width: 100%;
  border-radius: 0.4rem;
  margin: 0.35rem 0;
}

.form-group textarea {
  resize: vertical;
  line-height: 1.6;
}

.submit-button {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.submit-button:hover {
  background: #3a4f64;
  transform: translateY(-2px);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  min-height: 1.4rem;
  margin-top: 0.9rem;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.form-status.is-loading {
  color: #3b587a;
}

.form-status.is-success {
  color: #1d7a43;
}

.form-status.is-error {
  color: #9b1d1d;
}

.form-note {
  color: #999;
  font-size: 0.85rem;
  margin-top: 1rem;
}

.form-info {
  background: #e8f4f8;
  padding: 1.5rem;
  border-radius: 0.8rem;
  border-right: 4px solid #2c3e50;
}

.form-info h3 {
  margin-top: 0;
  color: #2c3e50;
}

.form-info p {
  margin-bottom: 0;
  color: #555;
  line-height: 1.6;
}

.posts-section {
  margin-bottom: 4rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.memory-post {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 0.8rem;
  padding: 2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-align: right;
}

.memory-post:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.post-date {
  display: inline-block;
  background: #e8f4f8;
  color: #2c3e50;
  padding: 0.5rem 1rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.memory-post h3 {
  margin: 1rem 0 0.5rem 0;
  font-size: 1.3rem;
  color: #333;
}

.memory-post h3 a {
  color: #2c3e50;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.memory-post h3 a:hover {
  border-bottom-color: #2c3e50;
}

.post-excerpt {
  color: #666;
  line-height: 1.6;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.read-more {
  display: inline-block;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid #2c3e50;
  border-radius: 0.4rem;
  transition: all 0.2s ease;
}

.read-more:hover {
  background: #2c3e50;
  color: white;
}

.no-posts {
  text-align: center;
  padding: 3rem 1rem;
  background: #f9f9f9;
  border-radius: 0.8rem;
}

.no-posts p {
  color: #999;
  font-size: 1.1rem;
  margin: 0;
}

.github-instructions {
  background: #f5f5f5;
  padding: 2rem;
  border-radius: 0.8rem;
  border-right: 4px solid #2c3e50;
}

.github-instructions h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.github-instructions h3 {
  font-size: 1.2rem;
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.github-instructions p {
  color: #666;
  line-height: 1.6;
  margin: 0.8rem 0;
}

.github-instructions a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
}

.github-instructions a:hover {
  text-decoration: underline;
}

.github-instructions ol {
  margin: 1rem 0;
  padding-right: 1.5rem;
}

.github-instructions li {
  margin: 0.8rem 0;
  color: #666;
  line-height: 1.6;
}

.github-instructions code {
  background: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  font-family: 'Courier New', monospace;
  color: #d73a49;
}

.github-instructions pre {
  background: #fff;
  padding: 1.5rem;
  border-radius: 0.8rem;
  overflow-x: auto;
  border: 1px solid #e0e0e0;
  direction: ltr;
  text-align: left;
}

.github-instructions pre code {
  color: #24292e;
  background: none;
  padding: 0;
}

.setup-note {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 0.4rem;
  border-left: 4px solid #ffc107;
  margin-top: 1.5rem;
}

.setup-note strong {
  color: #333;
}

@media (max-width: 720px) {
  .share-header h1 {
    font-size: 1.8rem;
  }

  .submission-steps {
    grid-template-columns: 1fr;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .github-instructions pre {
    font-size: 0.85rem;
  }
}
