/* ============= GLOBAL RESET ============= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ============= PAGE BASE ============= */
body {
  background: #000000;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  padding: 2rem 1rem;
}

::selection {
  background: #ffffff;
  color: #000000;
}

/* ============= MAIN WRAPPER ============= */
main {
  width: 100%;
  max-width: 100%;
}

/* ============= HEADER ============= */
.site-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1a1a1a;
}

.site-header h1 {
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: lowercase;
  color: #ffffff;
  letter-spacing: -0.5px;
}

/* ============= POSTS SECTION ============= */
.posts-section {
  margin-top: 1rem;
}

.posts-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1a1a1a;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  background: transparent;
  border: 1px solid #1a1a1a;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #666;
}

.search-input::placeholder {
  color: #666;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wall-toggle {
  background: transparent;
  border: none;
  color: #666;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s;
}

.wall-toggle:hover {
  color: #ffffff;
}

.post-count {
  font-size: 0.9rem;
  color: #666;
}

.wall-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: #666;
  font-size: 0.95rem;
}

.post-card {
  border-bottom: 1px solid #1a1a1a;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
  gap: 1rem;
}

.post-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-author {
  font-weight: 500;
  font-size: 0.95rem;
  color: #ffffff;
}

.post-id-hashtag {
  background: transparent;
  border: none;
  color: #666;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
  opacity: 0.7;
}

.post-id-hashtag:hover {
  color: #ffffff;
  opacity: 1;
}

.post-time {
  font-size: 0.85rem;
  color: #666;
  white-space: nowrap;
}

.post-content {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #ffffff;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============= FLOATING ADD BUTTON ============= */
.add-post-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  border: none;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 100;
}

.add-post-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.add-post-btn:active {
  transform: scale(1.05);
}

/* ============= MODAL ============= */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #000000;
  border: 1px solid #1a1a1a;
  width: 100%;
  max-width: 500px;
  padding: 2rem;
  position: relative;
}

.welcome-content {
  max-width: 600px;
}

.welcome-body {
  margin: 1.5rem 0;
}

.welcome-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #ffffff;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.welcome-warning {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.warning-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #1a1a1a;
  border-left: 3px solid #ffaa00;
}

.warning-item .warning-icon {
  font-size: 1.5rem;
  color: #ffaa00;
  flex-shrink: 0;
}

.warning-item strong {
  display: block;
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.warning-item p {
  color: #b8b8b8;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.welcome-footer {
  font-size: 0.95rem;
  color: #666;
  text-align: center;
  font-style: italic;
  margin-top: 1.5rem;
}

.modal-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #1a1a1a;
}

/* ============= WARNING BANNER ============= */
.warning-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a1a;
  border: 1px solid #333;
  border-left: 3px solid #ffaa00;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.warning-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.warning-icon {
  font-size: 1.2rem;
  color: #ffaa00;
  flex-shrink: 0;
}

.warning-text {
  font-size: 0.85rem;
  color: #ffffff;
  line-height: 1.4;
}

.dismiss-warning-btn {
  background: transparent;
  border: none;
  color: #666;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.dismiss-warning-btn:hover {
  color: #ffffff;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 400;
  text-transform: lowercase;
  color: #ffffff;
}

.close-btn {
  background: transparent;
  border: none;
  color: #666;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #ffffff;
}

/* ============= FORM ============= */
.wall-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.wall-form input[type="text"] {
  flex: 1;
  background: transparent;
  border: 1px solid #1a1a1a;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.wall-form input[type="text"]:focus {
  border-color: #666;
}

.wall-form input[type="text"]::placeholder {
  color: #666;
}

.wall-form input[type="color"] {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #1a1a1a;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.wall-form input[type="color"]:hover {
  border-color: #666;
}

.wall-form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid #1a1a1a;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 0.75rem;
  min-height: 120px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.wall-form textarea:focus {
  border-color: #666;
}

.wall-form textarea::placeholder {
  color: #666;
}

.recaptcha-container {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
}

.recaptcha-container .g-recaptcha {
  transform: scale(0.85);
  transform-origin: 0 0;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.wall-status {
  font-size: 0.85rem;
  min-height: 1.2rem;
}

.wall-status.success {
  color: #666;
}

.wall-status.error {
  color: #ff4444;
}

.submit-btn {
  background: #ffffff;
  border: none;
  color: #000000;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  opacity: 0.8;
}

.submit-btn:active {
  opacity: 0.6;
}

/* ============= MOBILE RESPONSIVE ============= */
@media (max-width: 768px) {
  body {
    padding: 1.5rem 1rem;
  }

  .site-header h1 {
    font-size: 1.25rem;
  }

  .posts-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .controls-right {
    justify-content: space-between;
  }

  .post-card {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .add-post-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    font-size: 1.75rem;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .wall-form input[type="color"] {
    width: 100%;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .wall-list {
    gap: 0;
  }

  .post-content {
    font-size: 0.9rem;
  }
}
