/* ========================================================================
   REVEAL-IT: REDESIGN 2025 (DARK APPLE/REVOLUT-STYLE)
   ======================================================================== */

/* ========================================================================
   1. GRUNDLAGEN & DARK MODE
   ======================================================================== */
html {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  background-color: #121212;
  color: #e0e0e0;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  position: relative; 
  overflow-x: hidden; 
  min-height: 100vh;
}

/* ========================================================================
   2. LAYOUT-WRAPPER (STATT .container)
   ======================================================================== */

.content-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.card {
  background-color: #1e1e1e;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  border: 1px solid #2a2a2a;
}
@media (min-width: 768px) {
  .card {
    padding: 2.5rem 3rem;
  }
}

.main-header .content-wrapper {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.main-footer {
  text-align: center;
  color: #555;
  padding: 2rem 0;
  display: block; /* Footer wieder anzeigen */
}

/* ========================================================================
   3. NEUE AKZENT-THEMES (GRADIENTS)
   ======================================================================== */
[data-theme="sunset-orange"] {
  --g-start: #ff8a65;
  --g-end: #ff7043;
  --g-text: #ff7043;
  --g-bg-accent: #ffb74d; /* Eine ergänzende, etwas hellere Orange für den Hintergrund */
}
[data-theme="default-indigo"] {
  --g-start: #7986cb;
  --g-end: #3f51b5;
  --g-text: #7986cb;
  --g-bg-accent: #9fa8da; /* Hellere Indigo */
}
[data-theme="forest-green"] {
  --g-start: #81c784;
  --g-end: #4caf50;
  --g-text: #66bb6a;
  --g-bg-accent: #a5d6a7; /* Hellere Grün */
}
[data-theme="ocean-blue"] {
  --g-start: #4dd0e1;
  --g-end: #00bcd4;
  --g-text: #4dd0e1;
  --g-bg-accent: #80deea; /* Hellere Cyan */
}
[data-theme="royal-purple"] {
  --g-start: #9575cd;
  --g-end: #673ab7;
  --g-text: #9575cd;
  --g-bg-accent: #b39ddb; /* Hellere Lila */
}
[data-theme="spicy-paprika"] {
  --g-start: #e57373;
  --g-end: #d32f2f;
  --g-text: #e57373;
  --g-bg-accent: #ef9a9a; /* Hellere Rot */
}
[data-theme="golden-hour"] {
  --g-start: #ffee58;
  --g-end: #fbc02d;
  --g-text: #fdd835;
  --g-bg-accent: #ffeb3b; /* Hellere Gelb */
}
[data-theme="cozy-mocha"] {
  --g-start: #bcaaa4;
  --g-end: #8d6e63;
  --g-text: #bcaaa4;
  --g-bg-accent: #d7ccc8; /* Hellere Braun */
}
[data-theme="midnight-onyx"] {
  --g-start: #40c4ff;
  --g-end: #0091ea;
  --g-text: #40c4ff;
  --g-bg-accent: #80d4fa; /* Hellere Blau */
}

/* ========================================================================
   4. TYPOGRAFIE
   ======================================================================== */
h1, h2, h3 {
  color: var(--g-text);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.8rem, 4vw, 2.25rem);
}
h3 {
  font-size: 1.5rem;
  color: #fff;
}
p {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #aaa;
}
a {
  color: var(--g-text);
  text-decoration: none;
  transition: filter 0.2s ease;
}
a:hover {
  filter: brightness(1.2);
}
small {
  font-size: 0.9rem;
  color: #777;
}

/* ========================================================================
   5. KOMPONENTEN (BUTTONS, FORMS)
   ======================================================================== */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 100px; /* Pill-Shape */
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-transform: none;
  letter-spacing: 0;
}
.btn-primary {
  background: linear-gradient(45deg, var(--g-start), var(--g-end));
  color: #000;
  box-shadow: 0 4px 15px -5px var(--g-start, #fff);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px var(--g-start, #fff);
}
.btn-secondary {
  background-color: #252525;
  color: #e0e0e0;
  border: 1px solid #333;
}
.btn-secondary:hover {
  background-color: #333;
  border-color: #444;
}

.btn-form-submit {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  margin-top: 2.5rem;
}

.btn-copy.copied {
  background: var(--g-text);
  color: #000;
}

/* --- Formulare --- */
.form-group {
  margin-bottom: 2rem;
}
label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: #ccc;
}
input[type="text"],
input[type="email"],
input[type="datetime-local"],
textarea,
.pell-content {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: inherit;
  color: #fff;
  background-color: #121212;
  border: 1px solid #333;
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
.pell-content:focus {
  outline: none;
  border-color: var(--g-text);
  box-shadow: 0 0 10px -5px var(--g-text, #fff);
}
input[type="file"] {
  color: #ccc;
}

/* --- Link Sektionen --- */
.link-section {
  margin-top: 2.5rem;
}
.link-input-wrapper {
  display: flex;
  gap: 0.5rem;
  background-color: #121212;
  border-radius: 12px;
  border: 1px solid #333;
  padding: 6px;
}
.link-input-wrapper input {
  flex-grow: 1;
  border: none;
  background: none;
  padding: 8px 12px;
}
.link-input-wrapper input:focus {
  box-shadow: none;
  border-color: transparent;
}
.link-input-wrapper .btn {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* --- Theme Selector --- */
.theme-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
}
.theme-option label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border: 1px solid #333;
  border-radius: 12px;
  transition: border-color 0.2s;
}
.theme-option label:hover {
  border-color: #555;
}
.theme-option input[type="radio"] { display: none; }
.theme-option input[type="radio"]:checked + label {
  border-color: var(--g-text);
}
.theme-option .swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 0.75rem;
  background: linear-gradient(45deg, var(--c1) 50%, var(--c2) 50%);
  border: 1px solid rgba(255,255,255,0.1);
}

