:root {
    --card-aspect: 0.714; /* 2.5:3.5 Verhältnis wie echte Pokémon-Karten */
    --card-radius: 4.55% / 3.5%;
    --card-edge: hsl(47, 100%, 78%);
    --card-glow: hsl(175, 100%, 90%);
    
    /* 3D effect variables */
    --rotate-x: 0deg;
    --rotate-y: 0deg;
    --pointer-x: 0.5;
    --pointer-y: 0.5;
    --pointer-from-center: 0;
    --card-opacity: 1;
    --card-scale: 1;
    --brightness: 1;
    --contrast: 1;
    --saturate: 1;
    --background-x: 50%;
    --background-y: 50%;
    --glow-size: 100%;
    --glow-blur: 0px;
}

.card-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 1000001;
    perspective: 1000px;
    /* Touch-Scrolling optimieren */
    touch-action: manipulation;
    overscroll-behavior: contain;
}

.pokemon-coupon-card {
    aspect-ratio: var(--card-aspect);
    border-radius: var(--card-radius);
    position: fixed;
    width: 100%;
    max-width: min(400px, 90vw);
    transform-style: preserve-3d;
    cursor: pointer;
    background: var(--card-bg);
    border: 10px solid var(--card-border-color, #FFD700);
    visibility: hidden;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8)
        rotateY(calc(var(--rotate-x, 0) * 1deg))
        rotateX(calc(var(--rotate-y, 0) * -1deg));
    pointer-events: none;
    overflow: hidden;
    will-change: transform, filter;
    transition: 
        transform 0.15s cubic-bezier(0.4, 0.0, 0.2, 1),
        filter 0.15s ease-out,
        opacity 0.3s ease-in-out,
        visibility 0.3s ease-in-out;
    filter: brightness(calc(var(--brightness, 1)))
            contrast(calc(var(--contrast, 1)))
            saturate(calc(var(--saturate, 1)));
    backface-visibility: hidden;
    z-index: 1000002;
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    /* Touch-Optimierungen */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.pokemon-coupon-card.active {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1)
        rotateY(calc(var(--rotate-x, 0) * 1deg))
        rotateX(calc(var(--rotate-y, 0) * -1deg));
}

