/* =====================================================================
   Game Mode — Visual Effects & Celebrations
   GoldArrowTracker | GNU AGPL v3.0
   ===================================================================== */

/* ── Theme CSS Custom Properties ── */

:root {
    /* Classic (default) */
    --gm-primary: #FFD700;
    --gm-secondary: #FFC107;
    --gm-accent: #FF9800;
    --gm-particle-1: #FFD700;
    --gm-particle-2: #FFC107;
    --gm-particle-3: #FF9800;
    --gm-particle-4: #FF5722;
    --gm-particle-5: #FFFFFF;
}

[data-gm-theme="winter"] {
    --gm-primary: #B3E5FC;
    --gm-secondary: #CFD8DC;
    --gm-accent: #E1F5FE;
    --gm-particle-1: #B3E5FC;
    --gm-particle-2: #CFD8DC;
    --gm-particle-3: #FFFFFF;
    --gm-particle-4: #E1F5FE;
    --gm-particle-5: #CE93D8;
}

[data-gm-theme="spring"] {
    --gm-primary: #F48FB1;
    --gm-secondary: #81C784;
    --gm-accent: #FFF176;
    --gm-particle-1: #F48FB1;
    --gm-particle-2: #81C784;
    --gm-particle-3: #FFF176;
    --gm-particle-4: #B39DDB;
    --gm-particle-5: #FFFFFF;
}

[data-gm-theme="summer"] {
    --gm-primary: #4DD0E1;
    --gm-secondary: #FF8A65;
    --gm-accent: #FFD54F;
    --gm-particle-1: #4DD0E1;
    --gm-particle-2: #FF8A65;
    --gm-particle-3: #FFD54F;
    --gm-particle-4: #AED581;
    --gm-particle-5: #FFFFFF;
}

[data-gm-theme="autumn"] {
    --gm-primary: #E65100;
    --gm-secondary: #C62828;
    --gm-accent: #FFB300;
    --gm-particle-1: #E65100;
    --gm-particle-2: #C62828;
    --gm-particle-3: #FFB300;
    --gm-particle-4: #795548;
    --gm-particle-5: #FFF8E1;
}

/* ── Dynamic Backgrounds ── */
[data-gm-theme="winter"] .page {
    background: linear-gradient(to bottom right, rgba(179, 229, 252, 0.1), rgba(207, 216, 220, 0.05)) !important;
}

[data-gm-theme="spring"] .page {
    background: linear-gradient(to bottom right, rgba(244, 143, 177, 0.1), rgba(129, 199, 132, 0.05)) !important;
}

[data-gm-theme="summer"] .page {
    background: linear-gradient(to bottom right, rgba(77, 208, 225, 0.1), rgba(255, 213, 79, 0.05)) !important;
}

[data-gm-theme="autumn"] .page {
    background: linear-gradient(to bottom right, rgba(230, 81, 0, 0.1), rgba(255, 179, 0, 0.05)) !important;
}

/* ── Score Chip Pop-In (Low+) ── */

/* ── Default Bow Float (replaces inline bowEdgeFloat) ── */

