:root {
    --bg-gradient: radial-gradient(circle at 50% 10%, #0a3318 0%, #051a0d 100%);
    --primary: #4ade80; 
    --primary-dim: #22c55e;
    --glass-bg: rgba(255, 255, 255, 0.08); 
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-main: #f0fdf4; 
    --text-muted: #86efac; 
    --error: #fb7185;
    --warning: #fb923c;
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; }
html, body { 
    touch-action: manipulation; 
    height: 100vh; /* Fallback */
    height: 100dvh; /* Mobile real height */
    overflow: hidden; 
    font-family: var(--font-main); 
    color: var(--text-main); 
    background: var(--bg-gradient); 
    display: flex; 
    flex-direction: column; 
}

/* CURSEURS */
button, .btn-primary, .btn-glass, .hist-btn, .contract-btn, .icon-btn, .step-btn, .toggle-btn, .delete-btn { cursor: pointer; }

/* ANIMATION FOND */
.bg-animation { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: hidden; opacity: 0.25; }
.bg-animation span { position: absolute; display: block; font-size: 3rem; color: rgba(255,255,255,0.15); bottom: -150px; animation: floatUp 15s linear infinite; }
.bg-animation span:nth-child(1) { left: 10%; animation-duration: 12s; }
.bg-animation span:nth-child(2) { left: 30%; animation-duration: 18s; font-size: 2rem; }
.bg-animation span:nth-child(3) { left: 50%; animation-duration: 15s; }
.bg-animation span:nth-child(4) { left: 70%; animation-duration: 10s; font-size: 4rem; }
.bg-animation span:nth-child(5) { left: 85%; animation-duration: 14s; }
@keyframes floatUp { 
    0% { transform: translateY(0) rotate(0deg); opacity: 1; } 
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; } 
}

/* HEADER */
.top-bar { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: rgba(5, 26, 13, 0.8); backdrop-filter: blur(10px); z-index: 10; border-bottom: 1px solid var(--glass-border); flex-shrink: 0; }
.app-title { font-size: 1.1rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.icon-btn { background: none; border: none; color: white; padding: 8px; }
.icon-btn svg { width: 24px; height: 24px; fill: currentColor; }

/* DROPDOWN */
.menu-wrapper { position: relative; }
.dropdown { position: absolute; top: 50px; right: 0; width: 220px; background: #0f2918; border: 1px solid var(--glass-border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; z-index: 100; box-shadow: 0 10px 40px rgba(0,0,0,0.9); }
.dropdown button { background: none; border: none; padding: 16px; color: var(--text-main); text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.95rem; cursor: pointer; display: flex; gap: 10px; }
.dropdown button:active { background: rgba(74, 222, 128, 0.1); }

/* VIEWS */
#main-container { flex: 1; position: relative; overflow: hidden; z-index: 5; }
.view { 
    position: absolute; inset: 0; 
    display: flex; flex-direction: column; 
    padding: 20px; 
    padding-bottom: calc(20px + env(safe-area-inset-bottom)); 
    overflow-y: auto; opacity: 0; pointer-events: none; 
    transform: translateY(20px); transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
}
.view.active { opacity: 1; pointer-events: auto; transform: translateY(0); z-index: 5; }
.flex-view { overflow: hidden; padding-bottom: 0; } 

#view-setup {
    overflow: hidden;
    padding: 0 !important; 
}
#view-setup .view-header {
    padding: 20px 20px 0 20px;
}

/* UTILS */
.hidden { display: none !important; }
.glass, .glass-panel, .glass-input { background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 16px; }
.btn-primary { background: var(--primary); color: #002e0f; border: none; padding: 16px; border-radius: 100px; font-weight: 800; font-size: 1rem; width: 100%; box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3); transition: 0.2s; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: #333; color: #777; box-shadow: none; cursor: not-allowed; }
.btn-glass { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: white; padding: 10px 20px; border-radius: 50px; font-weight: 600; display: inline-flex; justify-content: center; align-items: center; }

/* HOME */
.hero-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }

