* {
  margin: 0;
  padding: 0;

  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
}

.container {
  padding-inline: 32px;
  margin-inline: auto;
  max-width: 1300px;
}

header {
  background-color: lightskyblue;
}

.main-header {
  min-height: 90px;
  padding-block: 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.add-story-container {
  max-width: 800px;
  margin: auto;
  padding: 2rem;
}

.story-form .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.upload-options {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.upload-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.upload-area.grid-2-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.map-area {
  height: 300px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.submit-btn {
  background-color: #007BFF;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.submit-btn[aria-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.help-text {
  font-size: 0.85rem;
  color: #666;
}

.full-width {
  grid-column: 1 / -1;
}



.brand-name {
  font-size: 1.125rem;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.navigation-drawer {
  min-height: 100vh;
  width: 200px;
  padding: 20px 10px;
  background-color: #fff;

  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;

  box-shadow: 0 0 4px 2px #00000033;
  transform: translateX(-100%);
  transition: transform 350ms;

  z-index: 9999;
}

.navigation-drawer.open {
  transform: translateX(0);
}

.drawer-button {
  padding: 8px;
  border: 0;
  border-radius: 4px;

  display: inline-block;
  background-color: transparent;

  font-weight: bold;
  font-size: 28px;
  color: #141e16;

  cursor: pointer;
}

.nav-list {
  list-style: none;

  display: flex;
  flex-direction: column;
  gap: 10px 20px;
}

.nav-list li a {
  padding: 6px 10px;

  display: block;
  
  color: #333;
  text-decoration: none;
}

.nav-list li a:hover {
  text-decoration: underline;
}

/* MAIN */
.main-content {
  padding-block: 20px;
}

/* Write your styles more here */
.loading-indicator {
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.loading-indicator.hidden {
  display: none;
}

.loading-indicator::after {
  content: "";
  width: 24px;
  height: 24px;
  border: 3px solid #ddd;
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.story-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}

.story-list {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 600px) {
  .story-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .story-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .story-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

.story-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

@media (max-width: 400px) {
  .story-list {
    gap: 1rem;
    padding: 0.5rem;
  }

  .story-image {
    height: 150px;
  }
}

.story-location {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: #3498db;
}

.error-message {
  text-align: center;
  padding: 2rem;
  color: #d32f2f;
}

.error-message svg {
  margin-bottom: 1rem;
}

.retry-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.auth-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.submit-button:hover {
  background-color: #2980b9;
}

.global-error {
  background: #e74c3c;
  color: white;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: 0 auto;
}

input, textarea, button {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

button {
  background-color: #4CAF50;
  color: white;
  cursor: pointer;
}

.story-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group textarea,
.form-group input[type="file"],
.form-group input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.detail-story-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.story-article {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.author-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.subscribe-button {
  background: none;
  border: none;
  color: #0095f6;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.subscribe-button:hover {
  background-color: #e0e0e0;
}

.subscribe-button[data-subscribed="true"] {
  background-color: #1a73e8;
  color: white;
}

.subscribe-button[data-subscribed="true"]:hover {
  background-color: #1765cc;
}

.story-image-container {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.story-image {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  z-index: 1;
}

@media (max-aspect-ratio: 3/4) {
  .story-image {
    width: auto;
    height: 80vh;
  }
}

.location-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 100;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.location-icon {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.location-button:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.location-button svg {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.story-actions {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.like-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.icon-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 0;
}

.icon {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  transition: all 0.2s ease;
}

.icon-button svg {
  display: block;
  width: 24px;
  height: 24px;
  overflow: visible;
}

.icon-button svg {
  color: #262626;
  stroke: currentColor;
}

.icon-button:hover .icon {
  transform: scale(1.1);
}

.likes-count {
  color: #333;
  margin-left: 4px;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.comments-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.comments-count {
  color: #333;
  margin-left: 4px;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

[data-liked="true"] .icon {
  fill: red;
  stroke: red;
}

.action-button {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.action-button svg {
  width: 28px;
  height: 28px;
  display: block;
}

@media (max-width: 360px) {
  .story-actions {
    gap: 12px;
  }
  .action-button svg {
    width: 24px;
    height: 24px;
  }
}

.story-caption {
  padding: 0 16px;
  font-size: 14px;
  line-height: 1.4;
}

.story-caption p {
  margin: 0;
}

.story-date {
  color: #8e8e8e;
  font-size: 0.8rem;
}

.story-date-detail {
  padding: 0 16px;
  font-size: 0.8rem;
  color: #8e8e8e;
}

.comments-section {
  padding: 0 16px;
  border-top: 1px solid #efefef;
  margin-top: 8px;
  padding-top: 8px;
}

.comments-title {
  font-size: 14px;
  color: #8e8e8e;
  margin: 8px 0;
}

.comment-item {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex: 1;
}

.comment-author {
  font-size: 13px;
  font-weight: 600;
  margin-right: 8px;
}

.comment-text {
  font-size: 13px;
  margin: 4px 0 0;
}

.story-full {
  max-width: 800px;
  margin: 0 auto;
}

.story-full .story-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
}

.story-meta {
  color: #666;
  margin: 0.5rem 0;
  display: flex;
  gap: 1rem;
}

.story-description {
  line-height: 1.6;
  white-space: pre-line;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem;
  background: #333;
  color: white;
  border-radius: 4px;
  z-index: 1000;
}

.toast.error {
  background: #d32f2f;
}

.notification-badge {
  position: relative;
}

.notification-badge::after {
  content: '';
  position: absolute;
  top: -5px;
  right: -5px;
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
}

.loading {
  text-align: center;
  font-size: 1.2rem;
  padding: 2rem;
}

.map-container {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}

#map {
  height: 500px;
  width: 100%;
  z-index: 1;
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.map-actions {
  display: flex;
  gap: 0.5rem;
}

.map-action-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-500);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.map-action-button:hover {
  background: var(--primary-600);
}

.map-action-button svg {
  width: 16px;
  height: 16px;
}

.custom-layer-control {
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  overflow: hidden;
  position: relative;
}

.layer-toggle-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #333;
}

.layer-toggle-btn:hover {
  background-color: #f4f4f4;
}

.layer-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  min-width: 160px;
  z-index: 1000;
  margin-top: 5px;
}

.layer-option {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.layer-option:hover {
  background-color: #f4f4f4;
}

.layer-option.active {
  background-color: #e6e6e6;
  font-weight: bold;
}

.layer-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background-size: contain;
  background-repeat: no-repeat;
}

.story-popup {
  max-width: 250px;
}

.story-image {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.story-link {
  color: #4361ee;
  text-decoration: none;
  font-weight: bold;
}

.story-link:hover {
  text-decoration: underline;
}

.location-popup {
  min-width: 180px;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  font: bold 18px 'Lucida Console', Monaco, monospace;
  text-indent: 1px;
}

.leaflet-control-zoom-in {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"black\"><path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"/></svg>") !important;
}

.leaflet-control-zoom-out {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"black\"><path d=\"M19 13H5v-2h14v2z\"/></svg>") !important;
}

.leaflet-control-layers {
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  border: none !important;
}

.leaflet-control-layers-toggle {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"%234361ee\"><path d=\"M12 4l-8 6 8 6 8-6z\"/></svg>") !important;
  width: 32px !important;
  height: 32px !important;
  background-size: 20px !important;
}

.leaflet-popup-content {
  min-width: 200px;
}

.leaflet-popup-content img {
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
}

.story-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  height: 100%;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.story-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.story-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.story-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.story-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #333;
}

.story-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 16px;
  flex-grow: 1;
}

.story-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.read-more-button {
  background: none;
  border: none;
  color: #3498db;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
}

.read-more-button:hover {
  color: #2980b9;
  text-decoration: underline;
}


#cameraView, #photoPreview {
  display: block;
  margin-bottom: 1rem;
  border-radius: 4px;
}

#captureBtn {
  background: #4285f4;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.add-story-button {
  background-color: #4285f4;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.add-story-button:hover {
  background-color: #3367d6;
}

.add-story-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.add-story-container h1 {
  text-align: center;
  margin: 1rem 0;
  padding: 0.5rem 0;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
}

.camera-section, .map-section {
  margin: 1.5rem 0;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 8px;
}

.camera-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 400px;
  margin: 12px auto 0;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

.camera-btn {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;             
  max-width: 160px;
  text-align: center;
}

.primary-btn {
  background-color: #4285F4;
  color: white;
}

.primary-btn:hover {
  background-color: #3367D6;
}

.secondary-btn {
  background-color: #f1f3f4;
  color: #3c4043;
  border: 1px solid #dadce0;
}

.secondary-btn:hover {
  background-color: #e8eaed;
}

@media (max-width: 480px) {
  .camera-controls {
    flex-direction: column;
    gap: 8px;
  }
  
  .camera-btn {
    max-width: 100%;
    width: 100%;
  }
}

#storyForm textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.5rem;
  margin-bottom: 1rem;
}

.submit-btn {
  background: #4285f4;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.upload-options {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.upload-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.upload-section {
  margin: 1rem 0;
  border: 1px dashed #ccc;
  padding: 1rem;
  border-radius: 8px;
}

.photo-preview {
  margin: 1rem 0;
  text-align: center;
}

#photoPreview, #filePreview {
  max-height: 300px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

@media (prefers-contrast: more) {
  body {
    background: white !important;
    color: black !important;
  }
  
  button, a {
    border: 2px solid black !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

[aria-busy="true"] {
  position: relative;
  color: transparent !important;
}

[aria-busy="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-right-color: transparent;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.help-text {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
}

fieldset {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1rem;
}

legend {
  padding: 0 0.5rem;
  font-weight: bold;
}

[aria-hidden="true"] {
  display: none !important;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 20px;
  background-color: #f5f5f5;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.login-title {
  margin-bottom: 24px;
  color: #2c3e50;
  font-size: 24px;
  text-align: center;
  font-weight: 600;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.form-label {
  font-size: 14px;
  color: #34495e;
  font-weight: 500;
  margin-bottom: 4px;
}

.form-input {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border 0.3s, box-shadow 0.3s;
  width: 100%;
}

.form-input:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.help-text {
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 4px;
}

.forgot-password-container {
  text-align: right;
  margin: 0 0 10px 0;
}

.forgot-password-link {
  color: #3498db;
  text-decoration: none;
  font-size: 13px;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.login-message {
  margin: 0;
  padding: 10px 0;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

.login-button {
  position: relative;
  padding: 12px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%;
}

.login-button:hover:not([disabled]) {
  background-color: #2980b9;
}

.login-button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.login-button[aria-busy="true"] {
  color: transparent;
}

.login-button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #7f8c8d;
  padding-top: 16px;
  border-top: 1px solid #f1f1f1;
}

.text-link {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.text-link:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-card {
    padding: 20px;
  }
  
  .login-title {
    font-size: 20px;
    margin-bottom: 16px;
  }
  
  .form-input {
    padding: 10px 12px;
  }
  
  .login-button {
    padding: 10px;
  }
}

.register-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.register-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.register-title {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.forgot-password-container {
  text-align: right;
  margin: -0.5rem 0 1rem 0;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: #666;
}

.error-message {
  color: var(--error-color);
  font-size: 0.8em;
  margin-top: 0.25rem;
  display: none;
}

.invalid {
  border-color: var(--error-color) !important;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.register-button {
  position: relative;
  padding: 12px;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.register-button:hover {
  background-color: #27ae60;
}

.register-button[aria-busy="true"] {
  color: transparent;
}

.register-button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

.register-message {
  margin: 10px 0;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

.register-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #7f8c8d;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
  animation-timing-function: ease;
}

::view-transition-old(root) {
  animation-name: fade-out;
}

::view-transition-new(root) {
  animation-name: fade-in;
}

::view-transition-old(main-header),
::view-transition-new(main-header) {
  animation-duration: 0.2s;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

.no-view-transitions .page {
  animation: fade-in 0.3s ease;
}

.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 4px;
  z-index: 1000;
}

.error-container {
  padding: 2rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.retry-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #4285f4;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.email-error {
  color: #e74c3c;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}

.invalid {
  border-color: #e74c3c !important;
}

button:disabled {
  background-color: #95a5a6 !important;
  cursor: not-allowed !important;
}

.forgot-password-container {
  text-align: right;
  margin: -10px 0 15px 0;
}

.forgot-password-link {
  color: #3498db;
  font-size: 0.9em;
  text-decoration: none;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.detail-story-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  background-color: #fff;
  min-height: 100vh;
}

.detail-story-header {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 1rem;
  color: #333;
  transition: background-color 0.2s;
}

.back-button:hover {
  background-color: #f5f5f5;
}

.detail-title {
  font-size: 1.5rem;
  margin: 0;
  color: #333;
}

.story-content {
  padding: 0 0.5rem;
}

.story-article {
  margin-bottom: 2rem;
}

.author-info {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
}

.author-details {
  flex: 1;
}

.author-name {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}

.post-date {
  font-size: 0.9rem;
  color: #666;
}

.story-description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: #333;
}

.story-description p {
  margin: 0;
  white-space: pre-line;
}

.story-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
}

.stat-item svg {
  transition: all 0.2s;
}

.comments-section {
  margin-top: 2rem;
}

.comments-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #333;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.comment-author {
  font-weight: 600;
  color: #333;
  margin: 0;
  font-size: 0.95rem;
}

.comment-time {
  font-size: 0.8rem;
  color: #999;
}

.comment-text {
  margin: 0;
  color: #333;
  line-height: 1.5;
  font-size: 0.95rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid #eee;
}

.action-button:hover {
  background: #eee;
}

.like-button[data-liked="true"] {
  color: #e74c3c;
}

.skeleton-loading {
  padding: 1rem;
}

.skeleton-image {
  height: 300px;
  background: #eee;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.skeleton-line {
  height: 16px;
  background: #eee;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.w-75 { width: 75%; }
.w-100 { width: 100%; }
.w-50 { width: 50%; }

.error-message {
  text-align: center;
  padding: 2rem;
  color: #e74c3c;
}

.error-message svg {
  margin-bottom: 1rem;
}

.error-message h3 {
  margin: 0 0 0.5rem;
}

.error-message p {
  margin: 0 0 1.5rem;
  color: #666;
}

.home-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.home-link:hover {
  background: #2980b9;
}

.story-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  margin-bottom: 20px;
  background: white;
}

.story-card:hover {
  transform: translateY(-5px);
}

.story-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.story-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.story-content {
  padding: 16px;
}

.story-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #333;
}

.story-desc {
  margin: 0 0 12px;
  color: #555;
  line-height: 1.5;
}

.story-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #777;
}

.read-more {
  color: #1a73e8;
  font-weight: 500;
}

.detail-story-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.story-article {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.story-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.story-meta {
  padding: 20px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

.post-date {
  font-size: 0.85rem;
  color: #777;
}

.story-description {
  line-height: 1.6;
  margin: 20px 0;
  white-space: pre-line;
  color: #333;
}

.story-stats {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  color: #555;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.comments-section {
  margin-top: 30px;
  padding: 20px;
  border-top: 1px solid #eee;
}

.comments-title {
  margin: 0 0 20px;
  font-size: 1.1rem;
  color: #333;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.comment-item {
  display: flex;
  gap: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.comment-author {
  font-weight: 500;
  font-size: 0.9rem;
  color: #333;
}

.comment-time {
  font-size: 0.8rem;
  color: #777;
}

.comment-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #333;
}

.skeleton-loading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-image {
  height: 300px;
  background-color: #eee;
  border-radius: 8px;
  animation: pulse 1.5s infinite;
}

.skeleton-line {
  height: 16px;
  background-color: #eee;
  border-radius: 4px;
  animation: pulse 1.5s infinite;
}

.w-75 { width: 75%; }
.w-100 { width: 100%; }
.w-50 { width: 50%; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #e74c3c;
}

.error-message svg {
  margin-bottom: 15px;
}

.error-message h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.error-message p {
  margin: 0 0 20px;
  color: #333;
}

.home-link, .retry-button {
  display: inline-block;
  padding: 8px 16px;
  background-color: #1a73e8;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .story-card {
    margin-bottom: 15px;
  }
  
  .detail-story-container {
    padding: 15px;
  }
  
  .story-image {
    max-height: 300px;
  }
  
  .action-buttons {
    flex-direction: column;
  }
}

.author-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.subscribe-text {
  font-weight: 500;
}

.author-name {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
  flex-grow: 1;
}

@media screen and (width > 1000px) {
  .navigation-drawer {
    min-height: auto;
    width: auto;
    padding: 0;
    background-color: transparent;

    flex-direction: row;
    justify-content: space-between;

    position: static;
    box-shadow: none;
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: row;
  }

  .nav-list li a {
    display: inline-block;
  }

  .drawer-button {
    display: none;
  }
}

.auth-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  max-width: 350px;
  background-color: #fff;
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  transform: translateY(150%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  border-left: 4px solid #3498db;
}

.auth-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-content svg {
  color: #3498db;
  flex-shrink: 0;
}

#toast-message {
  font-size: 14px;
}

.toast-button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.toast-button:hover {
  background-color: #2980b9;
}

.toast-close {
  background: transparent;
  border: none;
  color: #999;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  margin-left: 8px;
}

.toast-close:hover {
  color: #333;
}

@media (max-width: 480px) {
  .auth-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

.app-footer {
  background-color: #f8f9fa;
  padding: 25px 0;
  margin-top: 30px;
  border-top: 1px solid #e9ecef;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  color: #555;
  font-size: 16px;
}

.footer-copyright p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 25px;
}

.footer-links a {
  color: #555;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #3498db;
  text-decoration: underline;
}

.main-content {
  min-height: calc(100vh - 200px);
  padding-bottom: 20px;
}

.map-container {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}

#logout-button {
  color: #e74c3c;
}

#logout-button:hover {
  color: #c0392b;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .footer-links {
    justify-content: center;
  }
  
  .app-footer {
    padding: 20px 0;
  }
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  color: #333;
}

.about-header {
  text-align: center;
  margin-bottom: 3rem;
}

.about-header h1 {
  font-size: 2.5rem;
  color: #2c3e50;
}

.tagline {
  font-size: 1.2rem;
  color: #7f8c8d;
  font-style: italic;
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.mission-card,
.story-card,
.team-card,
.values-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.icon-wrapper {
  background: #f8f9fa;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.icon-wrapper svg {
  width: 24px;
  height: 24px;
  color: #3498db;
}

.timeline-item {
  display: flex;
  margin-bottom: 1rem;
}

.year {
  font-weight: bold;
  min-width: 60px;
  color: #3498db;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
  background: #f1f1f1;
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  align-items: center;
}

.values-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.values-list svg {
  width: 18px;
  height: 18px;
  color: #27ae60;
}

.cta-section {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.mission-card { animation-delay: 0.1s; }
.story-card { animation-delay: 0.2s; }
.team-card { animation-delay: 0.3s; }
.values-card { animation-delay: 0.4s; }

.team-member:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.values-list li.highlighted {
  background-color: #f8f9fa;
  transform: scale(1.02);
}

.social-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.social-links a {
  color: #3498db;
  font-size: 18px;
}

/* styles.css */
.story-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #efefef;
  margin-bottom: 12px;
}

.action-group-left {
  display: flex;
  align-items: center;
}

.action-group-right {
  display: flex;
  align-items: center;
}

.like-container,
.comments-container,
.save-container {
  display: flex;
  align-items: center;
  margin-right: 16px;
}

.like-container:last-child,
.comments-container:last-child {
  margin-right: 0;
}

.icon-button {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.likes-count,
.comments-count,
.save-text {
  margin-left: 4px;
  font-size: 14px;
  color: #262626;
}

.icon-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #4285F4;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Bookmark Page Styles */
.bookmark-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.bookmark-header {
  text-align: center;
  margin-bottom: 30px;
}

.bookmark-header h1 {
  font-size: 2rem;
  color: #333;
}

.bookmark-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.bookmark-item {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s;
}

.bookmark-item:hover {
  transform: translateY(-2px);
}

.bookmark-content {
  flex: 1;
}

.bookmark-item h2 {
  font-size: 1.2rem;
  margin: 0 0 5px 0;
  color: #333;
}

.bookmark-date {
  font-size: 0.8rem;
  color: #666;
  margin: 0 0 10px 0;
}

.bookmark-description {
  font-size: 0.9rem;
  color: #444;
  margin: 0;
}

.bookmark-actions {
  display: flex;
  gap: 10px;
}

.read-button {
  background: #4285F4;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.delete-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
}

.empty-state, .error-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state svg, .error-state svg {
  margin-bottom: 20px;
}

.empty-state h3, .error-state h3 {
  color: #666;
  margin-bottom: 10px;
}

.empty-state p, .error-state p {
  color: #888;
  margin-bottom: 20px;
}

.retry-button {
  background: #4285F4;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

#subscribe-bell {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  background: #4285F4; /* biru */
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s;
}

#subscribe-bell:hover {
  box-shadow: 0 4px 16px rgba(66,133,244,0.25);
  background: #1565c0;
}

#subscribe-bell svg {
  display: block;
  stroke: #ffffff !important;
}

#subscribe-bell svg line {
  stroke: #ffffff !important;
}

.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #e74c3c;
  color: #fff;
  text-align: center;
  padding: 8px 0;
  z-index: 99999;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  display: none;
}
.offline-banner.show {
  display: block;
}