@keyframes bow-edge-float-kf {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.bow-edge-float {
    animation: bow-edge-float-kf 5s ease-in-out infinite;
}

@keyframes gm-score-pop-in {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.gm-score-pop-in {
    animation: gm-score-pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Staggered delays for arrow sequence */
.gm-score-pop-in-delay-1 { animation-delay: 0.05s; }
.gm-score-pop-in-delay-2 { animation-delay: 0.10s; }
.gm-score-pop-in-delay-3 { animation-delay: 0.15s; }
.gm-score-pop-in-delay-4 { animation-delay: 0.20s; }
.gm-score-pop-in-delay-5 { animation-delay: 0.25s; }
.gm-score-pop-in-delay-6 { animation-delay: 0.30s; }

/* ── Perfect 10 Pulse Glow (Medium+) ── */

@keyframes gm-gold-pulse {
    0% { box-shadow: 0 0 0 0 var(--gm-primary); transform: scale(1); }
    50% { box-shadow: 0 0 16px 4px var(--gm-primary); transform: scale(1.15); }
    100% { box-shadow: 0 0 0 0 var(--gm-primary); transform: scale(1); }
}

.gm-gold-pulse {
    animation: gm-gold-pulse 0.6s ease-out;
}

/* ── Stat Card Entrance (Low+) ── */

@keyframes gm-slide-up-fade {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.gm-stat-entrance {
    animation: gm-slide-up-fade 0.5s ease-out both;
}

.gm-stat-entrance-delay-1 { animation-delay: 0.0s; }
.gm-stat-entrance-delay-2 { animation-delay: 0.15s; }
.gm-stat-entrance-delay-3 { animation-delay: 0.30s; }
.gm-stat-entrance-delay-4 { animation-delay: 0.45s; }

/* ── Rolling Counter Bounce (Low+) ── */

@keyframes gm-counter-bounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.gm-counter-bounce {
    animation: gm-counter-bounce 0.3s ease-out;
}

/* ── Bow Figure-8 Float (Low+) ── */

@keyframes gm-bow-figure8 {
    0%   { transform: translate(0, 0) rotate(-10deg); }
    25%  { transform: translate(3px, -5px) rotate(-13deg); }
    50%  { transform: translate(0, -2px) rotate(-10deg); }
    75%  { transform: translate(-3px, -5px) rotate(-7deg); }
    100% { transform: translate(0, 0) rotate(-10deg); }
}

.gm-bow-figure8 {
    animation: gm-bow-figure8 8s ease-in-out infinite;
}

/* ── Bow Draw-Release (Medium+) ── */

@keyframes gm-bow-draw-release {
    0%   { transform: translateX(0) rotate(-10deg); }
    30%  { transform: translateX(-15px) rotate(-15deg); }
    60%  { transform: translateX(5px) rotate(-8deg); }
    100% { transform: translateX(0) rotate(-10deg); }
}

.gm-bow-draw-release {
    animation: gm-bow-draw-release 0.6s ease-out;
}

/* ── Bow Shockwave (High) ── */

@keyframes gm-shockwave {
    0% { transform: scale(0.5); opacity: 0.6; }
    100% { transform: scale(2.5); opacity: 0; }
}

.gm-bow-shockwave::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin-top: -40px;
    margin-left: -40px;
    border-radius: 50%;
    border: 3px solid var(--gm-primary);
    animation: gm-shockwave 0.8s ease-out forwards;
    pointer-events: none;
}

/* ── Streak Glow (Medium+) ── */

@keyframes gm-streak-glow {
    0%, 100% { box-shadow: 0 0 8px 2px var(--gm-primary); }
    50% { box-shadow: 0 0 16px 6px var(--gm-secondary); }
}

.gm-streak-glow {
    animation: gm-streak-glow 2s ease-in-out infinite;
}

/* ── Streak Fire Border (High) ── */

@keyframes gm-fire-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gm-streak-fire {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.gm-streak-fire::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gm-particle-1), var(--gm-particle-4), var(--gm-particle-3), var(--gm-particle-1));
    background-size: 300% 100%;
    animation: gm-fire-gradient 2s ease infinite;
    z-index: -1;
    border-radius: inherit;
}

/* ── Latest Session Card Glow (Medium+) ── */

@keyframes gm-card-glow-pulse {
    0%, 100% { box-shadow: 0 0 8px 1px var(--gm-primary); }
    33% { box-shadow: 0 0 12px 3px var(--gm-secondary); }
    66% { box-shadow: 0 0 10px 2px var(--gm-accent); }
}

.gm-card-glow {
    animation: gm-card-glow-pulse 4s ease-in-out infinite;
}

/* ── Session Start Overlay ── */

@keyframes gm-target-draw {
    0% { stroke-dashoffset: 1000; opacity: 0; }
    20% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes gm-text-rise {
    0% { transform: translateY(20px); opacity: 0; letter-spacing: 2px; }
    100% { transform: translateY(0); opacity: 1; letter-spacing: 6px; }
}

.gm-session-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    pointer-events: none;
}

.gm-session-overlay svg circle {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: gm-target-draw 1.5s ease-out forwards;
    fill: none;
    stroke-width: 2;
}

.gm-session-overlay .gm-session-text {
    color: var(--gm-primary);
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: gm-text-rise 0.8s ease-out 0.6s both;
}

/* ── Fade Out utility ── */

@keyframes gm-fade-out {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* ── Screen Shake and Vignette ── */

@keyframes gm-shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.gm-screen-shake {
    animation: gm-shake 0.4s ease-in-out;
}

@keyframes gm-vignette-pulse {
    0% { box-shadow: inset 0 0 50px rgba(0,0,0,0.5); }
    50% { box-shadow: inset 0 0 150px rgba(0,0,0,0.85); }
    100% { box-shadow: inset 0 0 50px rgba(0,0,0,0.5); }
}

.gm-focus-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    animation: gm-vignette-pulse 1.5s infinite ease-in-out;
    transition: opacity 0.5s;
    opacity: 1;
}

.gm-fade-out {
    animation: gm-fade-out 0.4s ease-out forwards;
}

/* ── ON FIRE Badge ── */

@keyframes gm-fire-badge {
    0% { transform: scale(0) rotate(-10deg); }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.gm-fire-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(135deg, var(--gm-particle-4), var(--gm-particle-1));
    animation: gm-fire-badge 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Combo Overlay ── */

@keyframes gm-combo-text-anim {
    0% { transform: scale(0.5) translateY(20px); opacity: 0; }
    20% { transform: scale(1.2) translateY(-10px); opacity: 1; }
    80% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(1.5) translateY(-30px); opacity: 0; }
}

.gm-combo-overlay {
    position: fixed;
    bottom: 20%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 9997;
}

.gm-combo-text {
    font-family: 'Koulen', sans-serif;
    font-size: 4rem;
    color: var(--gm-primary);
    text-shadow: 0 4px 12px rgba(0,0,0,0.8), 0 0 20px var(--gm-secondary);
    animation: gm-combo-text-anim 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    margin: 0;
}

/* ── Bow Equip Sparkle (High) ── */

@keyframes gm-shimmer-sweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

.gm-bow-equip-shimmer {
    position: relative;
    overflow: hidden;
}

.gm-bow-equip-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: gm-shimmer-sweep 0.8s ease-out forwards;
    pointer-events: none;
}

