/* Base Styles - Winterlude.Dev Aesthetic */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:wght@400;700;900&display=swap');

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #292524;
  /* stone-800 */
  background-color: #fff7ed;
  /* orange-50 parchment */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Serif fonts for headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Merriweather', serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  padding: 50px 0 40px;
  margin-bottom: 40px;
  background: white;
  border: 2px solid #292524;
  /* stone-800 */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #292524;
  /* stone-800 */
}

header h1 a {
  color: inherit;
  text-decoration: none;
}

header .logo {
  width: 5rem;
  height: auto;
  margin-bottom: 1rem;
}

.tagline {
  font-size: 1.2rem;
  color: #57534e;
  /* stone-600 */
  font-weight: 500;
}

.header-nav {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.header-nav .btn {
  padding: 8px 20px;
  font-size: 14px;
}

main {
  padding: 40px 0;
}

section {
  margin-bottom: 60px;
}

h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
  color: #292524;
  /* stone-800 */
}

.hero {
  text-align: center;
  margin-bottom: 60px;
}

.subtitle {
  font-size: 1.2rem;
  color: #57534e;
  /* stone-600 */
  max-width: 700px;
  margin: 0 auto;
}

.create-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border: 2px solid #292524;
  /* stone-800 */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #292524;
  /* stone-800 */
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #a8a29e;
  /* stone-400 */
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
  background-color: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #292524;
  /* stone-800 */
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 2px solid #292524;
  /* stone-800 */
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Merriweather', serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background-color: #fff7ed;
  /* orange-50 */
  color: #292524;
  /* stone-800 */
}

.btn-primary:hover {
  background-color: #292524;
  /* stone-800 */
  color: #fff7ed;
  /* orange-50 */
}

.btn-secondary {
  background-color: white;
  color: #292524;
  /* stone-800 */
  border: 2px solid #292524;
}

.btn-secondary:hover {
  background-color: #f5f5f4;
  /* stone-100 */
}

.btn-danger {
  background-color: #fff7ed;
  color: #b91c1c;
  /* red-800 */
  border: 2px solid #b91c1c;
}

.btn-danger:hover {
  background-color: #b91c1c;
  color: white;
}

.btn-warning {
  background-color: #fef3c7;
  color: #78350f;
  border: 2px solid #78350f;
}

.btn-warning:hover {
  background-color: #78350f;
  color: white;
}

.btn-success {
  background-color: #d1fae5;
  color: #166534;
  border: 2px solid #166534;
}

.btn-success:hover {
  background-color: #166534;
  color: white;
}

.result {
  margin-top: 20px;
  padding: 15px;
  border: 2px solid;
}

.result.success {
  background-color: #f0fdf4;
  /* green-50 */
  border-color: #166534;
  /* green-800 */
  color: #166534;
}

.result.error {
  background-color: #fef2f2;
  /* red-50 */
  border-color: #b91c1c;
  /* red-800 */
  color: #b91c1c;
}

.result.hidden {
  display: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature {
  background: white;
  padding: 30px;
  border: 2px solid #292524;
  /* stone-800 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.feature:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.feature h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #292524;
  /* stone-800 */
}

.feature p {
  color: #57534e;
  /* stone-600 */
}

.pricing-intro {
  text-align: center;
  color: #57534e;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 20px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.plan {
  background: white;
  padding: 40px;
  border: 2px solid #292524;
  /* stone-800 */
  text-align: center;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plan:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.plan.featured {
  border: 3px solid #b91c1c;
  /* red-800 accent */
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(185, 28, 28, 0.2);
}

.plan.featured:hover {
  box-shadow: 0 6px 12px rgba(185, 28, 28, 0.3);
}

.plan h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #292524;
  /* stone-800 */
}

.plan.featured h3 {
  color: #b91c1c;
  /* red-800 */
}

.price {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 20px 0;
  color: #292524;
  /* stone-800 */
  font-family: 'Merriweather', serif;
}

.price .period {
  font-size: 1rem;
  font-weight: 500;
  color: #57534e;
  /* stone-600 */
}

.plan ul {
  list-style: none;
  margin: 20px 0;
  text-align: left;
}

.plan ul li {
  padding: 8px 0;
  border-bottom: 1px solid #e7e5e4;
  /* stone-200 */
  color: #57534e;
  /* stone-600 */
}

.plan ul li:last-child {
  border-bottom: none;
}

.plan-highlight {
  font-size: 1.2rem;
  color: #292524;
  margin: 15px 0;
}

.plan-highlight strong {
  color: #b91c1c;
  font-size: 1.4rem;
}

.plan-note {
  font-size: 0.9rem;
  color: #78716c;
  margin-top: 10px;
}

.all-features {
  text-align: center;
  margin-top: 40px;
  padding: 30px;
  background: white;
  border: 2px solid #292524;
}

.all-features h3 {
  margin-bottom: 20px;
  color: #292524;
}

.features-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px 30px;
}