/* --- Pell Editor --- */
.pell {
  border: 1px solid #333;
  border-radius: 12px;
  background: #121212;
}
.pell-actionbar {
  background-color: #1e1e1e;
  border-bottom: 1px solid #333;
  border-radius: 12px 12px 0 0;
}
.pell-button {
  color: #ccc;
}
.pell-button:hover {
  background-color: #333;
}
.pell-button-selected {
  background-color: #444;
}

/* ========================================================================
   6. SEITEN-SPEZIFISCHE STILE
   ======================================================================== */

/* --- Landing Page --- */
.landing-hero {
  text-align: center;
  padding: 4rem 1.5rem 6rem 1.5rem;
}
.landing-hero h1 {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, var(--g-start), var(--g-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing-hero .landing-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  color: #aaa;
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
}
.btn.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  text-align: left;
}
.feature-item {
  background: #1e1e1e;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid #2a2a2a;
}
.feature-item h3 {
  color: var(--g-text);
  font-size: 1.5rem;
}

/* --- Countdown --- */
#countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0;
}
.unit {
  background: #1e1e1e;
  border-radius: 16px;
  padding: 1rem;
  width: 100px;
  text-align: center;
  border: 1px solid #2a2a2a;
}
.unit span {
  display: block;
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--g-text);
  line-height: 1.2;
}
.availability-note, #countdown-wrapper h2 {
  text-align: center;
  color: #ccc;
}
.calendar-button-wrapper {
  text-align: center;
  margin-top: 2rem;
}

/* --- Gift View --- */
#reveal-wrapper {
  text-align: center;
  padding: 3rem 0;
  display: none;
}
#gift-content {
  display: none;
}
.gift-image {
  text-align: center;
  margin-bottom: 2rem;
}
.gift-image img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 16px;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
}
.gift-message {
  margin-top: 2rem;
  font-size: 1.25rem;
  line-height: 1.7;
  padding: 2rem;
  background-color: #1e1e1e;
  border-radius: 16px;
}
.sender-credit {
  text-align: center;
  color: #777;
  margin-top: 2rem;
}
.sender-credit .app-link {
      background: linear-gradient(45deg, var(--g-start), var(--g-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  text-decoration: underline;
}
.gift-image, .gift-message {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.gift-image.is-visible, .gift-message.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gift-message {
  transition-delay: 0.3s;
}

/* --- Sonstiges --- */
.note {
  background-color: #1e1e1e;
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--g-text);
}
.language-switcher {
  margin: 0;
  /* NEU: Flexbox zur Fixierung der Reihenfolge und optionalem Abstand */
  display: flex;
  flex-direction: row; 
  gap: 0.5rem; /* Fügt einen kleinen Abstand zwischen EN und DE hinzu */
}
.language-switcher a, .language-switcher span {
  font-size: 0.9rem;
  font-weight: 500;
  color: #888;
  border: 1px solid #333;
  padding: 5px 10px;
  border-radius: 8px;
  text-decoration: none;
}
.language-switcher a:hover {
  background: #222;
  color: #ccc;
}
.language-switcher span.active {
  color: #fff;
  border-color: var(--g-text);
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 1.5rem 1rem;
  }
  .card {
    padding: 1.5rem 1rem;
  }
  .link-input-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .link-input-wrapper .btn {
    width: 100%;
  }
  .unit {
    width: 70px;
    padding: 0.5rem;
    border-radius: 12px;
  }
  .unit span {
    font-size: 1.8rem;
  }
  .unit {
    font-size: 0.7rem;
  }
}

/* ========================================================================
   10. NEUER "AURORA"-HINTERGRUND-EFFEKT
   ======================================================================== */

body.is-view-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50vw;
  width: 200vw;
  height: 100vh;
  
  background-image: radial-gradient(
    circle at 50% 50%,
    var(--g-start) 0%,
    var(--g-end) 20%,
    transparent 50%
  );
  
  filter: blur(120px);
  opacity: 0.25;
  z-index: -1;
  
  animation: slowDrift 40s ease-in-out infinite alternate;
}

@keyframes slowDrift {
  0% {
    transform: translateX(0);
    opacity: 0.25;
  }
  100% {
    transform: translateX(100vw);
    opacity: 0.35;
  }
}
/* ========================================================================
   11. GIF-SUCHE & BILD-TABS
   ======================================================================== */

.image-upload-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #333;
}
.tab-btn {
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: #888;
  font-weight: 500;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
}
.tab-btn.active {
  color: var(--g-text);
  border-bottom-color: var(--g-text);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#gif-search-input {
  margin-bottom: 1.5rem;
}
#gif-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1rem;
  min-height: 150px;
}
.gif-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}
.gif-item:hover {
  transform: scale(1.05);
}
.gif-item.selected {
  border-color: var(--g-text);
  box-shadow: 0 0 15px -5px var(--g-text);
}