* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f1e8;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
}

main {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 80px;
}

/* HERO */

.hero {
  padding-top: 90px;
  padding-bottom: 60px;
  border-bottom: 2px solid #111;
}

.hero h1 {
  margin: 0;
  font-size: clamp(70px, 14vw, 150px);
  line-height: 0.85;
  letter-spacing: -8px;
}

.hero p {
  margin-top: 35px;
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
}
/* CONTROLS */

.controls {
  padding: 30px 0;
  border-bottom: 1px solid #111;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}


/* CATEGORY */

.category-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

select {
  min-width: 180px;
  padding: 12px;
  border: 1px solid #111;
  background: transparent;
  font-size: 15px;
}


/* SEARCH */

.search-area {
  margin-bottom: 25px;
}

.search-area input {
  width: 100%;
  padding: 14px;
  border: 1px solid #111;
  background: transparent;
  font-size: 16px;
  outline: none;
}
/* BUTTONS */

button {
  padding: 12px 16px;
  border: 1px solid #111;
  background: transparent;
  color: #111;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background: #111;
  color: #f4f1e8;
}

#addSiteButton {
  background: #111;
  color: #f4f1e8;
}

#addSiteButton:hover {
  opacity: 0.8;
}
/* SITE GRID */

.site-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 30px;
}


/* SITE CARD */

.site-card {
  min-height: 260px;
  padding: 24px;
  border: 1px solid #111;

  display: flex;
  flex-direction: column;
}

.site-category {
  margin: 0 0 35px;

  font-size: 11px;
  font-weight: bold;

  letter-spacing: 2px;
}

.site-card h2 {
  margin: 0;
  font-size: 28px;
}

.site-description {
  margin-top: 15px;

  line-height: 1.5;
  color: #333;
}

.site-bottom {
  margin-top: auto;

  display: flex;
  justify-content: space-between;
  align-items: end;

  gap: 20px;
}

.site-url {
  font-size: 13px;
  color: #666;

  overflow-wrap: anywhere;
}

.visit-link {
  color: #111;
  text-decoration: none;
  font-weight: bold;

  white-space: nowrap;
}

.visit-link:hover {
  text-decoration: underline;
}
/* MOBILE */

@media (max-width: 700px) {

  .site-grid {
    grid-template-columns: 1fr;
  }

  .category-controls {
    flex-direction: column;
  }

  select {
    width: 100%;
  }

}
/* MODAL */

.modal {
  display: none;

  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.5);

  justify-content: center;
  align-items: center;

  padding: 20px;

  z-index: 1000;
}

.modal-content {
  width: 100%;
  max-width: 500px;

  background: #f4f1e8;

  border: 1px solid #111;

  padding: 30px;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 25px;
}

.modal-content label {
  margin-bottom: 18px;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;

  margin-top: 8px;

  padding: 12px;

  border: 1px solid #111;

  background: transparent;
}

.modal-content textarea {
  min-height: 100px;

  resize: vertical;
}

.modal-buttons {
  display: flex;

  justify-content: flex-end;

  gap: 10px;

  margin-top: 25px;
}

#submitSiteButton {
  background: #111;
  color: #f4f1e8;
}

.broken-warning {
  margin-top: 12px;
  color: #a33;
  font-size: 12px;
  font-weight: bold;
}
/* MODAL IMPROVEMENTS */

.modal-content {
  box-shadow: 8px 8px 0 #111;
}

.modal-content h2 {
  font-size: 26px;
  letter-spacing: -1px;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  font-family: inherit;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.modal-buttons button {
  min-width: 90px;
}

#submitCategoryButton,
#submitSiteButton {
  background: #111;
  color: #f4f1e8;
}

#submitCategoryButton:hover,
#submitSiteButton:hover {
  opacity: 0.8;
}
@media (max-width: 600px) {

  .modal-content {
    padding: 22px;                
  }

  .modal-buttons {
    flex-direction: column;
  }

  .modal-buttons button {
    width: 100%;
  }

}
/* ADMIN */

.admin-section {
  padding: 40px 0;
}

.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 30px;
}

.admin-heading h2 {
  margin: 5px 0 0;
  font-size: 36px;
}

.section-label {
  margin: 0;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
}

.admin-back {
  color: #111;
  text-decoration: none;
  font-weight: bold;
}

.admin-site-item {
  display: flex;
  justify-content: space-between;
  gap: 30px;

  padding: 22px 0;

  border-top: 1px solid #111;
}

.admin-site-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.admin-site-info p {
  margin: 0 0 8px;
  color: #666;
}

.admin-site-info a {
  color: #111;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-actions button {
  font-size: 11px;
}

@media (max-width: 700px) {
  .admin-site-item {
    flex-direction: column;
  }

  .admin-heading {
    flex-direction: column;
    align-items: flex-start;
  }
}

.admin-actions button.selected {
  background: #111;
  color: #f4f1e8;
}

.admin-login-box {
  max-width: 400px;
}

.admin-login-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;

  border: 1px solid #111;
  background: transparent;
}

#adminLoginButton {
  background: #111;
  color: #f4f1e8;
}

#adminLoginMessage {
  margin-top: 12px;
  color: #a33;
  font-size: 13px;
}

/* ADMIN CATEGORIES */

.admin-category-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid #111;
}

.admin-category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 20px;

  padding: 18px 0;

  border-top: 1px solid #111;
}

.admin-category-name {
  font-size: 20px;
  font-weight: bold;
}

.admin-category-count {
  margin-top: 5px;

  font-size: 12px;
  color: #666;
}

.admin-category-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 700px) {

  .admin-category-item {
    flex-direction: column;
    align-items: flex-start;
  }

}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* =========================
   FOOTER
========================= */

.main-footer {
  margin-top: 100px;
  padding: 50px 0 30px;

  border-top: 1px solid #111;
}


.footer-message {
  margin: 0 0 70px;

  font-size: clamp(30px, 5vw, 64px);
  font-weight: 800;
  line-height: 0.95;

  letter-spacing: -2px;
}


.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1.5px;
}


.footer-bottom a {
  color: #111;
  text-decoration: none;
}


.footer-bottom a:hover {
  text-decoration: underline;
}


@media (max-width: 600px) {

  .footer-message {
    margin-bottom: 45px;
    letter-spacing: -1px;
  }

}