/* ==========================================================================
   Samuel Feedback Site - Shared Styles
   ========================================================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Elms Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #fff;
  background-color: #000;
  min-height: 100vh;
}

/* --- Gradient Background --- */
.gradient-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
}

.gradient-layer {
  position: absolute;
  mix-blend-mode: screen;
  transition: transform 0.15s ease-out;
}

.gradient-layer.rotates {
  width: 200vmax;
  height: 200vmax;
  top: 50%;
  left: 50%;
  margin-top: -100vmax;
  margin-left: -100vmax;
  border-radius: 50%;
}

.gradient-layer.no-rotate {
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
}

/* --- Content Overlay --- */
.content-overlay {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem;
}

h1, h2, h3 {
  margin-top: 0;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Layout --- */
main,
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Introductory Message --- */
.intro {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  max-width: 800px;
  width: 100%;
}

.intro h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.intro p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* --- Form Styles --- */
.review-form-section,
.admin-login-section {
  max-width: 800px;
  width: 100%;
  margin: 0 auto 2rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(30px) hue-rotate(-90deg);
  border: 3px dotted white;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: background 0.3s ease;
}

.review-form-section:hover,
.admin-login-section:hover {
  background: rgba(0, 0, 0, 0.5);
}

.review-form-section h2 {
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Submit Button --- */
button[type="submit"],
.btn-primary {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background-color: #fff;
  color: #000;
  border: none;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

button[type="submit"]:hover,
.btn-primary:hover {
  background-color: #e0e0e0;
}

button[type="submit"]:active,
.btn-primary:active {
  background-color: #ccc;
}

button[type="submit"]:disabled,
.btn-primary:disabled {
  background-color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

/* --- Star Rating Selector --- */
.star-rating {
  display: inline-flex;
  gap: 0.25rem;
}

.star-rating .star {
  font-size: 2rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  user-select: none;
  line-height: 1;
  opacity: 0.3;
}

.star-rating .star:hover,
.star-rating .star.hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.star-rating .star.active {
  opacity: 1;
}

/* --- Honeypot Field (hidden from users) --- */
.honeypot-field {
  position: absolute;
  left: -9999px;
}

/* --- Form Errors / Validation Messages --- */
.form-errors {
  color: #dc2626;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.form-errors:empty {
  display: none;
}

.field-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* --- Reviews Section --- */
.reviews-section {
  max-width: 800px;
  width: 100%;
  margin: 0 auto 3rem;
  padding: 0;
}

.reviews-section h2 {
  margin-bottom: 1rem;
}

/* --- Review Card --- */
.review-card {
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(30px) hue-rotate(-90deg);
  border: 3px dotted white;
  border-radius: 0;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: background 0.3s ease;
}

.review-card:hover {
  background: rgba(0, 0, 0, 0.5);
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.review-card-header .reviewer-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
}

.review-card-header .review-date {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.review-stars {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.review-stars .star-empty {
  opacity: 0.3;
}

.review-text {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

/* --- Response Box --- */
.review-response {
  margin-top: 0.75rem;
  margin-left: 1.5rem;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(255, 255, 255, 0.4);
  border-radius: 0 6px 6px 0;
}

.review-response .response-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.25rem;
}

.review-response .response-text {
  margin: 0 0 0.25rem;
  color: rgba(255, 255, 255, 0.85);
}

.review-response .response-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --- Admin Login Form --- */
.admin-login-section {
  max-width: 400px;
  margin: 3rem auto;
  padding: 2rem;
}

.admin-login-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-error {
  color: #dc2626;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 1rem;
}

.login-error:empty {
  display: none;
}

/* --- Admin Panel --- */
.admin-panel {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.admin-panel h2 {
  margin-bottom: 1rem;
}

.admin-review-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-review-card .review-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* --- Delete Button --- */
.btn-delete {
  padding: 0.4rem 0.75rem;
  background-color: #dc2626;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-delete:hover {
  background-color: #b91c1c;
}

/* --- Admin Response Form --- */
.response-form {
  margin-top: 0.75rem;
  margin-left: 1.5rem;
  padding: 0.75rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.response-form textarea {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 0.5rem;
}

.response-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.response-form button {
  padding: 0.4rem 1rem;
  background-color: #059669;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.response-form button:hover {
  background-color: #047857;
}

/* --- Utility --- */
.hidden {
  display: none !important;
}

.loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem 0;
}

.empty-state {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem 0;
  font-style: italic;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .intro {
    padding: 1.5rem 1rem 1rem;
  }

  .intro h1 {
    font-size: 1.4rem;
  }

  .review-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .admin-login-section {
    margin: 1.5rem 1rem;
    padding: 1.5rem;
  }

  .review-response,
  .response-form {
    margin-left: 0.75rem;
  }
}