/* ── Perfect End Rain Overlay ── */

.gm-perfect-end-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

@keyframes gm-perfect-badge-in {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.gm-perfect-end-badge {
    padding: 12px 32px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-accent));
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    animation: gm-perfect-badge-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── Milestone Dialog ── */

.gm-milestone-dialog-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.gm-milestone-dialog-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.gm-milestone-icon-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-accent));
    animation: gm-milestone-pulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 24px var(--gm-primary);
}

.gm-milestone-label {
    color: var(--gm-primary);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.gm-milestone-dismiss {
    margin: 0 auto;
}

@keyframes gm-milestone-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 24px var(--gm-primary); }
    50% { transform: scale(1.08); box-shadow: 0 0 40px var(--gm-primary); }
}

/* ── Reduced Motion ── */

@media (prefers-reduced-motion: reduce) {
    .gm-score-pop-in,
    .gm-gold-pulse,
    .gm-stat-entrance,
    .gm-counter-bounce,
    .gm-bow-figure8,
    .gm-bow-draw-release,
    .gm-bow-shockwave::after,
    .gm-streak-glow,
    .gm-streak-fire::before,
    .gm-card-glow,
    .gm-session-overlay svg circle,
    .gm-session-overlay .gm-session-text,
    .gm-fire-badge,
    .gm-bow-equip-shimmer::after,
    .gm-perfect-end-badge,
.gm-screen-shake {
    animation: gm-shake 0.4s ease-in-out;
}

@keyframes gm-vignette-pulse {
    0% { box-shadow: inset 0 0 50px rgba(0,0,0,0.5); }
    50% { box-shadow: inset 0 0 150px rgba(0,0,0,0.85); }
    100% { box-shadow: inset 0 0 50px rgba(0,0,0,0.5); }
}

.gm-focus-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    animation: gm-vignette-pulse 1.5s infinite ease-in-out;
    transition: opacity 0.5s;
    opacity: 1;
}