.features-list li {
  color: #57534e;
  padding: 5px 0;
}

.features-list li::before {
  content: "✓ ";
  color: #166534;
  font-weight: bold;
}

.example {
  background: white;
  padding: 40px;
  border: 2px solid #292524;
  /* stone-800 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.example pre {
  background: #1c1917;
  /* stone-900 */
  padding: 25px;
  overflow-x: auto;
  margin: 20px 0;
  border: 2px solid #292524;
}

.example code {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #d6d3d1;
  /* stone-300 */
}

footer {
  text-align: center;
  padding: 40px 30px;
  margin-top: 60px;
  color: #57534e;
  /* stone-600 */
  background: white;
  border: 2px solid #292524;
  /* stone-800 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

footer p {
  margin: 0;
  line-height: 1.8;
}

footer .footer-copyright {
  font-size: 0.95rem;
  color: #57534e;
  margin-bottom: 8px;
}

footer .footer-credit {
  font-size: 0.9rem;
  color: #78716c;
}

footer .footer-credit a {
  color: #b91c1c;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

footer .footer-credit a:hover {
  text-decoration: underline;
  color: #991b1b;
}

.pricing-note {
  text-align: center;
  margin-top: 30px;
  color: #57534e;
  /* stone-600 */
  font-size: 0.95rem;
  font-style: italic;
}

.currency-selector {
  max-width: 400px;
  margin: 30px auto;
  text-align: center;
}

.currency-selector label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #292524;
  /* stone-800 */
}

.currency-selector select {
  width: 100%;
  padding: 12px;
  border: 2px solid #a8a29e;
  /* stone-400 */
  font-size: 16px;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.currency-selector select:focus {
  outline: none;
  border-color: #292524;
  /* stone-800 */
}

.info-box {
  background: #fef3c7;
  /* amber-100 */
  border: 2px solid #d97706;
  /* amber-600 */
  padding: 25px;
  margin: 30px auto;
  max-width: 700px;
}

.info-box h3 {
  margin-top: 0;
  color: #78350f;
  /* amber-900 */
  font-size: 1.3rem;
}

.info-box ul {
  margin: 15px 0;
  padding-left: 20px;
}

.info-box li {
  margin: 8px 0;
  color: #78350f;
  /* amber-900 */
}

.submissions {
  max-width: 900px;
  margin: 0 auto;
}

.auth-section {
  background: white;
  padding: 40px;
  border: 2px solid #292524;
  /* stone-800 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

.auth-section h2 {
  text-align: center;
  margin-bottom: 10px;
}

.auth-section > p {
  text-align: center;
  color: #57534e;
  margin-bottom: 30px;
}

.auth-form {
  max-width: 400px;
  margin: 0 auto;
}

.auth-form .form-group {
  text-align: left;
}

.auth-form select {
  width: 100%;
  padding: 12px;
  border: 2px solid #a8a29e;
  font-size: 16px;
  font-family: inherit;
  background-color: white;
  cursor: pointer;
}

.auth-form select:focus {
  outline: none;
  border-color: #292524;
}

.auth-form .btn {
  width: 100%;
  margin-top: 10px;
}

.auth-footer {
  text-align: center;
  margin-top: 25px;
  color: #57534e;
}

.auth-footer a {
  color: #b91c1c;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-section input {
  width: 100%;
  max-width: 400px;
  margin: 20px auto;
  display: block;
  padding: 12px;
  border: 2px solid #a8a29e;
  /* stone-400 */
  font-size: 16px;
}

.submissions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border: 2px solid #292524;
  /* stone-800 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.submission-card {
  background: white;
  padding: 20px;
  margin-bottom: 20px;
  border: 2px solid #292524;
  /* stone-800 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.submission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e7e5e4;
  /* stone-200 */
}

