:root {
  --primary: #6c5ce7;
  --secondary: #a29bfe;
  --background: #fafafa;
  --text: #2d3436;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background: var(--background);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  padding: 2rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  opacity: 0.9;
  font-weight: 300;
  letter-spacing: 0.5px;
}

main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mood-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.mood-buttons a {
  background: var(--secondary);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.mood-buttons a:hover {
  background: var(--primary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-weight: 600;
}

input[type="text"] {
  padding: 0.75rem 1rem;
  border: 2px solid var(--secondary);
  border-radius: 0.5rem;
  font-size: 1rem;
  outline: none;
  background: #f0f0f0;
}

input[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.poster-preview {
  position: relative;
  border: 4px dashed var(--secondary);
  border-radius: 1rem;
  padding: 0;
  text-align: center;
  min-height: 400px;
  background: #fff;
  overflow: hidden;
}

.poster-preview iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
  border-radius: 0.75rem;
  display: block;
}

/* Invisible clickable link over iframe */
.iframe-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  text-indent: -9999px;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
  opacity: 0.6;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 2rem;
  }

  .card {
    padding: 1.5rem;
  }

  .mood-buttons a {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
  }
}
.poster-preview {
  position: relative;
  border: 4px dashed var(--secondary);
  border-radius: 1rem;
  text-align: center;
  background: #fff;
  overflow: hidden;
  padding: 0;
  height: auto;
}

.poster-preview iframe {
  width: 100%;
  height: 800px;  /* Try 800px or adjust based on your tallest poster */
  border: none;
  border-radius: 0.75rem;
  display: block;
}

#caption{
    text-align: center;
}