.gm-fade-out {
    animation: gm-fade-out 0.4s ease-out forwards;
}

/* ── ON FIRE Badge ── */

@keyframes gm-fire-badge {
    0% { transform: scale(0) rotate(-10deg); }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.gm-fire-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(135deg, var(--gm-particle-4), var(--gm-particle-1));
    animation: gm-fire-badge 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── Combo Overlay ── */

@keyframes gm-combo-text-anim {
    0% { transform: scale(0.5) translateY(20px); opacity: 0; }
    20% { transform: scale(1.2) translateY(-10px); opacity: 1; }
    80% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(1.5) translateY(-30px); opacity: 0; }
}

.gm-combo-overlay {
    position: fixed;
    bottom: 20%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 9997;
}

.gm-combo-text {
    font-family: 'Koulen', sans-serif;
    font-size: 4rem;
    color: var(--gm-primary);
    text-shadow: 0 4px 12px rgba(0,0,0,0.8), 0 0 20px var(--gm-secondary);
    animation: gm-combo-text-anim 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    margin: 0;
}

/* ── Bow Equip Sparkle (High) ── */

@keyframes gm-shimmer-sweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

.gm-bow-equip-shimmer {
    position: relative;
    overflow: hidden;
}

.gm-bow-equip-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: gm-shimmer-sweep 0.8s ease-out forwards;
    pointer-events: none;
}

/* ── Perfect End Rain Overlay ── */

.gm-perfect-end-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

@keyframes gm-perfect-badge-in {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.gm-perfect-end-badge {
    padding: 12px 32px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-accent));
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    animation: gm-perfect-badge-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── Milestone Dialog ── */

.gm-milestone-dialog-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.gm-milestone-dialog-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.gm-milestone-icon-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-accent));
    animation: gm-milestone-pulse 1.2s ease-in-out infinite;
    box-shadow: 0 0 24px var(--gm-primary);
}

.gm-milestone-label {
    color: var(--gm-primary);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.gm-milestone-dismiss {
    margin: 0 auto;
}

@keyframes gm-milestone-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 24px var(--gm-primary); }
    50% { transform: scale(1.08); box-shadow: 0 0 40px var(--gm-primary); }
}

/* ── Reduced Motion ── */

@media (prefers-reduced-motion: reduce) {
    .gm-score-pop-in,
    .gm-gold-pulse,
    .gm-stat-entrance,
    .gm-counter-bounce,
    .gm-bow-figure8,
    .gm-bow-draw-release,
    .gm-bow-shockwave::after,
    .gm-streak-glow,
    .gm-streak-fire::before,
    .gm-card-glow,
    .gm-session-overlay svg circle,
    .gm-session-overlay .gm-session-text,
    .gm-fire-badge,
    .gm-bow-equip-shimmer::after,
    .gm-perfect-end-badge,
    .gm-milestone-icon-ring,
    .bow-edge-float {
        animation: none !important;
    }
}
@keyframes gm-float-up {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { transform: translateY(-5px) scale(1.2); opacity: 1; }
    80% { transform: translateY(-20px) scale(1); opacity: 1; }
    100% { transform: translateY(-30px) scale(0.9); opacity: 0; }
}