.submission-date {
  font-weight: 600;
  color: #292524;
  /* stone-800 */
}

.submission-id {
  font-size: 0.85rem;
  color: #78716c;
  /* stone-500 */
  font-family: monospace;
}

.submission-data {
  padding: 10px 0;
}

.field {
  padding: 8px 0;
  word-wrap: break-word;
}

.field strong {
  color: #292524;
  /* stone-800 */
  margin-right: 8px;
}

.no-submissions {
  text-align: center;
  padding: 40px;
  color: #78716c;
  /* stone-500 */
}

.hidden {
  display: none;
}

.upgrade {
  max-width: 1000px;
  margin: 0 auto;
}

.email-input {
  margin-top: 20px;
  text-align: center;
}

.email-input label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #292524;
}

.email-input input {
  width: 100%;
  padding: 12px;
  border: 2px solid #a8a29e;
  /* stone-400 */
  font-size: 16px;
  margin-bottom: 15px;
}

.email-input input:focus {
  outline: none;
  border-color: #292524;
}

/* Manage Page Styles */
.auth-box {
  background: white;
  padding: 40px;
  border: 2px solid #292524;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 50px auto;
  text-align: center;
}

.auth-box h2 {
  margin-bottom: 20px;
  color: #292524;
}

.auth-box input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 2px solid #a8a29e;
  font-size: 16px;
}

.auth-box input:focus {
  outline: none;
  border-color: #292524;
}

.auth-box button {
  width: 100%;
  margin-top: 10px;
}

.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid #e7e5e4;
  border-top: 4px solid #292524;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.form-controls {
  background: white;
  padding: 20px;
  border: 2px solid #292524;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.form-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.submission-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e7e5e4;
}

.submission-actions button {
  padding: 6px 12px;
  font-size: 14px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active {
  background: #f0fdf4;
  color: #166534;
  border-color: #166534;
}

.status-disabled {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #b91c1c;
}

.status-inactive {
  background: #fef3c7;
  color: #78350f;
  border-color: #78350f;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 30px;
  border: 2px solid #292524;
  width: 90%;
  max-width: 500px;
  text-align: center;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.form-info {
  background: #fef3c7;
  padding: 15px;
  border: 2px solid #d97706;
  margin-bottom: 15px;
}

.form-info p {
  margin: 5px 0;
}

/* Support Button */
.support-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 12px 24px;
  background: white;
  color: #292524;
  border: 2px solid #292524;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
  z-index: 100;
}

.support-button:hover {
  background: #292524;
  color: #fff7ed;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Support Modal */
.support-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(41, 37, 36, 0.7);
  overflow-y: auto;
}

.support-modal-content {
  background-color: #fff7ed;
  margin: 5% auto;
  padding: 0;
  border: 2px solid #292524;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.support-modal-header {
  background: white;
  padding: 30px;
  border-bottom: 2px solid #292524;
  position: relative;
}

.support-modal-header h2 {
  margin: 0;
  text-align: left;
  font-size: 1.8rem;
}

.support-close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #292524;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 1;
}

.support-close:hover {
  color: #b91c1c;
}

.support-modal-body {
  padding: 30px;
}

.support-modal-body .form-group {
  margin-bottom: 20px;
}

.support-modal-body textarea {
  min-height: 120px;
  resize: vertical;
}

.support-modal-body .btn {
  width: 100%;
}

/* Cookie Notice */
.cookie-notice {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #e7e5e4;
}

.cookie-notice p {
  font-size: 0.85rem;
  color: #78716c;
  margin: 0;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .create-form {
    padding: 20px;
  }

  .plan.featured {
    transform: none;
  }

  .submissions-header {
    flex-direction: column;
    gap: 15px;
  }

  .support-button {
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 13px;
  }

  .support-modal-content {
    margin: 10% auto;
    width: 95%;
  }

  .support-modal-header {
    padding: 20px;
  }

  .support-modal-body {
    padding: 20px;
  }
}
