/* =========================================================
   BUGHUNT: BATTLE END SCREENS (VICTORY & DEFEAT)
   Ultra-sleek, professional cyber-arcade victory & defeat UI
========================================================= */

/* ---------------------------------------------------------
   1. VICTORY SCREEN
--------------------------------------------------------- */
#victory-screen {
    display: none;
    position: relative;
    width: 100%;
    min-height: 100vh;
    z-index: 250;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 75% 35%, rgba(250, 204, 21, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 25% 65%, rgba(124, 58, 237, 0.25) 0%, transparent 50%),
        linear-gradient(
            90deg,
            rgba(10, 4, 22, 0.92) 0%,
            rgba(18, 8, 36, 0.85) 50%,
            rgba(10, 4, 22, 0.95) 100%
        ),
        url("bgassets/mainmenu.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#victory-screen:not([style*="display: none"]),
#victory-screen[style*="display: flex"],
#victory-screen[style*="display: block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Master Dark Vignette */
#victory-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(110, 0, 160, 0.12),
        transparent 45%
    );
    box-shadow:
        inset 0 0 180px rgba(0, 0, 0, 0.92),
        inset 0 0 80px rgba(250, 204, 21, 0.15);
    pointer-events: none;
    z-index: 1;
}

/* Master Scanlines */
#victory-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.015) 0px,
        rgba(255, 255, 255, 0.015) 1px,
        transparent 1px,
        transparent 5px
    );
    opacity: 0.35;
    pointer-events: none;
    z-index: 2;
}

/* Golden Victory Particles Container */
#victory-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

/* Player Sprite removed for clean, focused cyberpunk victory UI */
#victory-frau {
    display: none !important;
}

.end-screen-vignette {
    display: none !important;
}

/* Victory Center Content Card - Perfectly Centered */
.victory-panel {
    position: relative;
    margin: clamp(24px, 4vh, 48px) auto;
    width: min(780px, 94vw);
    max-width: 94vw;
    z-index: 25;
    background: rgba(22, 12, 42, 0.94);
    border: 1.5px solid rgba(250, 204, 21, 0.55);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.85),
        0 0 40px rgba(250, 204, 21, 0.25),
        inset 0 0 25px rgba(250, 204, 21, 0.08);
    padding: clamp(22px, 3.2vmin, 38px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
    animation: victoryCardEntry 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes victoryCardEntry {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.end-panel-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #fde047;
    text-shadow: 0 0 12px rgba(250, 204, 21, 0.8);
    margin: 0;
    text-transform: uppercase;
}

.victory-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 46px;
    letter-spacing: 4px;
    color: #fef08a;
    margin: 0;
    text-shadow:
        4px 4px 0 #713f12,
        8px 8px 0 #180028,
        0 0 20px #eab308,
        0 0 35px rgba(234, 179, 8, 0.85);
}

.end-panel-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(250, 204, 21, 0.6) 50%, transparent 100%);
    margin: 4px 0;
}

.end-panel-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 17.5px;
    font-weight: 600;
    line-height: 1.55;
    color: #f3e8ff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Stats Container */
.end-panel-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

.end-stat-row {
    background: linear-gradient(135deg, rgba(32, 20, 52, 0.95), rgba(16, 10, 30, 0.98));
    border: 1px solid rgba(250, 204, 21, 0.35);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.end-stat-row:hover {
    border-color: #facc15;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 204, 21, 0.3);
}

.end-stat-icon {
    font-size: 26px;
    filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.6));
}

.end-stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #e9d5ff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.end-stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #fef08a;
    line-height: 1.35;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

/* Next Enemy Button */
.victory-btn {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #eab308, #ca8a04) !important;
    border: 1.5px solid #fef08a !important;
    border-radius: 12px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    color: #1a0d02 !important;
    box-shadow: 0 8px 30px rgba(234, 179, 8, 0.5) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 6px !important;
}

.victory-btn:hover {
    background: linear-gradient(135deg, #facc15, #eab308) !important;
    box-shadow: 0 12px 40px rgba(234, 179, 8, 0.75) !important;
    transform: translateY(-3px) scale(1.02) !important;
    color: #000000 !important;
}

/* =========================================================
   POST-BATTLE TACTICAL REWARD CHOICES & STAGE BONUS
   ========================================================= */

.victory-rewards-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 4px 0;
    box-sizing: border-box;
    animation: rewardSectionIn 0.35s ease-out;
}

@keyframes rewardSectionIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rewards-section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.rewards-section-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #fde047;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.7);
}

.rewards-section-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 13px;
    letter-spacing: 1.5px;
    color: #ffffff;
    margin: 2px 0 0 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.rewards-section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #d8b4fe;
    margin: 0;
}