.gm-floating-text-anim {
    animation: gm-float-up 1.5s ease-out forwards;
    pointer-events: none;
    opacity: 0;
}

.gm-shockwave {
    animation: gm-shockwave 0.8s ease-out forwards;
    pointer-events: none;
}

/* ── Avatar Level Borders ── */

.gm-avatar-bronze {
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.7) !important;
    border: 2px solid #cd7f32 !important;
}

.gm-avatar-silver {
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.8) !important;
    border: 2px solid #c0c0c0 !important;
}

.gm-avatar-gold {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.9) !important;
    border: 3px solid #ffd700 !important;
}

@keyframes diamond-glow {
    0% { box-shadow: 0 0 15px rgba(0, 255, 255, 0.6), inset 0 0 10px rgba(0, 255, 255, 0.4); border-color: #00ffff; }
    50% { box-shadow: 0 0 25px rgba(255, 0, 255, 0.8), inset 0 0 15px rgba(255, 0, 255, 0.6); border-color: #ff00ff; }
    100% { box-shadow: 0 0 15px rgba(0, 255, 255, 0.6), inset 0 0 10px rgba(0, 255, 255, 0.4); border-color: #00ffff; }
}

.gm-avatar-diamond {
    border: 3px solid #00ffff !important;
    animation: diamond-glow 3s infinite alternate ease-in-out !important;
}

/* ── Target Face Aura ── */

@keyframes gm-aura-pulse {
    0% { box-shadow: 0 0 10px rgba(255, 87, 34, 0.4); stroke: rgba(255, 87, 34, 0.4); stroke-width: 2px; }
    50% { box-shadow: 0 0 25px rgba(255, 193, 7, 0.8); stroke: rgba(255, 193, 7, 0.8); stroke-width: 4px; }
    100% { box-shadow: 0 0 10px rgba(255, 87, 34, 0.4); stroke: rgba(255, 87, 34, 0.4); stroke-width: 2px; }
}

.gm-aura-fire {
    animation: gm-aura-pulse 1.5s infinite alternate ease-in-out;
}

/* ── Game Profile (Achievements) Dialog ── */

/* Round both the inner mud-dialog element and its outer paper wrapper */
.rounded-xl.mud-dialog,
.mud-dialog.rounded-xl {
    border-radius: 20px !important;
    overflow: hidden !important;
}

/* Target the outer MudPaper wrapper that MudBlazor renders around dialogs with this class */
.rounded-xl > .mud-dialog-title,
.rounded-xl > .mud-dialog-content,
.rounded-xl > .mud-dialog-actions {
    border-radius: 0 !important;
}

/* ── Archer Card Dialog ── */

.gm-archer-card-dialog .mud-dialog-content {
    padding: 0 !important;
}

.gm-archer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
    background: linear-gradient(135deg, var(--mud-palette-surface), rgba(0,0,0,0.1));
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.gm-card-standard {
    border: 2px solid rgba(var(--mud-palette-warning-rgb), 0.3);
}

.gm-card-diamond {
    border: 3px solid #00ffff;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    animation: diamond-glow 3s infinite alternate ease-in-out;
}

.gm-card-header {
    margin-bottom: 24px;
    z-index: 2;
}

.gm-card-title {
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gm-card-subtitle {
    font-weight: 700 !important;
    color: var(--mud-palette-warning);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.85rem !important;
}

.gm-card-avatar-container {
    position: relative;
    margin-bottom: 32px;
    z-index: 2;
}

.gm-card-level-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--mud-palette-warning), var(--mud-palette-error));
    color: white;
    padding: 4px 16px;
    border-radius: 16px;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    border: 2px solid var(--mud-palette-surface);
    white-space: nowrap;
}

.gm-card-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    background: rgba(0,0,0,0.1);
    padding: 16px;
    border-radius: 12px;
    z-index: 2;
}

.gm-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.gm-stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--mud-palette-text-primary);
}

.gm-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}