/* ===================================================
   Phase 9: UI/UX Enhancements
   =================================================== */

/* === PARTICLE SYSTEM === */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 215, 76, 0.6);
    border-radius: 50%;
    opacity: 0;
    will-change: transform, opacity;
    animation: particle-float 8s infinite linear;
    /* box-shadow: 0 0 6px var(--gold-base); REMOVED FOR PERFORMANCE */
}

@keyframes particle-float {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(1);
    }
}

/* Stagger particle animations */
.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 4s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 6s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 7s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 0.5s;
}

.particle:nth-child(10) {
    left: 15%;
    animation-delay: 2.5s;
}

.particle:nth-child(11) {
    left: 25%;
    animation-delay: 3.5s;
}

.particle:nth-child(12) {
    left: 35%;
    animation-delay: 4.5s;
}

.particle:nth-child(13) {
    left: 45%;
    animation-delay: 5.5s;
}

.particle:nth-child(14) {
    left: 55%;
    animation-delay: 6.5s;
}

.particle:nth-child(15) {
    left: 65%;
    animation-delay: 7.5s;
}

/* === TITLE ANIMATIONS === */
.screen h1 {
    animation: title-entrance 1.5s ease-out, titlePulse 2s infinite 1.5s;
}

@keyframes title-entrance {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(-50px);
        filter: blur(10px);
    }

    60% {
        opacity: 1;
        transform: scale(1.1) translateY(0);
        filter: blur(0);
    }

    100% {
        transform: scale(1);
    }
}

.screen h2 {
    animation: subtitle-entrance 1s ease-out 0.5s both;
}

@keyframes subtitle-entrance {
    0% {
        opacity: 0;
        letter-spacing: 30px;
    }

    100% {
        opacity: 1;
        letter-spacing: 15px;
    }
}

/* === BUTTON ENHANCEMENTS === */
.btn-menu {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-menu::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-menu:hover::before {
    width: 300px;
    height: 300px;
}

.btn-menu:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--gold-glow), 0 10px 30px rgba(0, 0, 0, 0.4);
}

.btn-menu:active {
    transform: translateY(0) scale(0.98);
}

/* TV Mode Button Pulse */
.btn-tv {
    animation: tv-pulse 2s infinite;
}

@keyframes tv-pulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    }

    50% {
        box-shadow: 0 4px 25px rgba(52, 152, 219, 0.6), 0 0 40px rgba(52, 152, 219, 0.3);
    }
}

/* === DIFFICULTY TOOLTIPS === */
.btn-menu[data-difficulty] {
    position: relative;
}

.btn-menu[data-difficulty]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.btn-menu[data-difficulty]:hover::after {
    opacity: 1;
}

/* === ANIMATED NUMBERS === */
.animated-number {
    display: inline-block;
    transition: transform 0.3s, color 0.3s;
}

.animated-number.pulse-up {
    animation: number-pulse-up 0.5s ease-out;
    color: #2ecc71;
}

.animated-number.pulse-down {
    animation: number-pulse-down 0.5s ease-out;
    color: var(--danger-base);
}

@keyframes number-pulse-up {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes number-pulse-down {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

/* === RESOURCE CHANGE INDICATOR === */
.resource-change {
    position: absolute;
    font-size: 0.8rem;
    font-weight: bold;
    animation: float-up 1s ease-out forwards;
    pointer-events: none;
}

.resource-change.positive {
    color: #2ecc71;
}

.resource-change.negative {
    color: var(--danger-base);
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* === LOW RESOURCE WARNING === */
.stat-box.warning {
    animation: warning-pulse 1s infinite;
    border-color: var(--danger-base);
}

@keyframes warning-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    }
}

/* === SPAWN COOLDOWN INDICATOR === */
.cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

/* === KEYBOARD SHORTCUT LABELS === */
.shortcut-label {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* === EVOLVE BUTTON XP BAR === */
.btn-evolve {
    position: relative;
    overflow: hidden;
}

.btn-evolve .xp-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--gold-gradient);
    transition: width 0.3s;
}

.btn-evolve.ready {
    animation: ready-glow 1s infinite;
}

@keyframes ready-glow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.8), 0 0 50px rgba(0, 212, 255, 0.4);
    }
}

/* === SCREEN SHAKE === */
.screen-shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* === FACTION CARD IMPROVEMENTS === */
.faction-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.faction-card:hover {
    transform: translateY(-10px) rotateY(10deg);
}

.faction-card.active {
    animation: card-select 0.5s ease-out;
}

@keyframes card-select {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2) rotateY(180deg);
    }

    100% {
        transform: scale(1.1) rotateY(0deg);
    }
}

