:root {
  --blush: #fdd5d5;
  --sage: #84a98c;
  --ivory: #fdfaf3;
  --rose: #be185d;
  --gold: #b08d4a;
  --text: #332d29;
  
  --font-display: 'Cormorant', serif;
  --font-script: 'Pinyon Script', cursive;
  --font-body: 'Lora', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 24px;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 20px 40px;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--ivory);
  overflow: hidden;
}

.arch-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floral-arch {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  max-width: 90%;
}

.magazine-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.contest-title {
  font-family: var(--font-script);
  font-size: 5rem;
  color: var(--rose);
  margin: -15px 0 10px 0;
  line-height: 1.1;
}

.subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.05em;
}

.prize-banner {
  background: var(--gold);
  color: #fff;
  padding: 16px 24px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: 40px;
  border-radius: 999px;
  box-shadow: 0 8px 25px rgba(176, 141, 74, 0.4);
  max-width: 700px;
  width: 100%;
  position: relative;
  z-index: 3;
}

/* Layout */
main {
  padding: 60px 20px;
  background: linear-gradient(to bottom, var(--ivory), #fff);
}

.form-section {
  max-width: 700px;
  margin: 0 auto 80px auto;
}

.gallery-section {
  max-width: 1200px;
  margin: 0 auto 80px auto;
}

/* Cards & Forms */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(176, 141, 74, 0.25);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(190, 24, 93, 0.04);
}

.form-header {
  margin-bottom: 30px;
}

.form-header h3 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--text);
  margin-bottom: 8px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-group {
  margin-bottom: 24px;
  flex: 1;
  text-align: left;
}

label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

input[type="text"], 
input[type="email"], 
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(132, 169, 140, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  transition: all 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.1);
  background: #fff;
}

textarea {
  resize: vertical;
}

.char-count {
  text-align: right;
  font-size: 0.85rem;
  color: #777;
  margin-top: 6px;
}

/* File Upload */
.file-upload {
  position: relative;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.file-custom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 2px dashed rgba(132, 169, 140, 0.6);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.file-custom:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--sage);
}

/* Buttons */
.btn-submit {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--rose) 0%, #981048 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(190, 24, 93, 0.3);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 12px 24px;
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #6b8f72;
}

/* Feedback messages */
.error-message {
  background: #fff0f0;
  color: #d32f2f;
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 24px;
  text-align: center;
  border: 1px solid #ffcdd2;
  font-weight: 500;
}

.thank-you-title {
  font-family: var(--font-script);
  font-size: 4rem;
  color: var(--rose);
  margin-bottom: 10px;
  line-height: 1;
}

.thank-you-text {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.share-panel {
  background: rgba(132, 169, 140, 0.1);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid rgba(132, 169, 140, 0.2);
}

.share-panel h4 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.share-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* Gallery Section */
.gallery-header {
  margin-bottom: 40px;
}

.reader-choice-title {
  font-family: var(--font-script);
  font-size: 4.5rem;
  color: var(--rose);
  margin: 0;
  line-height: 1;
}

.judging-date {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--text);
  margin-top: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 0 10px;
}

.gallery-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.04);
  border: 1px solid rgba(132, 169, 140, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.gallery-img-container {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--blush);
  position: relative;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.gallery-couples {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.2;
}

.gallery-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 16px;
}

.meta-line {
  margin-bottom: 4px;
}

.gallery-story {
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 24px;
  flex-grow: 1;
  line-height: 1.5;
}

.vote-btn {
  width: 100%;
  padding: 12px;
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vote-btn:hover:not(:disabled) {
  background: #6b8f72;
}

.vote-btn.voted,
.vote-btn:disabled {
  background: #e0e0e0;
  cursor: default;
  color: #666;
}

.load-more-container {
  margin-top: 40px;
}

/* Footer */
.footer {
  width: 100%;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  background: transparent;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 60px 15px 30px;
  }
  
  .arch-container {
    min-height: 400px;
  }

  .magazine-title {
    font-size: 2rem;
  }

  .contest-title {
    font-size: 3.5rem;
  }
  
  .subtitle {
    font-size: 1.2rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .glass-card {
    padding: 30px 20px;
  }
  
  .reader-choice-title {
    font-size: 3rem;
  }
}
