/* ================================================================
   🐚 Shelldon's Tower Defense — Style v2.0
   ================================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary:   #667eea;
    --primary-d: #5568d3;
    --accent:    #764ba2;
    --gold:      #FFD700;
    --red:       #F44336;
    --green:     #4CAF50;
    --panel-bg:  #f8f9ff;
    --border:    #e0e4ff;
    --text:      #333;
    --text-dim:  #777;
    --radius:    12px;
    --shadow:    0 4px 20px rgba(102, 126, 234, 0.15);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12px;
    color: var(--text);
}

@media (min-width: 1440px) {
    body { padding: 20px; }
}

/* ================================================================
   GAME CONTAINER
   ================================================================ */
.game-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    padding: 20px 24px 24px;
    width: 100%;
    max-width: 1600px;
}

/* ================================================================
   HEADER
   ================================================================ */
.header {
    text-align: center;
    margin-bottom: 16px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.header h1 {
    font-size: 1.9em;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.help-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.help-btn:hover {
    border-color: var(--primary);
    background: #f0f4ff;
    transform: rotate(15deg);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 700;
    color: var(--primary);
    min-width: 70px;
    justify-content: center;
}

.stat-icon {
    font-size: 1.1em;
}

.stat.gold   { border-color: #FFD700; color: #b8860b; }
.stat.lives  { border-color: #F44336; color: #c62828; }
.stat.wave   { border-color: var(--primary); }
.stat.score  { border-color: #9C27B0; color: #6a1b9a; }
.stat.highscore      { border-color: #FF9800; color: #e65100; }
.stat.enemies-stat   { border-color: #E91E63; color: #880e4f; }

/* ================================================================
   GAME AREA LAYOUT
   ================================================================ */
.game-area {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.canvas-wrapper {
    flex-shrink: 0;
}

#gameCanvas {
    display: block;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: #eef0e8;
    cursor: crosshair;
    box-shadow: var(--shadow);
    max-width: 100%;
}

/* ================================================================
   SIDE PANEL
   ================================================================ */
.side-panel {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 1440px) {
    .side-panel { width: 280px; }
    .tb-name { font-size: 0.80em; }
    .tb-cost { font-size: 0.76em; }
    .tb-desc { font-size: 0.70em; }
    .el-row  { font-size: 0.85em; }
}

@media (min-width: 1600px) {
    .side-panel { width: 300px; }
    .panel-title { font-size: 0.90em; }
    .tb-icon { font-size: 1.9em; }
}

.panel-section {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}

.panel-title {
    font-size: 0.8em;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.hint {
    font-size: 0.72em;
    color: var(--text-dim);
    margin-bottom: 8px;
}

/* ================================================================
   TOWER GRID
   ================================================================ */
.tower-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.tower-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    position: relative;
}

.tb-hotkey {
    position: absolute;
    top: 3px;
    left: 5px;
    font-size: 0.6em;
    font-weight: 900;
    color: var(--text-dim);
    background: #f0f0f0;
    border-radius: 3px;
    padding: 1px 4px;
    font-family: monospace;
}

.tower-btn:hover:not(.disabled) {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.tower-btn.selected {
    border-color: var(--primary);
    background: #f0f4ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.tower-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tb-icon { font-size: 1.7em; line-height: 1; }
.tb-name { font-size: 0.72em; font-weight: 700; color: var(--text); }
.tb-cost { font-size: 0.68em; font-weight: 600; color: #b8860b; }
.tb-desc { font-size: 0.62em; color: var(--text-dim); }

/* ================================================================
   TOWER INFO PANEL
   ================================================================ */
.tower-info-panel {
    border-color: var(--primary);
    border-width: 2px;
}

.tower-info-name {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.tower-info-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 0.75em;
    color: var(--text);
}

.tower-info-stats span {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 6px;
}

.tower-info-actions {
    display: flex;
    gap: 6px;
}

.btn-upgrade, .btn-sell {
    flex: 1;
    padding: 7px 6px;
    border: none;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}

.btn-upgrade {
    background: var(--primary);
    color: white;
}

.btn-upgrade:hover:not(:disabled) {
    background: var(--primary-d);
    transform: translateY(-1px);
}

.btn-upgrade:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-sell {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc02;
}

.btn-sell:hover:not(:disabled) {
    background: #ffe0b2;
    transform: translateY(-1px);
}

.btn-sell:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================================================================
   CONTROL BUTTONS
   ================================================================ */
.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.btn-full { width: 100%; }

.btn-danger {
    background: linear-gradient(135deg, #c62828, #b71c1c);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82em;
    font-weight: 600;
    transition: all 0.18s;
    margin-top: 6px;
}
.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #e53935, #c62828);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(183,28,28,0.35);
}
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-danger.selected { box-shadow: 0 0 0 3px #FF5252; }

.btn-repair {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.78em;
    font-weight: 600;
    transition: all 0.18s;
}
.btn-repair:hover:not(:disabled) {
    background: linear-gradient(135deg, #388e3c, #2e7d32);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(46,125,50,0.35);
}
.btn-repair:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-row {
    display: flex;
    gap: 7px;
}

.btn-primary, .btn-secondary {
    padding: 9px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.82em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.45);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--border);
    flex: 1;
}

.btn-secondary:hover {
    background: #f0f4ff;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* ================================================================
   ENEMY LEGEND
   ================================================================ */
.enemy-legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.el-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78em;
    color: var(--text);
}

.el-row span:first-child {
    font-size: 1.2em;
    width: 22px;
    text-align: center;
}

/* ================================================================
   HINT BOX
   ================================================================ */
.hint-box {
    font-size: 0.72em;
    color: var(--text-dim);
    line-height: 1.7;
}

.hint-box strong {
    color: var(--primary);
    display: block;
    margin-bottom: 3px;
}

.hint-box span {
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--text);
}

/* ================================================================
   WAVE BANNER
   ================================================================ */
.wave-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-80px);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 200;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.wave-banner.show {
    transform: translateX(-50%) translateY(0);
}

/* ================================================================
   GAME OVERLAY (Game Over / Win)
   ================================================================ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    backdrop-filter: blur(4px);
}

.overlay-box {
    background: white;
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    max-width: 400px;
    width: 90%;
}

.overlay-title {
    font-size: 2.2em;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), #FF5722);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.overlay-message {
    font-size: 1.15em;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 28px;
}

.overlay-message strong {
    color: var(--primary);
}

.overlay-btn {
    font-size: 1.1em;
    padding: 12px 36px;
}

/* ================================================================
   DIFFICULTY SELECT
   ================================================================ */
.diff-box {
    max-width: 600px;
    text-align: center;
    padding: 30px 36px;
}

.diff-title {
    font-size: 2.2em;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.diff-sub {
    color: var(--text-dim);
    font-size: 0.95em;
    margin-bottom: 22px;
}

.diff-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    justify-content: center;
}

.diff-btn {
    flex: 1 1 120px;
    min-width: 110px;
    max-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    border: 3px solid var(--border);
    border-radius: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.diff-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.diff-easy:hover      { border-color: #4CAF50; }
.diff-normal:hover    { border-color: var(--primary); }
.diff-hard:hover      { border-color: #F44336; }
.diff-nightmare:hover { border-color: #212121; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

.diff-easy      { border-color: #c8e6c9; }
.diff-normal    { border-color: var(--border); }
.diff-hard      { border-color: #ffcdd2; }
.diff-nightmare {
    border-color: #424242;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #eee;
}
.diff-nightmare .diff-note { color: #FF5252; }

.diff-icon { font-size: 2em; }
.diff-btn strong { font-size: 1.05em; }
.diff-btn span { font-size: 0.78em; color: var(--text-dim); }
.diff-note { font-style: italic; }

.diff-map-label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-dim);
    margin: 10px 0 6px;
    text-align: left;
}

.diff-maps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    justify-content: center;
}

.map-btn {
    flex: 1 1 80px;
    min-width: 80px;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-size: 0.78em;
    transition: all 0.2s;
    color: var(--text);
}

.map-btn span { font-size: 1.5em; }
.map-btn strong { font-size: 0.95em; }
.map-btn small { color: var(--text-dim); }

.map-btn:hover {
    border-color: var(--primary);
    background: #f0f4ff;
    transform: translateY(-2px);
}

.map-btn.map-active {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f0f4ff, #e8eeff);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.diff-lb {
    font-size: 0.8em;
    color: var(--text-dim);
    text-align: left;
}

.diff-lb strong {
    display: block;
    color: var(--primary);
    margin-bottom: 4px;
}

@media (max-width: 440px) {
    .diff-options { flex-direction: column; }
    .diff-maps { flex-direction: column; }
}

/* ================================================================
   HELP MODAL
   ================================================================ */
.help-box {
    max-width: 560px;
    text-align: left;
    padding: 30px 36px;
}

.help-box h2 {
    font-size: 1.5em;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    text-align: center;
}

.help-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-height: 65vh;
    overflow-y: auto;
}

.help-section {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

.help-section strong {
    display: block;
    color: var(--primary);
    font-size: 0.9em;
    margin-bottom: 4px;
}

.help-section p {
    font-size: 0.8em;
    color: var(--text);
    line-height: 1.5;
}

.help-section kbd {
    background: #e8e8e8;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 1px 5px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--text);
}

@media (max-width: 560px) {
    .help-content {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   TARGET MODE BUTTONS
   ================================================================ */
.target-modes {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tm-label {
    font-size: 0.72em;
    font-weight: 700;
    color: var(--text-dim);
    white-space: nowrap;
}

.tm-btn {
    flex: 1;
    padding: 4px 4px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: white;
    font-size: 0.68em;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
    min-width: 40px;
}

.tm-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tm-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ================================================================
   TOWER SHOP TOOLTIP
   ================================================================ */
.tower-tooltip {
    position: fixed;
    z-index: 500;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.78em;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    pointer-events: none;
    min-width: 160px;
    max-width: 220px;
}

.tt-title {
    font-size: 1em;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.tt-desc {
    color: var(--text-dim);
    margin-bottom: 6px;
    font-style: italic;
}

.tt-stat {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid var(--border);
}

.tt-stat:last-child {
    border-bottom: none;
}

.tt-stat-label {
    color: var(--text-dim);
}

.tt-stat-value {
    font-weight: 600;
    color: var(--text);
}

/* ================================================================
   WAVE PREVIEW
   ================================================================ */
.wave-preview {
    font-size: 0.82em;
    color: var(--text);
    line-height: 1.8;
}

.wave-preview strong {
    color: var(--primary);
    display: block;
    margin-bottom: 2px;
}

.wave-preview span {
    display: inline-block;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 8px;
    margin: 2px 2px 2px 0;
    font-size: 0.95em;
}

.wave-preview .wp-boss {
    background: #4A148C;
    color: white;
    border-color: #4A148C;
    font-weight: 700;
    animation: blink 0.8s ease-in-out infinite alternate;
}

.wave-preview .wp-active {
    color: var(--primary);
    font-weight: 700;
    font-style: italic;
}

@keyframes blink {
    from { opacity: 0.7; }
    to   { opacity: 1; }
}

/* ================================================================
   GAME OVER TOWER STATS + LEADERBOARD
   ================================================================ */
.go-tower-stats {
    margin-top: 14px;
    padding: 12px;
    background: #f8f9ff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.88em;
    text-align: left;
    line-height: 1.8;
}

.go-tower-stats strong:first-child {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: 0.92em;
}

.lb-table td {
    padding: 3px 8px;
    border-bottom: 1px solid var(--border);
}

.lb-table tr:last-child td {
    border-bottom: none;
}

.lb-table tr:first-child td {
    font-weight: 700;
    color: var(--primary);
}

/* ================================================================
   AUTO-WAVE STATUS
   ================================================================ */
.auto-wave-status {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.78em;
    font-weight: 700;
    animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.8; }
    to   { opacity: 1; }
}

/* ================================================================
   TOGGLE LABEL (auto-wave checkbox)
   ================================================================ */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    padding: 7px 10px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.78em;
    font-weight: 600;
    color: var(--text);
    transition: all 0.18s;
    user-select: none;
}

.toggle-label:hover {
    border-color: var(--primary);
    background: #f0f4ff;
}

.toggle-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }

    .side-panel {
        width: 100%;
        max-width: 900px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .panel-section {
        flex: 1;
        min-width: 160px;
    }

    .tower-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #gameCanvas {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 560px) {
    .stats-bar {
        gap: 6px;
    }

    .stat {
        padding: 5px 10px;
        font-size: 0.9em;
    }

    .header h1 {
        font-size: 1.4em;
    }

    .tower-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ================================================================
   HEADER BUTTONS GROUP
   ================================================================ */
.header-btns {
    display: flex;
    gap: 6px;
}

/* ================================================================
   ACHIEVEMENT TOAST
   ================================================================ */
.ach-toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 12px 18px;
    color: #fff;
    font-size: 0.9em;
    line-height: 1.4;
    z-index: 2000;
    max-width: 240px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.ach-toast::before {
    content: '🏅 Errungen!';
    display: block;
    font-size: 0.7em;
    color: #FFD700;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.ach-toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* ================================================================
   ACHIEVEMENT MODAL
   ================================================================ */
.ach-box {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.ach-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.ach-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    font-size: 0.85em;
    transition: background 0.2s;
}

.ach-done {
    background: linear-gradient(90deg, #fff9e6, #fffbe8);
    border-color: #FFD700;
}

.ach-locked {
    opacity: 0.55;
    filter: grayscale(0.4);
}

.ach-icon {
    font-size: 1.6em;
    width: 2em;
    text-align: center;
}

.ach-info {
    flex: 1;
}

.ach-info strong {
    display: block;
    color: #333;
}

.ach-info small {
    color: #777;
}

.ach-check {
    color: #4CAF50;
    font-weight: 700;
    font-size: 1.1em;
}

/* Wave preview mutant/mech styles */
.wp-mutant {
    color: #00C853;
    font-weight: 600;
}

.wp-mech {
    color: #78909C;
    font-weight: 600;
}

.wp-ghost {
    color: #CE93D8;
    font-weight: 600;
    font-style: italic;
}

.wp-swarm {
    color: #FFA000;
    font-weight: 600;
}

.wp-elite {
    color: #B71C1C;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(183,28,28,0.4);
}

.wp-titan {
    color: #1A237E;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(26,35,126,0.5);
}

/* Stats modal */
.stats-modal-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    background: #f8f9ff;
    border-radius: 8px;
    font-size: 0.9em;
    border: 1px solid #e0e4ff;
}

.stats-row strong { color: var(--primary); }

.stats-kills {
    flex-wrap: wrap;
    gap: 4px;
}
.stats-kills span:last-child {
    font-size: 0.85em;
    color: var(--text-dim);
}

/* Laser tower button spans full width */
.tower-btn-wide {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-around;
    padding: 7px 12px;
    background: linear-gradient(135deg, #fff5f5, #fff);
    border-color: #FF1744;
}
.tower-btn-wide .tb-icon { font-size: 1.4em; }
.tower-btn-wide .tb-name { font-size: 0.78em; }
.tower-btn-wide.selected {
    background: linear-gradient(135deg, #ffe0e6, #fff5f5);
    border-color: #FF1744;
    box-shadow: 0 0 0 3px rgba(255,23,68,0.25);
}