/* 3-Card Interactive Grid */
.reward-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.reward-choice-card {
    position: relative;
    background: linear-gradient(145deg, rgba(34, 20, 56, 0.95), rgba(18, 10, 32, 0.98));
    border: 1.5px solid rgba(250, 204, 21, 0.35);
    border-radius: 14px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.reward-choice-card:hover:not(.disabled):not(.dimmed) {
    transform: translateY(-4px) scale(1.02);
    border-color: #facc15;
    background: linear-gradient(145deg, rgba(46, 26, 78, 0.98), rgba(24, 12, 42, 0.98));
    box-shadow: 0 8px 24px rgba(250, 204, 21, 0.35);
}

.reward-choice-card:active:not(.disabled):not(.dimmed) {
    transform: translateY(-1px) scale(0.99);
}

/* Card Pill Tag (Replacing random emojis with clean cyber badges) */
.reward-card-pill-tag {
    align-self: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: transform 0.2s ease;
}

.reward-choice-card:hover .reward-card-pill-tag {
    transform: scale(1.06);
}

.reward-card-pill-tag.heal-tag {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(74, 222, 128, 0.5);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.reward-card-pill-tag.bank-tag {
    color: #fde047;
    background: rgba(250, 204, 21, 0.18);
    border: 1px solid rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.reward-card-pill-tag.hint-tag {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.end-stat-tech-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 9999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fde047;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.4);
    margin-bottom: 2px;
}

.stage-bonus-badge-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #180028;
    border-radius: 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.6);
    flex-shrink: 0;
}

/* Card Content & Typography */
.reward-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.reward-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    font-weight: 800;
    color: #fef08a;
    margin: 0;
    letter-spacing: 0.3px;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.4);
}

.reward-card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #e2e8f0;
    margin: 0;
    line-height: 1.35;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status Badges */
.reward-card-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.heal-badge {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.bank-badge {
    background: rgba(234, 179, 8, 0.18);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.35);
}

.hint-badge {
    background: rgba(56, 189, 248, 0.18);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

/* Checkmark Indicator */
.reward-card-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #22c55e;
    color: #052e16;
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.4);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

/* Selected State */
.reward-choice-card.selected {
    border-color: #22c55e !important;
    background: linear-gradient(145deg, rgba(20, 56, 36, 0.98), rgba(10, 32, 20, 0.98)) !important;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.45) !important;
    transform: scale(1.02);
}

.reward-choice-card.selected .reward-card-title {
    color: #86efac;
    text-shadow: 0 0 10px rgba(134, 239, 172, 0.6);
}

.reward-choice-card.selected .reward-card-check {
    opacity: 1;
    transform: scale(1);
}

/* Dimmed State (When other card selected) */
.reward-choice-card.dimmed {
    opacity: 0.38;
    filter: grayscale(45%);
    cursor: default;
    pointer-events: none;
    transform: none !important;
}

/* Disabled State (e.g. HP already full) */
.reward-choice-card.disabled {
    opacity: 0.45;
    filter: grayscale(60%);
    cursor: not-allowed;
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(15, 10, 24, 0.6);
}

.reward-choice-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(148, 163, 184, 0.25);
}

/* Stage Completion Greed Bonus Banner */
.victory-stage-bonus-banner {
    background: linear-gradient(135deg, rgba(42, 28, 10, 0.95), rgba(24, 14, 5, 0.98));
    border: 2px solid #facc15;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    box-shadow: 0 0 30px rgba(250, 204, 21, 0.35);
    animation: bonusBannerPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes bonusBannerPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.stage-bonus-glow-icon {
    font-size: 38px;
    filter: drop-shadow(0 0 12px rgba(250, 204, 21, 0.8));
    animation: bonusIconPulse 2s ease-in-out infinite;
}

@keyframes bonusIconPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(5deg); }
}

.stage-bonus-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.stage-bonus-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fde047;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
}

.stage-bonus-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 13.5px;
    letter-spacing: 1px;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.stage-bonus-desc {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #fef08a;
    margin: 0;
}

.stage-bonus-calc-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.calc-pill {
    display: flex;
    flex-direction: column;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.calc-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
}

.calc-val {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
}