.logo-circle { 
    width: 85vw;
    max-width: 380px; 
    height: 120vw; 
    max-height: 520px; 
    border-radius: 24px; 
    overflow: hidden; 
    position: relative; 
    margin-bottom: 24px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); 
    border: 1px solid rgba(255,255,255,0.1);
    background: #000;
}
.logo-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-circle::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, #051a0d 100%); pointer-events: none; z-index: 1; }
.hero-title { font-size: 3rem; font-weight: 900; line-height: 1; position: absolute; bottom: 50px; left: 0; width: 100%; text-align: center; z-index: 2; text-shadow: 0 4px 15px rgba(0,0,0,0.8); letter-spacing: -1px; }
.hero-subtitle { color: var(--text-muted); font-style: italic; position: absolute; bottom: 20px; left: 0; width: 100%; text-align: center; z-index: 2; font-size: 0.9rem; text-shadow: 0 2px 5px rgba(0,0,0,1); }

/* HOME ACTIONS */
.home-actions { width: 100%; margin-top: auto; padding-bottom: 20px; position: relative; z-index: 10; }
.secondary-actions { display: flex; gap: 10px; margin-top: 16px; }
.secondary-actions > * { flex: 1; text-align: center; }
.version-tag { width: 100%; text-align: center; font-size: 0.6rem; opacity: 0.3; pointer-events: none; padding: 10px 0 calc(5px + env(safe-area-inset-bottom)) 0; margin-top: auto; flex-shrink: 0; }