/* === SPAWN CONFIRMATION === */
.spawn-flash {
    animation: spawn-confirm 0.3s ease-out;
}

@keyframes spawn-confirm {
    0% {
        background: rgba(46, 204, 113, 0.5);
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        background: transparent;
        transform: scale(1);
    }
}

/* === FOCUS VISIBLE (Accessibility) === */
.btn-menu:focus-visible,
.btn-action:focus-visible,
.faction-card:focus-visible,
.unit-btn:focus-visible,
.build-btn:focus-visible {
    outline: 3px solid var(--accent-base);
    outline-offset: 2px;
}

/* === TOOLTIP SYSTEM === */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--panel-border);
    border-radius: var(--border-radius);
    padding: 12px;
    z-index: 1000;
    pointer-events: none;
    animation: tooltip-in 0.2s ease-out;
    max-width: 250px;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}

@keyframes tooltip-in {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip h4 {
    color: var(--gold-base);
    margin-bottom: 8px;
    font-size: 1rem;
}

.tooltip .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tooltip .stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===================================================
   ACCESSIBILITY ENHANCEMENTS
   =================================================== */

/* Reduced Motion Support (WCAG 2.1) */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .particle,
    .btn-tv,
    .screen-shake,
    .faction-card:hover {
        animation: none !important;
        transform: none !important;
    }

    /* Keep essential state changes */
    .btn-menu:hover,
    .btn-action:hover {
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --panel-bg: rgba(0, 0, 0, 0.95);
        --panel-border: #ffffff;
        --text-base: #ffffff;
        --text-muted: #cccccc;
        --gold-base: #ffd700;
    }

    .btn-menu,
    .btn-action,
    .faction-card,
    .unit-btn,
    .build-btn {
        border: 2px solid #fff !important;
    }

    .stat-box {
        border: 2px solid var(--gold-base) !important;
    }
}

/* Skip Link for Keyboard Navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-base);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 8px 0;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Enhanced Focus Indicators */
*:focus-visible {
    outline: 3px solid var(--accent-base);
    outline-offset: 2px;
}

/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Visual state for disabled buttons */
.btn-menu:disabled,
.btn-action:disabled,
.unit-btn:disabled,
.build-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(50%);
}

/* Minimum touch target size (48px) */
@media (pointer: coarse) {

    .btn-action,
    .unit-btn,
    .build-btn,
    .btn-menu {
        min-height: 48px;
        min-width: 48px;
    }
}

/* === START GAME BUTTON === */
.btn-menu-large {
    font-size: 1.8rem;
    font-weight: 900;
    padding: 20px 60px;
    background: var(--accent-gradient);
    color: white;
    border: 3px solid var(--gold-base);
    border-radius: 15px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), var(--gold-glow);
    animation: start-pulse 2s infinite;
}

.btn-menu-large:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.6);
}

@keyframes start-pulse {

    0%,
    100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 215, 0, 0.3);
    }

    50% {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 215, 0, 0.6);
    }
}

/* === DIFFICULTY MODAL === */
.difficulty-modal-content {
    text-align: center;
}

.difficulty-modal-content .difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 0;
}

.difficulty-modal-content .btn-difficulty {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.9), rgba(20, 20, 35, 0.95));
    border: 2px solid var(--panel-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.difficulty-modal-content .btn-difficulty:hover {
    border-color: var(--gold-base);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.difficulty-modal-content .diff-icon {
    font-size: 2rem;
}

.difficulty-modal-content .diff-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-base);
}

.difficulty-modal-content .diff-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* === SETTINGS MODAL === */
.settings-modal-content .settings-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
}

.settings-modal-content .setting-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-modal-content .setting-row label {
    flex: 0 0 160px;
    font-size: 1rem;
    color: var(--text-base);
}

.settings-modal-content .volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.settings-modal-content .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-base);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.settings-modal-content .volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.settings-modal-content .volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-base);
    cursor: pointer;
    border: none;
}

.settings-modal-content .volume-value {
    flex: 0 0 50px;
    text-align: right;
    font-weight: 600;
    color: var(--gold-base);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--accent-base);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(24px);
}

.setting-row.toggle-row {
    justify-content: space-between;
}

/* === FACTION INDICATOR (HUD) === */
.faction-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.9), rgba(20, 20, 35, 0.95));
    border: 2px solid var(--gold-base);
    border-radius: 8px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.faction-indicator:hover {
    border-color: var(--gold-bright);
    box-shadow: var(--gold-glow);
}

.faction-indicator .faction-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.faction-indicator .faction-emoji {
    font-size: 1.5rem;
    display: none;
}

/* Show emoji if icon fails to load */
.faction-indicator .faction-icon[src=""],
.faction-indicator .faction-icon:not([src]) {
    display: none;
}