.card-translater {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.card-rotator {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.card-content {
    background: var(--card-bg);
    border-radius: calc(var(--card-radius) * 0.9);
    padding: 10px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transform-style: preserve-3d;
    color: white;
    box-shadow: 
        0 0 3px -1px white, 
        0 0 3px 1px var(--card-edge), 
        0 0 12px 2px var(--card-glow), 
        0px 10px 20px -5px black;
    gap: 4px;
    box-sizing: border-box;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 4px;
    min-height: 28px;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 4px;
}

.card-evolution {
    position: absolute;
    top: -3px;
    left: 2px;
    font-size: 9px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-style: italic;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.coupon-title {
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-top: 12px;
    flex: 1;
}

.hp-value {
    background: #FF0000;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    margin-top: 12px;
    align-self: flex-start;
}

.card-header-right {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.type-symbol {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s ease;
}

.type-symbol:hover {
    transform: scale(1.1);
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.type-symbol::before {
    content: '\1F525';
    font-size: 14px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.card-image {
    position: relative;
    height: 38%;
    width: 88%;
    margin: 4px auto 8px auto;
    background: transparent;
    border-radius: 8px;
    transform: translateZ(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-border {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f3f3f3, #ffffff);
    border: 3px solid #e5be5e;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.discount-amount {
    font-size: 18px;
    font-weight: bold;
    color: var(--card-bg);
    line-height: 1.3;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* === Attacken-Bereiche (flaches Pokémon-Karten-Design ohne Boxen) === */
.move-section {
    margin: 8px 0;
    padding: 0;
    background: transparent; /* Keine Box-Hintergründe */
    border: none; /* Keine Rahmen */
    transform: translateZ(1px);
    position: relative;
}

/* Trennlinie zwischen Move-Sections (außer der letzten) */
.move-section:not(:last-of-type)::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.25);
    margin-top: 12px;
    /* Horizontale Trennlinie wie bei Pokémon-Karten */
}

/* Header-Bereich: Energie-Symbole + Attacken-Name in einer Linie */
.move-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    /* Linksbündige Ausrichtung wie bei Originalkarten */
}

/* Energie-Symbole linksbündig */
.energy-symbols {
    display: flex;
    gap: 2px;
}

.energy-symbol {
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Attacken-Name (wie auf Pokémon-Karten) */
.move-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 2px;
    /* Subtile Unterstreichung wie bei Pokémon-Attacken */
}

/* Content-Bereich: Gutscheincode oder Bedingungen */
.move-content {
    margin-left: 24px; /* Eingerückt unter Energie-Symbole */
    text-align: left;
    /* Linksbündige Ausrichtung */
}

/* Gutscheincode - jetzt im Bild-Bereich, siehe .discount-amount .coupon-code */
.discount-amount .coupon-code {
    font-size: 24px;
    font-weight: 900;
    color: var(--card-bg);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.discount-amount .coupon-code:hover {
    transform: scale(1.05);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}


/* Copy-Feedback Animation */
.copy-feedback {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,255,0,0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    animation: copyFeedback 2s ease-out;
    z-index: 10;
}

@keyframes copyFeedback {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bedingungstext - klein und dezent */
.conditions-section {
    font-size: 11px;
    color: rgba(255,255,255,0.9);
    line-height: 1.4;
    font-weight: 400;
    /* Kleine Schrift wie bei Pokémon-Karten-Beschreibungen */
}

/* Legacy-Klassen für Kompatibilität - transparent gemacht */
.move-box {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    min-height: auto;
    /* Alte Box-Struktur entfernt, neue Sections übernehmen */
}

.move-layout {
    display: none; /* Neue move-section Struktur wird verwendet */
}

.damage-value, .move-description {
    display: none; /* Durch neue move-content Struktur ersetzt */
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 3px;
    padding-bottom: 2px;
    border-top: 1px solid rgba(255,255,255,0.2);
    min-height: 16px;
}

.card-stats-left {
    font-size: 9px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    margin-left: 2px;
}

.card-stats-right {
    font-size: 9px;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-right: 2px;
}

.card-stats-right span::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #FFD700;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
}

.card-shine {
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--card-radius) * 0.95);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 5%,
        rgba(255, 255, 255, 0.05) 15%,
        rgba(255, 255, 255, 0.15) 25%,
        rgba(255, 255, 255, 0.35) 35%,
        rgba(255, 255, 255, 0.85) 45%,
        rgba(255, 255, 255, 0.35) 55%,
        rgba(255, 255, 255, 0.15) 65%,
        rgba(255, 255, 255, 0.05) 75%,
        rgba(255, 255, 255, 0) 85%,
        rgba(255, 255, 255, 0) 100%
    );
    background-position: 
        calc(var(--pointer-x) * 100%) 
        calc(var(--pointer-y) * 100%);
    background-size: 500% 500%;
    mix-blend-mode: soft-light;
    opacity: var(--pointer-from-center, 0);
    z-index: 5;
    pointer-events: none;
    transition: all 0.15s ease-out;
    transform: translateZ(4px);
    filter: blur(3px);
}

.holo-overlay {
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--card-radius) * 0.95);
    background: radial-gradient(
        circle at 
        calc(var(--pointer-x) * 100%) 
        calc(var(--pointer-y) * 100%),
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.6) 5%,
        rgba(255, 255, 255, 0.3) 15%,
        rgba(255, 255, 255, 0.15) 25%,
        rgba(255, 255, 255, 0.05) 45%,
        transparent 60%
    );
    background-size: 300% 300%;
    mix-blend-mode: soft-light;
    opacity: var(--pointer-from-center, 0);
    z-index: 3;
    pointer-events: none;
    transition: all 0.15s ease-out;
    transform: translateZ(4px);
    filter: blur(2px);
}

.pokemon-pattern {
    position: absolute;
    inset: -1px;
    opacity: 0.02;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="white"/></svg>');
    background-size: 40px 40px;
    pointer-events: none;
    transform: translateZ(0);
    border-radius: calc(var(--card-radius) * 0.95);
    filter: blur(1px);
}

.card-trigger {
    aspect-ratio: var(--card-aspect);
    position: fixed;
    bottom: 20px;
    right: 20px;
    transform: rotate(-5deg);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--card-radius);
    background: linear-gradient(45deg, #1a237e, #283593);
    border: 4px solid var(--card-border-color, #FFD700);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000000;
    animation: bounce 1s ease infinite;
    visibility: visible;
    pointer-events: auto;
}

@keyframes bounce {
    0%, 100% {
        transform: rotate(-5deg) translateY(0);
    }
    50% {
        transform: rotate(-5deg) translateY(-10px);
    }
}

.card-trigger:hover {
    transform: rotate(-5deg) scale(1.1);
    animation: none;
}

.card-trigger::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: repeating-linear-gradient(
        45deg,
        #1a237e,
        #1a237e 10px,
        #283593 10px,
        #283593 20px
    );
    border-radius: calc(var(--card-radius) * 0.8);
}

.card-trigger::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" fill="%23FFD700"/><circle cx="50" cy="50" r="20" fill="%23FFD700" stroke="%231a237e" stroke-width="6"/></svg>');
    background-size: contain;
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000000;
    /* Touch-Scrolling außerhalb der Karte ermöglichen */
    touch-action: auto;
    overscroll-behavior: auto;
}

.backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Add opening animation */
@keyframes cardOpen {
    from {
        visibility: visible;
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8)
            rotateY(calc(var(--rotate-x, 0) * 1deg))
            rotateX(calc(var(--rotate-y, 0) * -1deg));
    }
    to {
        visibility: visible;
        opacity: 1;
        transform: translate(-50%, -50%) scale(1)
            rotateY(calc(var(--rotate-x, 0) * 1deg))
            rotateX(calc(var(--rotate-y, 0) * -1deg));
    }
}

/* Add closing animation */
@keyframes cardClose {
    from {
        visibility: visible;
        opacity: 1;
        transform: translate(-50%, -50%) scale(1)
            rotateY(calc(var(--rotate-x, 0) * 1deg))
            rotateX(calc(var(--rotate-y, 0) * -1deg));
    }
    to {
        visibility: hidden;
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8)
            rotateY(calc(var(--rotate-x, 0) * 1deg))
            rotateX(calc(var(--rotate-y, 0) * -1deg));
    }
} 

/* === POKEMON-CARD FEEDBACK MESSAGES (TOAST) === */

#pokemon-feedback-container {
    position: fixed;
    top: 20px; /* Abstand vom oberen Rand */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000003; /* Über der Coupon Card (1000002) */
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* Klicks durchlassen */
    width: 90%; /* Responsive Breite */
    max-width: 400px; /* Maximale Breite */
}

.pokemon-feedback-message {
    background-color: rgba(39, 174, 96, 0.95); /* Erfolg - Grün mit höherer Opazität */
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px; /* Abstand zwischen Nachrichten */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* Stärkerer Schatten für bessere Sichtbarkeit */
    font-family: 'Lores 9 Wide', sans-serif; /* Pokémon-Schriftart */
    font-size: 14px;
    text-align: center;
    opacity: 1;
    animation: fadeInSlideDown 0.5s ease-out forwards;
    position: relative;
    /* Zusätzliche Sichtbarkeit während Karten-Animation */
    backdrop-filter: blur(2px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    word-wrap: break-word; /* Lange Texte umbrechen */
    white-space: normal; /* Normales Leerzeichenverhalten */
}

.pokemon-feedback-message--error {
    background-color: rgba(255, 0, 0, 0.95); /* Fehler - Rot mit höherer Opazität */
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4); /* Roter Schatten für Fehler */
}

.pokemon-feedback-message--loading {
    background-color: rgba(52, 152, 219, 0.95); /* Laden - Blau mit höherer Opazität */
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4); /* Blauer Schatten für Loading */
}

.pokemon-feedback-message .spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Animations */
@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutSlideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.pokemon-feedback-message.hide {
    animation: fadeOutSlideUp 0.5s ease-out forwards;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
    #pokemon-feedback-container {
        width: 95%;
        top: 10px; /* Etwas höher auf kleinen Bildschirmen */
    }

    .pokemon-feedback-message {
        font-size: 12px;
        padding: 10px 15px;
    }
    
    .card-header {
        min-height: 24px;
        margin-bottom: 6px;
    }
    
    .type-symbol {
        width: 20px;
        height: 20px;
    }
    
    .card-header-right {
        gap: 2px;
    }
} 