.history-section h3 { font-size: 0.9rem; margin-bottom: 10px; color: var(--text-muted); text-transform: uppercase; }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: rgba(255,255,255,0.05); border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--glass-border); }
.hist-btn { background: var(--primary); color: #051a0d; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 800; font-size: 0.85rem; transition: 0.2s; }
.hist-btn:active { transform: scale(0.95); }
.badge-decider-mini { background: #ffd700; color: black; font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; font-weight: 800; margin-right: 6px; }
.hist-info { font-size: 0.9rem; }
.hist-date { color: #888; font-size: 0.8rem; margin-left: 5px; }
.hist-actions { display: flex; gap: 8px; align-items: center; }
.hist-delete-btn { background: rgba(251, 113, 133, 0.2); color: #fb7185; border: 1px solid rgba(251, 113, 133, 0.3); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: 0.2s; }
.hist-delete-btn:active { background: #fb7185; color: black; }

/* REGLES */
.rules-content .card { padding: 20px; margin-bottom: 20px; background: transparent; border: none; box-shadow: none; }
.rules-content h3 { color: var(--primary); margin-bottom: 20px; font-size: 1.3rem; text-transform: uppercase; border-bottom: 2px solid rgba(255,255,255,0.1); padding-bottom: 10px; letter-spacing: 1px; }
.rules-content p { line-height: 1.7; margin-bottom: 20px; text-align: justify; font-size: 0.95rem; color: #e0e0e0; }
.rule-card { display: flex; flex-direction: row; background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%); border: 1px solid var(--glass-border); border-radius: 16px; margin-bottom: 16px; overflow: hidden; align-items: stretch; transition: transform 0.2s; }
.rule-card:active { transform: scale(0.99); }
.rule-img { width: 90px; flex-shrink: 0; position: relative; border-right: 1px solid rgba(255,255,255,0.1); }
.rule-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rule-content-wrapper { flex: 1; padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.rule-content-wrapper h4 { color: var(--primary); margin-bottom: 6px; font-size: 1.1rem; text-transform: uppercase; font-weight: 800; }
.rule-content-wrapper p { margin-bottom: 8px; font-size: 0.9rem; color: #e0e0e0; line-height: 1.4; text-align: left; }
.penalty { display: inline-block; background: rgba(251, 113, 133, 0.2); color: var(--error); padding: 2px 8px; border-radius: 6px; font-weight: bold; font-size: 0.85rem; border: 1px solid rgba(251, 113, 133, 0.3); }
.bonus { display: inline-block; background: rgba(74, 222, 128, 0.2); color: var(--bonus); padding: 2px 8px; border-radius: 6px; font-weight: bold; font-size: 0.85rem; border: 1px solid rgba(74, 222, 128, 0.3); color: #4ade80; }
.sub-rule { font-size: 0.8rem; color: #aaa; font-style: italic; display: block; margin-top: 6px; border-top: 1px dashed rgba(255,255,255,0.1); padding-top: 6px; }

/* SETUP */
.setup-layout { display: flex; flex-direction: column; height: 100%; overflow: hidden; position: relative; }
.setup-layout .input-group { display: flex; gap: 10px; padding: 6px; margin: 20px 20px 16px 20px; align-items: center; }
.input-group input { flex: 1; background: transparent; border: none; color: white; padding: 8px 12px; font-size: 1.1rem; outline: none; }
.btn-icon-primary { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #000; border: none; font-size: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-wrapper { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 20px 300px 20px; touch-action: pan-y; overscroll-behavior: contain; }
.player-item { display: flex; align-items: center; background: rgba(255,255,255,0.03); padding: 14px; border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--glass-border); transition: transform 0.2s; }
.drag-handle { cursor: grab; font-size: 1.4rem; padding: 0 12px; color: var(--text-muted); }
.player-info { flex: 1; font-weight: 600; font-size: 1rem; }
.badge-decider { background: #ffd700; color: black; font-size: 0.6rem; padding: 3px 6px; border-radius: 4px; margin-left: 8px; text-transform: uppercase; font-weight: 800; }
.delete-btn { background: none; border: none; color: var(--error); font-size: 1.2rem; padding: 8px; }
.player-item.dragging { opacity: 0.5; background: rgba(74, 222, 128, 0.2); border-color: var(--primary); }
.deck-info-container { padding: 16px; margin-bottom: 12px; font-size: 0.9rem; text-align: center; color: var(--text-muted); line-height: 1.6; background: rgba(0,0,0,0.3); }
.remove-list { display: block; margin-top: 8px; color: #fb7185; font-weight: 600; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 8px; }

/* MODIF: Styles du Toggle Switch iOS */
.toggle-wrapper { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 10px; background: rgba(255,255,255,0.05); border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); }
.toggle-label { font-size: 1rem; font-weight: 600; color: white; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }

/* FIXED FOOTER */
.fixed-footer, .fixed-footer-action { position: absolute; bottom: 0; left: 0; width: 100%; padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); background: linear-gradient(to top, #051a0d 95%, transparent); z-index: 20; border-top: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 12px; touch-action: none; }

/* GAME */
.game-header-bar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.label-tiny { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; letter-spacing: 1px; }
#current-chooser-name { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.pill-btn { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); padding: 6px 16px; border-radius: 20px; color: white; font-size: 0.9rem; font-weight: 600; }
.contracts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 20px; }
.contract-btn { background-color: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: 20px; padding: 0; display: flex; flex-direction: row; align-items: center; gap: 0; color: white; position: relative; overflow: hidden; text-align: left; transition: transform 0.1s, background 0.2s; min-height: 110px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.contract-btn:active { transform: scale(0.98); background-color: rgba(255,255,255,0.08); }
.c-img-box { width: 90px; height: 90px; border-radius: 16px; overflow: hidden; flex-shrink: 0; margin: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); }
.c-img-box img { width: 100%; height: 100%; object-fit: cover; }
.c-content { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding-right: 10px; height: 100%; }
.c-title { font-weight: 800; font-size: 1.1rem; line-height: 1.2; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); text-align: center; word-break: break-word; }
.contract-btn.played { opacity: 0.5; filter: grayscale(1); border-style: dashed; cursor: pointer !important; pointer-events: auto; }
.contract-btn.played::after { content: '✓'; position: absolute; top: 10px; right: 10px; color: var(--primary); font-weight: 900; font-size: 1.5rem; text-shadow: 0 2px 5px black; }

/* INPUTS */
.rule-reminder-mini { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 16px; background: rgba(0,0,0,0.3); }
.score-badge { background: var(--primary); color: #000; font-weight: 800; padding: 4px 8px; border-radius: 6px; font-size: 0.9rem; white-space: nowrap; }
#rule-text-desc { font-size: 0.85rem; color: #ddd; line-height: 1.3; }
.modern-form { flex: 1; overflow-y: auto; padding-bottom: 200px; }
.inputs-grid { display: grid; gap: 12px; }
.input-card { background: linear-gradient(145deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%); border: 1px solid var(--glass-border); border-radius: 20px; padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.input-card.multi-row { flex-direction: column; align-items: stretch; gap: 10px; }
.input-card.multi-row .card-header { display: flex; justify-content: space-between; align-items: center; }
.player-label { font-weight: 700; font-size: 1.1rem; }
.modern-stepper { display: flex; align-items: center; background: #00000040; border-radius: 12px; padding: 4px; gap: 2px; }
.step-btn { width: 44px; height: 44px; border: none; border-radius: 10px; background: rgba(255,255,255,0.1); color: white; font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.step-btn:active { background: var(--primary); color: #000; }
.step-btn:disabled { opacity: 0.2; pointer-events: none; }
.step-value { width: 40px; text-align: center; font-weight: 800; font-size: 1.3rem; color: var(--primary); }
.hearts-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.hearts-label { font-size: 0.85rem; color: var(--text-muted); }
.pretty-select-wrapper { margin-top: 16px; }
.pretty-label { display: block; margin-bottom: 8px; color: var(--primary); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; }
.pretty-select { width: 100%; background: #00000040; border: 1px solid var(--glass-border); color: white; padding: 16px; border-radius: 12px; font-size: 1rem; appearance: none; font-weight: 600; }
.validation-bar { display: flex; flex-direction: column; gap: 6px; }
#validation-msg { font-size: 0.85rem; color: #aaa; text-align: center; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.progress-track { height: 6px; background: #333; border-radius: 10px; overflow: hidden; width: 100%; }
.progress-fill { height: 100%; background: var(--error); width: 0%; transition: width 0.3s, background 0.3s; }
.progress-fill.valid { background: var(--primary); }
.btn-large-action { font-size: 1.2rem; padding: 18px; text-transform: uppercase; letter-spacing: 1px; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 200; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.custom-modal { width: 85%; max-width: 350px; padding: 24px; text-align: center; background: #0f2918; border: 1px solid var(--glass-border); box-shadow: 0 20px 50px rgba(0,0,0,0.5); transform: scale(1); animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-actions { margin-top: 20px; display: flex; gap: 10px; flex-shrink: 0; }
.modal-btn { border-radius: 8px; border: none; padding: 10px 24px; font-weight: bold; font-size: 1rem; width: 100%; }
.modal-btn.btn-confirm { background: var(--primary); color: #002e0f; } 
.modal-btn.btn-cancel { background: rgba(255,255,255,0.1); color: white; }
.btn-dark-action { background: #1a4d2e; color: #a7f3d0; border: 1px solid rgba(74, 222, 128, 0.3); }

/* MODAL LG */
.custom-modal.modal-lg { width: 90%; max-width: 500px; height: 80vh; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.custom-modal.modal-lg #modal-msg { flex: 1; overflow-y: auto; min-height: 0; margin: 10px 0; text-align: left; width: 100%; }
.player-select-list { padding: 0; }
.player-select-item { display: flex; align-items: center; padding: 16px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s ease; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }
.player-select-item input { display: none; }
.player-select-item:hover { background: rgba(255,255,255,0.08); }
.player-select-item:has(input:checked) { background: rgba(74, 222, 128, 0.15); border-color: var(--primary); box-shadow: 0 0 15px rgba(74, 222, 128, 0.2); }
.player-select-label { font-size: 1.1rem; font-weight: 700; color: white; flex: 1; }
.player-select-item:has(input:checked) .player-select-label::after { content: '✓'; float: right; color: var(--primary); font-weight: 900; }

/* SCOREBOARD */
.game-meta { padding: 12px; margin-bottom: 16px; font-size: 0.9rem; color: #fff; text-align: center; line-height: 1.6; border: 1px solid var(--glass-border); border-radius: 12px; background: rgba(0,0,0,0.2); }
.table-wrapper { overflow-x: auto; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 300px; }
th, td { padding: 12px 8px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
th { color: var(--primary); text-transform: uppercase; font-size: 0.7rem; }
.rank-item { display: flex; justify-content: space-between; padding: 12px; background: rgba(255,255,255,0.05); margin-bottom: 6px; border-radius: 8px; align-items: center; }
.rank-pos { color: var(--primary); font-weight: 800; width: 30px; font-size: 1.2rem; }
.rank-score { font-weight: 800; font-size: 1.1rem; }
.rank-name { font-weight: 600; flex: 1; }
td { cursor: pointer; }

/* PODIUM ANIMATION */
.podium-box { text-align: center; padding: 20px; border: 2px solid var(--primary); border-radius: 16px; margin-bottom: 20px; background: rgba(74,222,128,0.05); position: relative; overflow: hidden; animation: pulseGold 3s infinite; }
.podium-box::before { content:''; position: absolute; top:-50%; left:-50%; width:200%; height:200%; background: radial-gradient(circle, rgba(74,222,128,0.5) 0%, transparent 60%); animation: rotateLight 10s linear infinite; pointer-events: none; z-index: 0; }
.winner-icon, .winner-names, .winner-score { position: relative; z-index: 2; }
@keyframes rotateLight { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulseGold { 0%, 100% { border-color: var(--primary-dim); } 50% { border-color: var(--primary); } }
.winner-icon { font-size: 3rem; display: block; margin-bottom: 8px; }
.winner-names { font-size: 1.5rem; font-weight: 900; color: white; white-space: normal; line-height: 1.2; margin-bottom: 8px; }
.winner-score { font-size: 1.2rem; color: var(--primary); font-weight: 800; }

/* NOUVEAU: VUE GESTION DES CONTRES */
.counters-grid { display: grid; gap: 12px; }
.counter-row { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.05); padding: 16px; border-radius: 12px; border: 1px solid var(--glass-border); }
.counter-player-name { font-weight: 700; font-size: 1.1rem; color: white; }
.counter-status { font-size: 0.8rem; color: #aaa; margin-top: 4px; }
.counter-btn { background: var(--primary); color: #002e0f; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 0.9rem; }
.counter-badge-count { display: inline-block; background: #333; color: white; border-radius: 4px; padding: 2px 5px; font-size: 0.7rem; margin-left: 5px; }

/* Styles pour les badges de prévisualisation dans la liste */
.counter-list-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mini-counter-tag, .mini-passive-tag { font-size: 0.75rem; color: #000; background: var(--warning); padding: 2px 6px; border-radius: 4px; font-weight: bold; }
.mini-surcontre-tag { font-size: 0.75rem; color: #fff; background: var(--error); padding: 2px 6px; border-radius: 4px; font-weight: bold; border: 1px solid rgba(251, 113, 133, 0.5); }

/* NOUVEAU: MODAL DE CONTRE */
.counter-target-list { display: flex; flex-direction: column; gap: 8px; }
.counter-target-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: rgba(255,255,255,0.05); border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: 0.2s; }
.counter-target-item:hover { background: rgba(255,255,255,0.1); }
.counter-target-item.selected { background: rgba(74, 222, 128, 0.15); border-color: var(--primary); }
.counter-target-item.countered-me { border-color: var(--warning); box-shadow: 0 0 5px rgba(251, 146, 60, 0.3); }
.counter-target-name { font-weight: 600; }
.counter-target-status { font-size: 0.8rem; color: #aaa; }
.badge-orange { background: var(--warning); color: #000; font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; font-weight: 800; margin-right: 6px; }

/* SCORE DETAIL MODAL */
.score-detail-modal { max-width: 400px; }
.detail-row { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 8px 0; font-size: 0.9rem; }
.detail-row:last-child { border-bottom: none; }
.detail-total { font-weight: 800; font-size: 1.1rem; color: var(--primary); padding-top: 12px; margin-top: 4px; border-top: 2px solid white; }

/* PRINT */
@media print {
    body { background: white !important; color: black !important; display: block; overflow: visible; font-family: serif; }
    .no-print, .top-bar, .home-actions, .history-section, .btn-icon-small, .fixed-footer-action, .version-tag, .bg-animation, .icon-btn, .menu-wrapper { display: none !important; }
    .view { display: none; }
    .view.active { display: block; position: relative; opacity: 1; transform: none; padding: 0; }
    .glass-panel, .rules-content .card { background: white !important; border: 1px solid #000; color: black !important; margin-bottom: 20px; box-shadow: none; border-radius: 0; padding: 10px; }
    h2, h3, p, li, strong { color: black !important; text-shadow: none !important; }
    .print-header { display: block; font-size: 1.5rem; font-weight: bold; margin-bottom: 20px; text-align: center; border-bottom: 2px solid black; }
    .table-wrapper { border: none; }
    table { border: 1px solid black; width: 100%; border-collapse: collapse; }
    th { background: #eee !important; color: black !important; border: 1px solid black; font-weight: bold; }
    td { color: black !important; border: 1px solid black; }
    .rank-item { border: 1px solid black; color: black; background: white; }
    .rank-pos, .rank-score { color: black !important; }
}