.dynamics-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--background-color);
}

.dynamics-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
  padding-bottom: 70px; /* Add padding to avoid overlap with bottom nav */
}

.dynamic-card {
  background-color: var(--secondary-bg-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dynamic-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.dynamic-header .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.dynamic-header .username {
  font-weight: bold;
  flex-grow: 1;
}

.delete-dynamic-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
}
.dynamic-content p {
  margin: 0 0 10px;
}

.dynamic-actions {
  display: flex;
  justify-content: flex-start;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.dynamic-actions button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  margin-right: 20px;
}

.dynamic-actions button i {
  margin-right: 5px;
}

#post-dynamic-modal .modal-content {
  box-shadow: none;
  border: 1px solid var(--border-color);
}

#post-dynamic-modal .modal-content textarea {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  resize: vertical;
  background-color: var(--secondary-bg-color);
  color: var(--text-primary);
  font-size: 16px;
  min-height: 120px;
  box-sizing: border-box;
}

#post-dynamic-modal .modal-content textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.25);
}

/* .add-dynamic-btn 样式已迁移到 header.css 中的 .header-action-btn */
.comments-section {
  margin-top: 10px;
}

.comment {
  font-size: 14px;
  margin-bottom: 5px;
  color: var(--text-secondary);
}

.comment .username {
  font-weight: bold;
  color: var(--text-primary);
  margin-right: 5px;
}

.comment {
  position: relative;
  cursor: pointer;
}


.comment-actions {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  padding: 4px;
  display: none;
  z-index: 1500;
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(2px);
}

.comment-actions.show-actions {
  display: flex;
  gap: 4px;
}

.comment-actions button {
  background: none;
  border: none;
  color: white;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.comment-actions button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.comment-actions button:active {
  transform: scale(0.95);
}


/* Fullscreen Edit Modal - Copied from chat.css */
.fullscreen-edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-bg);
  display: flex;
  flex-direction: column;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.fullscreen-edit-header {
  background-color: var(--bg-secondary);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fullscreen-edit-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.fullscreen-edit-close {
  background: none;
  border: none;
  font-size: 1.125rem;
  color: var(--accent-blue);
  cursor: pointer;
  padding: 4px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-edit-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.fullscreen-edit-textarea {
  flex: 1;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  font-family: inherit;
  background-color: var(--input-bg);
  color: var(--input-text);
}

.fullscreen-edit-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.fullscreen-edit-footer {
  background-color: var(--bg-secondary);
  padding: 12px 16px;
  border-top: 1px solid var(--border-primary);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.fullscreen-edit-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fullscreen-edit-btn.save {
  background-color: var(--accent-blue);
  color: white;
}

.fullscreen-edit-btn.save:hover {
  background-color: var(--button-primary-hover);
}

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

.fullscreen-edit-btn.cancel:hover {
  background-color: var(--button-secondary-hover);
}


/* Dynamics Reply Input */
.dynamics-reply-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-tertiary);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1600;
  display: flex;
  align-items: flex-end;
}

.dynamics-reply-container.show {
  transform: translateY(0);
}

.dynamics-reply-container .input-wrapper {
  display: flex;
  align-items: flex-end;
  width: 100%;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 20px;
  padding: 6px 8px;
}

#dynamics-reply-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  padding: 6px 4px;
  background: transparent;
  color: var(--input-text);
  max-height: 100px;
  overflow-y: auto;
  resize: none;
}

#dynamics-reply-send {
  background-color: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 15px;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  margin-left: 8px;
}

.comment .reply-indicator {
  color: #888;
  margin: 0 4px;
}

/* Visibility Options Styles */
.visibility-options {
  margin-top: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border-secondary);
  border-bottom: 1px solid var(--border-secondary);
}

.visibility-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 5px;
  font-size: 0.9rem;
}

.visibility-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.visibility-options input[type="radio"] {
  accent-color: var(--accent-blue);
  width: 16px;
  height: 16px;
}

.contact-selection-list {
  margin-top: 10px;
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  display: none;
  background-color: var(--bg-quaternary);
}

.contact-selection-list.show {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

.contact-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 0.9rem;
  background-color: var(--input-bg);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.contact-checkbox-item:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent-blue);
}

.contact-checkbox-item input[type="checkbox"] {
  accent-color: var(--accent-blue);
  width: 16px;
  height: 16px;
}

.contact-checkbox-item .avatar-small {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.contact-checkbox-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Desktop/Widescreen Styles */
@media (min-width: 768px) {
    .dynamics-list {
        padding: 20px;
    }
}