.faction-indicator .faction-icon[src=""]+.faction-emoji,
.faction-indicator .faction-icon:not([src])+.faction-emoji {
    display: block;
}

/* Faction Tooltip */
.faction-tooltip {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.98), rgba(10, 10, 25, 0.98));
    border: 2px solid var(--gold-base);
    border-radius: 10px;
    padding: 12px 16px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.faction-indicator:hover .faction-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(calc(100% + 5px));
}

.faction-tooltip .tooltip-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-base);
    margin-bottom: 8px;
    text-align: center;
}

.faction-tooltip .tooltip-pros {
    font-size: 0.9rem;
    color: #2ecc71;
    margin-bottom: 4px;
}

.faction-tooltip .tooltip-pros::before {
    content: "✓ ";
}

.faction-tooltip .tooltip-cons {
    font-size: 0.9rem;
    color: #ff6b6b;
}

.faction-tooltip .tooltip-cons::before {
    content: "✗ ";
}

/* === DIFFICULTY BADGE (HUD) === */
.difficulty-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.9), rgba(20, 20, 35, 0.95));
    border: 2px solid var(--panel-border);
    border-radius: 8px;
    margin-left: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.difficulty-badge.hidden {
    display: none;
}

.difficulty-badge .diff-badge-icon {
    font-size: 1.2rem;
}

.difficulty-badge .diff-badge-name {
    font-weight: 600;
    color: var(--text-base);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Difficulty-specific colors */
.difficulty-badge.easy {
    border-color: #2ecc71;
}

.difficulty-badge.easy .diff-badge-name {
    color: #2ecc71;
}

.difficulty-badge.medium {
    border-color: var(--gold-base);
}

.difficulty-badge.medium .diff-badge-name {
    color: var(--gold-base);
}

.difficulty-badge.hard {
    border-color: #ff6b6b;
}

.difficulty-badge.hard .diff-badge-name {
    color: #ff6b6b;
}

/* === KEYBOARD NAV HIGHLIGHT === */
.btn-difficulty.keyboard-focus {
    border-color: var(--gold-base);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: translateX(10px);
}

/* === AI PERSONALITY BADGE === */
.ai-personality-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(145deg, rgba(50, 20, 80, 0.9), rgba(30, 10, 50, 0.95));
    border: 1px solid rgba(138, 43, 226, 0.4);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.ai-personality-badge:hover {
    border-color: rgba(138, 43, 226, 0.8);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.ai-badge-icon {
    font-size: 1.1rem;
}

.ai-badge-name {
    font-weight: 600;
    color: #b388ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-personality-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 12px;
    background: rgba(20, 10, 40, 0.98);
    border: 1px solid rgba(138, 43, 226, 0.5);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 100;
    text-align: center;
    min-width: 200px;
}

.ai-personality-badge:hover .ai-personality-tooltip {
    opacity: 1;
    visibility: visible;
}

.ai-personality-tooltip .tooltip-title {
    font-weight: 700;
    font-size: 1rem;
    color: #b388ff;
    margin-bottom: 6px;
}

.ai-personality-tooltip .tooltip-desc {
    font-size: 0.85rem;
    color: #aaa;
}

/* Personality Color Variants */
.ai-personality-badge.aggressive {
    border-color: rgba(255, 107, 107, 0.5);
}

.ai-personality-badge.aggressive .ai-badge-name {
    color: #ff6b6b;
}

.ai-personality-badge.defensive {
    border-color: rgba(100, 180, 255, 0.5);
}

.ai-personality-badge.defensive .ai-badge-name {
    color: #64b5f6;
}

.ai-personality-badge.balanced {
    border-color: rgba(255, 193, 7, 0.5);
}

.ai-personality-badge.balanced .ai-badge-name {
    color: #ffc107;
}

.ai-personality-badge.economic {
    border-color: rgba(46, 204, 113, 0.5);
}

.ai-personality-badge.economic .ai-badge-name {
    color: #2ecc71;
}

/* === COUNTER-UNIT HINTS === */
.unit-btn-container {
    position: relative;
}

.counter-hint-badge {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.4);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #2ecc71;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.unit-btn-container:hover .counter-hint-badge {
    opacity: 1;
}

.counter-hint-badge.vs-melee::before {
    content: "⚔️ ";
}

.counter-hint-badge.vs-ranged::before {
    content: "🏹 ";
}

.counter-hint-badge.vs-tank::before {
    content: "🛡️ ";
}

.btn-unit[data-counters] {
    border-bottom: 2px solid rgba(46, 204, 113, 0.3);
}

.btn-unit[data-counters]:hover {
    border-bottom-color: rgba(46, 204, 113, 0.7);
}