.bonus-pill {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.bonus-pill .calc-val {
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.total-pill {
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.2);
}

.total-pill .calc-val {
    color: #fef08a;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
}

.calc-plus, .calc-eq {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 900;
    color: #fde047;
}

/* Next Enemy Button State */
.victory-btn.waiting-reward {
    background: linear-gradient(135deg, #eab308, #ca8a04) !important;
    border: 1.5px solid #fef08a !important;
    color: #1a0d02 !important;
    box-shadow: 0 8px 30px rgba(234, 179, 8, 0.5) !important;
    cursor: pointer !important;
}

@media (max-width: 680px) {
    .reward-cards-grid {
        grid-template-columns: 1fr;
    }
    .stage-bonus-calc-strip {
        gap: 6px;
    }
}


/* ---------------------------------------------------------
   2. DEFEAT SCREEN
--------------------------------------------------------- */
#defeat-screen {
    display: none;
    position: relative;
    width: 100%;
    min-height: 100vh;
    z-index: 250;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 75% 35%, rgba(239, 68, 68, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 25% 65%, rgba(150, 10, 30, 0.3) 0%, transparent 50%),
        linear-gradient(
            90deg,
            rgba(20, 4, 12, 0.95) 0%,
            rgba(26, 6, 16, 0.88) 50%,
            rgba(18, 3, 10, 0.96) 100%
        ),
        url("bgassets/mainmenu.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#defeat-screen:not([style*="display: none"]),
#defeat-screen[style*="display: flex"],
#defeat-screen[style*="display: block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Master Dark Vignette (Emergency Crimson) */
#defeat-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(180, 20, 40, 0.15),
        transparent 45%
    );
    box-shadow:
        inset 0 0 180px rgba(0, 0, 0, 0.94),
        inset 0 0 80px rgba(239, 68, 68, 0.2);
    pointer-events: none;
    z-index: 1;
}

/* Master Scanlines */
#defeat-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.015) 0px,
        rgba(255, 255, 255, 0.015) 1px,
        transparent 1px,
        transparent 5px
    );
    opacity: 0.35;
    pointer-events: none;
    z-index: 2;
}

#defeat-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

/* Floating Frau Character (Defeated Pose) */
#defeat-frau {
    position: absolute;
    left: clamp(20px, 6vw, 100px);
    bottom: clamp(20px, 8vh, 90px);
    max-height: clamp(260px, 60vh, 660px);
    width: auto;
    object-fit: contain;
    z-index: 10;
    filter: drop-shadow(0 0 30px rgba(239, 68, 68, 0.5)) drop-shadow(0 20px 40px rgba(0, 0, 0, 0.95));
    animation: defeatFrauBreath 3.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes defeatFrauBreath {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(0.99);
    }
}

.defeat-vignette {
    position: absolute;
    left: clamp(10px, 4vw, 80px);
    bottom: clamp(10px, 4vh, 40px);
    width: clamp(220px, 32vw, 550px);
    height: clamp(40px, 10vh, 110px);
    background: radial-gradient(ellipse at center, rgba(239, 68, 68, 0.45) 0%, rgba(100, 10, 20, 0.25) 45%, transparent 75%);
    border-radius: 50%;
    filter: blur(8px);
    z-index: 5;
    pointer-events: none;
}

/* Defeat Center Content Card */
.defeat-panel {
    position: relative;
    margin: auto;
    width: min(600px, 92vw);
    max-width: 92vw;
    z-index: 25;
    background: rgba(26, 8, 16, 0.95);
    border: 1.5px solid rgba(239, 68, 68, 0.55);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(239, 68, 68, 0.25),
        inset 0 0 25px rgba(239, 68, 68, 0.08);
    padding: clamp(20px, 3.5vmin, 40px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: center;
    animation: defeatCardEntry 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes defeatCardEntry {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.defeat-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 44px;
    letter-spacing: 4px;
    color: #fecaca;
    margin: 0;
    text-shadow:
        4px 4px 0 #450a0a,
        8px 8px 0 #180000,
        0 0 20px #ef4444,
        0 0 35px rgba(239, 68, 68, 0.85);
}

.defeat-divider {
    background: linear-gradient(90deg, transparent 0%, rgba(239, 68, 68, 0.6) 50%, transparent 100%);
}

#defeat-message {
    color: #fecdd3;
    white-space: pre-line;
}

/* Defeat Tactical Recovery Box */
.defeat-tip-box {
    background: rgba(18, 4, 10, 0.85);
    border: 1px dashed rgba(239, 68, 68, 0.45);
    border-radius: 12px;
    padding: 14px 18px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.defeat-tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.defeat-tip-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #fca5a5;
    margin: 0;
}

/* Defeat Action Buttons Row */
.defeat-actions-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

.defeat-retry-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1.5px solid #fde68a !important;
    border-radius: 12px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.defeat-retry-btn:hover {
    background: linear-gradient(135deg, #fbbf24, #b45309) !important;
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.7) !important;
    transform: translateY(-2px) scale(1.01) !important;
}

/* Return to Difficulty Button */
.defeat-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    border: 1.5px solid #fca5a5 !important;
    border-radius: 12px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

.defeat-btn:hover {
    background: linear-gradient(135deg, #f87171, #dc2626) !important;
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.75) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

/* Floating Particle Animations */
.end-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFlyUp 6s linear infinite;
}

@keyframes particleFlyUp {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    15% {
        opacity: 0.9;
    }
    85% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-1100px) scale(1.3);
        opacity: 0;
    }
}

/* Responsive Handling for Centered Victory and Defeat Panels */
@media (max-width: 1024px) {
    #victory-frau,
    #defeat-frau {
        opacity: 0.18 !important;
        left: 10px !important;
        max-height: 40vh !important;
        filter: blur(1px) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.8)) !important;
    }
    .end-screen-vignette {
        opacity: 0.25 !important;
    }
}

