body {
  font-family: 'Segoe UI', Tahoma, Helvetica, Arial, sans-serif;
  background-color: #f0f2f5;
  color: #1c1e21;
  margin: 0;
  padding: 20px;
  padding-bottom: 80px;
}

.container {
  max-width: 600px;
  margin: auto;
  transition: max-width 0.3s ease;
}

/* Modernized Header Hero Section */
.header-hero {
  background: white;
  padding: 25px 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.town-logo {
  width: 50px;
  height: 50px;
  background: #e7f3ff;
  color: #1877f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 24px;
  box-shadow: inset 0 2px 4px rgba(24, 119, 242, 0.1);
}
h1 {
  color: #1c1e21;
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.subtitle {
  color: #65676b;
  margin: 5px 0 0 0;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hidden {
  display: none !important;
}

.layout-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.main-column {
  flex: 1;
  min-width: 0;
}
.sidebar-column {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  margin: 0;
  border-radius: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 5px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  color: #8a8d91;
  transition: 0.2s;
  border-top: 3px solid transparent;
}
.tab-btn:hover {
  background: #f8f9fa;
}
.tab-btn.active {
  color: #1877f2;
  border-top: 3px solid #1877f2;
}
.tab-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 900px) {
  body {
    padding-bottom: 20px;
  }
  .container {
    max-width: 950px;
  }
  .layout-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }
  .sidebar-column {
    display: flex;
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
  }

  .tabs {
    position: static;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-direction: row;
    padding-bottom: 0;
  }
  .tab-btn {
    flex-direction: row;
    font-size: 15px;
    padding: 15px;
    border-top: none;
    border-bottom: 3px solid transparent;
  }
  .tab-btn.active {
    border-top: none;
    border-bottom: 3px solid #1877f2;
  }
  .tab-icon {
    margin-bottom: 0;
    margin-right: 8px;
    width: 20px;
    height: 20px;
  }
}

.auth-box,
.composer-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.sidebar-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

input[type='text'],
input[type='email'],
input[type='password'],
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: 12px;
  margin-top: 10px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 15px;
  background: #f0f2f5;
  font-family: inherit;
}

input[type='datetime-local'],
input.date-placeholder {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  padding: 12px;
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 14px;
  background: #f0f2f5;
  font-family: inherit;
}

button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: 0.2s;
}

.btn-primary {
  background-color: #1877f2;
  color: white;
}
.btn-primary:hover {
  background-color: #166fe5;
}
.btn-secondary {
  background-color: #42b72a;
  color: white;
  margin-top: 15px;
}
.btn-secondary:hover {
  background-color: #36a420;
}
.btn-google {
  background-color: #db4437;
  color: white;
  margin-top: 10px;
}
.btn-google:hover {
  background-color: #c53929;
}
.btn-logout {
  background: transparent;
  color: #65676b;
  width: auto;
  padding: 5px 10px;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
  border: none;
  margin: 0;
}

#authError {
  color: #e41e3f;
  font-size: 0.9em;
  margin-top: 10px;
  text-align: center;
  font-weight: bold;
}

.feed-container {
  margin-top: 20px;
}
.post-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
  padding: 15px;
}
.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.avatar {
  width: 40px;
  height: 40px;
  background-color: #1877f2;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  margin-right: 10px;
  text-transform: uppercase;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.2s;
}
.avatar:hover {
  opacity: 0.85;
}
.author-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.author-name {
  font-weight: 600;
  font-size: 15px;
  color: #050505;
  text-transform: capitalize;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  width: fit-content;
  font-family: inherit;
}
.author-name:hover {
  color: #1877f2;
  text-decoration: underline;
}
.post-time {
  font-size: 13px;
  color: #65676b;
}

.post-content {
  font-size: 15px;
  color: #050505;
  line-height: 1.5;
  margin-bottom: 10px;
}
.post-image {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.delete-btn {
  background: transparent;
  border: none;
  color: #8a8d91;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: 0.2s;
  width: auto;
  margin: 0;
}
.delete-btn:hover {
  background: #fee2e2;
  color: #e41e3f;
}

.post-divider {
  border: 0;
  height: 1px;
  background: #e4e6eb;
  margin: 10px 0;
}

.like-action-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 8px 0 12px 0;
  font-size: 14px;
  color: #65676b;
}
.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #65676b;
  padding: 4px 8px;
  border-radius: 4px;
  width: auto;
  margin: 0;
  transition: 0.2s;
}
.like-btn:hover {
  background: #f0f2f5;
}
.like-btn.liked {
  color: #1877f2;
}

.comments-section {
  margin-top: 10px;
}
.comment-item {
  background: #f0f2f5;
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}
.comment-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}
.comment-content {
  flex-grow: 1;
  margin-right: 10px;
}
.comment-author {
  font-weight: 600;
  margin-right: 5px;
  color: #050505;
  text-transform: capitalize;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.comment-author:hover {
  color: #1877f2;
  text-decoration: underline;
}

.comment-delete {
  background: transparent;
  border: none;
  color: #8a8d91;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
  transition: 0.2s;
  border-radius: 4px;
  width: auto;
  margin: 0;
}
.comment-delete:hover {
  background: #fee2e2;
  color: #e41e3f;
}

.comment-input-area {
  display: flex;
  margin-top: 10px;
  align-items: center;
}
.comment-input-area input {
  margin-top: 0;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 14px;
  flex-grow: 1;
}
.comment-btn {
  width: auto;
  margin-top: 0;
  margin-left: 10px;
  padding: 8px 15px;
  background: #e4e6eb;
  color: #050505;
  border-radius: 20px;
}

.event-detail {
  font-size: 14px;
  color: #050505;
  margin-bottom: 5px;
  background: #f0f2f5;
  padding: 8px;
  border-radius: 6px;
}
.news-headline {
  font-size: 20px;
  font-weight: bold;
  color: #1877f2;
  margin-bottom: 10px;
}

.upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.icon-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: 0.2s all;
  background: transparent;
}
.icon-upload-btn:hover {
  background: #e4e6eb;
}
.icon-upload-btn svg {
  transition: 0.2s stroke;
}
.icon-upload-btn:hover svg {
  stroke: #1877f2;
}

.sponsor-label {
  font-size: 10px;
  color: #8a8d91;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}