/* Montserrat Variable (Supports weights 100 to 900) */
@font-face {
  font-family: 'Montserrat';
  src: url('./fonts/Montserrat/Montserrat-VariableFont_wght.woff2') format('woff2-variations'),
       url('./fonts/Montserrat/Montserrat-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
}

/* Merriweather Variable Italic (Supports weights 300 to 900) */
@font-face {
  font-family: 'Merriweather';
  src: url('./fonts/Merriweather/Merriweather-Italic-VariableFont.woff2') format('woff2-variations'),
       url('./fonts/Merriweather/Merriweather-Italic-VariableFont.woff2') format('woff2');
  font-weight: 300 900;
  font-style: italic;
}

:root {
    --primary-color: #2c3e50;
    --accent-color: #27ae60;
    --spicy-color: #c0392b;
    --text-color: #333;
    --card-bg: #ffffff; /* Fester Hex-Wert ist besser für Screenshots als rgba */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-color);
    transition: background 0.5s ease;
}

body.is-spicy {
    background: linear-gradient(135deg, #8e0e00 0%, #1f1c18 100%);
}

/* Container für Screenshot-Bereich */
.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    text-align: center;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.3s ease;
}

h1 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 20px;
}

.verse-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 30px;
    padding: 10px;
    /* padding: 150px; */
    transition: all 0.25s ease;
}

.verse-text {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #2c3e50;
    font-style: italic;
    margin-bottom: 20px;
    transition: opacity 0.25s ease-in-out, transform 0.25s ease, color 0.25s ease, font-size 0.25s ease;
    opacity: 1;
}

.verse-reference {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
    transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.tags {
    margin-top: 15px;
    display: flex;
    gap: 5px;
    justify-content: center;
}
.tag {
    background: #eee;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Controls Area (wird nicht gescreenshottet) */
.controls {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: opacity 0.25s ease, transform 0.25s ease, height 0.25s ease, padding 0.25s ease, margin 0.25s ease;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    border: none;
    padding: 12px 24px;
    font-size: 0.95rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Montserrat', sans-serif;
}

button:active { transform: translateY(1px); }

.btn-normal { background: var(--primary-color); color: white; }
.btn-spicy { background: var(--spicy-color); color: white; }

/* Share Button Style */
.btn-share {
    background: transparent;
    color: #555;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.btn-share:hover { background: #f9f9f9; border-color: #ccc; }

/* Minimal non-layout busy state to prevent double clicks without visible layout shift */
.btn-share[aria-busy="true"] {
    opacity: 0.85;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* Icons (SVG) */
.icon { width: 18px; height: 18px; fill: currentColor; }

/* Footer Branding (sichtbar nur im Screenshot) */
.watermark {
    /* Use opacity/visibility for smooth transitions instead of display */
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 20px;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    /* Make watermark absolutely positioned inside the card when visible for screenshot */
    position: absolute;
    right: 16px;
    bottom: 16px;
    background: rgba(255,255,255,0.06);
    padding: 6px 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.watermark.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Large decorative quote mark behind the verse when sharing */
.verse-container { position: relative; }
.verse-container::before {
    content: "“";
    position: absolute;
    left: -12px;
    top: -28px;
    font-family: 'Merriweather', serif;
    font-size: 6.5rem;
    line-height: 1;
    color: rgba(0,0,0,0.04);
    z-index: 0;
    pointer-events: none;
}
.verse-text { position: relative; z-index: 1; }

/* Share-mode: special card styling for exported image */
.card.share-mode {
    background: linear-gradient(180deg, #fffefc 0%, #fffefc 40%, #f7fbf9 100%);
    padding: 48px;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 6px 20px rgba(0,0,0,0.25);
    transition: all 0.2s ease;
    overflow: visible;
}
.card.share-mode .verse-text {
    font-size: 1.8rem;
    color: #1f2b2a;
    text-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Decorative outer frame using pseudo element (subtle) */
.card.share-mode::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: calc(20px + 10px);
    background: linear-gradient(135deg, rgba(255,215,150,0.06), rgba(0,0,0,0.02));
    z-index: -1;
    filter: blur(6px);
}

/* Small tilted stamp that appears during share */
.share-stamp {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, rgba(39,174,96,0.95), rgba(34,139,82,0.95));
    color: white;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    transform: rotate(-6deg);
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
    z-index: 2;
}

.controls.hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    height: 0;
    padding-top: 0;
    margin-top: 0;
    overflow: hidden;
}