.login-container {
  max-width: 360px;
  margin: 0 auto;
  padding: 24px 20px;
  text-align: center;
}

.login-avatar-wrap {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  border: 3px solid #ddd;
}

.login-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.3);
  transform-origin: center 30%;
  margin-top: -10px;
}

.login-alert {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.login-notice {
  background-color: #d4edda;
  color: #155724;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
  background: white;
}

.login-form input[type="submit"] {
  background-color: #4CAF50;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  margin-top: 4px;
}

.login-form input[type="submit"]:hover {
  background-color: #43a047;
}

.login-form {
  text-align: left;
}

.login-hint {
  margin-top: 20px;
  font-size: 13px;
  color: #777;
  text-align: center;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 *


 */

html, body {
  margin: 0;
  padding: 0;
}

html {
  font-family: Tahoma, sans-serif;
  background-color: #F5F5DC;
}

/* ── Header ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  height: 48px;
  background: #F5F5DC;
  border-bottom: 1px solid #ddd;
}

.app-header__title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #3a2e1e;
}

.app-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  text-decoration: none;
  color: #3a2e1e;
  cursor: pointer;
  border: none;
  background: transparent;
}

.app-header__btn:hover { background: rgba(0,0,0,0.08); }

.app-header__gallery {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #4CAF50;
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}

.app-header__gallery:hover { background: #43a047; }

.app-header__btn--accent {
  background: #4CAF50;
  color: white;
  font-size: 1.3rem;
  font-weight: bold;
}

.app-header__btn--accent:hover { background: #43a047; }

/* ── Post card ── */
.post-img {
  width: 100%;
  height: auto;
  display: block;
}

.post-video {
  width: 100%;
  height: auto;
  display: block;
}

.post {
  background: #fff;
  margin-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.edit-ui-phone {
  font-size: large;
}

.fs16 {
  font-size: 16px;
}

/* ── Admin buttons ── */
.btn-admin {
  display: inline-block;
  font-size: 13px;
  padding: 4px 10px;
  border: 1px solid #bbb;
  border-radius: 10px;
  color: #555;
  text-decoration: none;
  margin-right: 4px;
}

.btn-admin:hover { background: #eee; }

.btn-admin--danger {
  border-color: #e57373;
  color: #c62828;
}

.btn-admin--danger:hover { background: #ffebee; }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: space-between;
  padding: 16px 12px;
}

.btn-page {
  padding: 8px 20px;
  border: 1px solid #bbb;
  border-radius: 20px;
  text-decoration: none;
  color: #444;
  font-size: 14px;
  background: white;
}

.btn-page:hover { background: #f0f0f0; }

/* ── Post form ── */
.post-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.post-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-form__label {
  font-size: 13px;
  font-weight: bold;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-form__input,
.post-form__textarea,
.post-form__file {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
  background: white;
}

input[type="datetime-local"].post-form__input {
  appearance: none;
  -webkit-appearance: none;
}

.post-form__textarea {
  resize: vertical;
  min-height: 72px;
}

.post-form__file {
  padding: 8px;
  cursor: pointer;
}

.post-form__submit {
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  align-self: flex-start;
}

.post-form__submit:hover { background-color: #43a047; }

.post-form__error {
  font-size: 13px;
  color: #c62828;
}

.post-form__uploading {
  text-align: center;
  font-size: 1rem;
  color: #555;
  padding: 8px 0;
}

/* ── Comments ── */
.comments-container {
  font-family: sans-serif;
  background-color: #F5F5DC;
  display: flex;
  justify-content: left;
  align-items: center;
  margin: 0;
}

.comment-section {
  width: 100%;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  box-sizing: border-box;
}

.comment {
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.comment:last-child {
  border-bottom: none;
}

.comment-content {
  flex-grow: 1;
}

.comment-user-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}

.comment-user-info > .username { font-weight: bold; }

.comment-user-info > .time {
  font-size: 12px;
  color: #888;
}

.comment-content > .text { margin-bottom: 8px; }

.remove > a:nth-child(1) {
  font-size: 12px;
  color: #555;
}

.comment-content > .actions span {
  cursor: pointer;
  margin-right: 5px;
}

.comment-content > .actions span:last-child { margin-right: 0; }

.post-description {
  margin-bottom: 12px;
}

.post-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.post-date {
  font-size: 17px;
  color: #555;
}

.comment-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.new-comment {
  margin-top: 20px;
  display: flex;
}

#comment_content {
  flex-grow: 1;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 4px;
  resize: vertical;
  font-family: sans-serif;
  box-sizing: border-box;
  min-height: 80px;
}

.comment-submit-button {
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 10px 18px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  font-weight: bold;
  margin-left: 10px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
}

.comment-submit-button:hover { background-color: #45a049; }

/* ── Post back button ── */
.post-back-btn {
  display: inline-flex;
  align-items: center;
  margin: 12px 16px;
  padding: 10px 24px;
  border-radius: 20px;
  background: #4CAF50;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
}

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: #e0e0e0;
}

.gallery-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #ccc;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb__placeholder {
  width: 100%;
  height: 100%;
}

.gallery-thumb--video::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='28' fill='rgba(0,0,0,0.45)'/%3E%3Cpolygon points='24,18 24,42 44,30' fill='white'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
  pointer-events: none;
}

/* ── Photo carousel (in post cards) ── */
.post-media-carousel {
  width: 100%;
  overflow: hidden;
}

.post-media-carousel__track {
  display: flex;
  width: 100%;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  align-items: stretch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.post-media-carousel__track::-webkit-scrollbar { display: none; }

.post-media-carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ede8e0;
}

.post-media-carousel__img,
.post-media-carousel__video {
  width: 100%;
  height: auto;
  display: block;
}

.post-media-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
}

.post-media-carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.2s;
}

.post-media-carousel__dot.active {
  background: #888;
}

/* ── Edit form: current media thumbnails ── */
.post-form__current-media {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.post-form__thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
  display: inline-block;
}

.post-form__thumb--video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  font-size: 1.5rem;
  color: #555;
}

/* ── Desktop ── */
@media (min-width: 1000px) {
  body { width: 60%; margin: 0 auto; }
  .app-header { position: relative; }
  .gallery-grid { grid-template-columns: repeat(5, 1fr); }
}
