:root {
    --bg-dark: #000000;
    --bg-surface: #0a0a0a;
    --bg-hover: #141414;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warn: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #222222;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: transparent; overflow: hidden; }
::-webkit-scrollbar { display: none; }

.text-primary { color: var(--primary) !important; }
.text-danger { color: var(--danger) !important; }
.text-warn { color: var(--warn) !important; }
.text-green { color: #10b981 !important; }
.text-gold { color: #f5c542 !important; }
.text-silver { color: #cbd5e1 !important; }

#player-warn-screen { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(10, 10, 10, 0.98); z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--text-main); }
#player-warn-screen h1 { font-size: 3rem; color: var(--warn); margin-bottom: 10px; }
.warn-reason-box { background: rgba(245, 158, 11, 0.1); border: 1px solid var(--warn); padding: 20px; border-radius: 8px; margin-top: 20px; max-width: 600px; width: 90%; font-size: 1.2rem; }
.hold-space-container { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hold-progress { width: 300px; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.hold-bar { width: 0%; height: 100%; background: var(--warn); }

#app { display: flex; height: 90vh; width: 90vw; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: transparent; color: var(--text-main); opacity: 0.6; transition: opacity var(--transition); }
#app:hover { opacity: 1.0; }

.sidebar { width: 70px; height: calc(100% - 48px); background: rgba(12, 12, 12, 0.98); border: 1px solid var(--border); border-radius: 16px; transition: width var(--transition); overflow: hidden; white-space: nowrap; position: absolute; top: 24px; left: 24px; z-index: 50; display: flex; flex-direction: column; }
.sidebar:hover { width: 240px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.logo { padding: 24px; font-size: 1.25rem; color: var(--primary); font-weight: 700; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--border); }
.nav-links { list-style: none; margin-top: 10px; flex: 1; }
.nav-links li { padding: 16px 24px; cursor: pointer; display: flex; align-items: center; gap: 24px; color: var(--text-muted); transition: var(--transition); font-weight: 500; }
.nav-links li:hover, .nav-links li.active { background: rgba(59, 130, 246, 0.1); color: var(--primary); border-left: 4px solid var(--primary); }
.nav-links li i { width: 20px; text-align: center; font-size: 1.1rem; }
.nav-text { opacity: 0; transition: opacity var(--transition); }
.sidebar:hover .nav-text { opacity: 1; }

.content-area { margin-left: 0; width: 100%; height: 100%; padding: 24px 24px 24px 114px; overflow-y: auto; overflow-x: hidden; position: relative; }
.page { display: none !important; height: 100%; gap: 24px; }
.page.active { display: flex !important; }

.card { background: rgba(12, 12, 12, 0.98); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2); }
.full-page-card { background: rgba(12, 12, 12, 0.98); border: 1px solid var(--border); border-radius: 16px; padding: 30px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2); height: 100%; width: 100%; flex-direction: column; overflow: hidden; }

/* Dashboard */
.dash-hero { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(10, 10, 10, 0) 100%); border: 1px solid var(--border); border-radius: 16px; padding: 30px; margin-bottom: 20px; position: relative; overflow: hidden; flex-shrink: 0; }
.hero-content h1 { font-size: 2rem; margin-bottom: 5px; color: var(--text-main); }
.hero-content p { color: var(--text-muted); font-size: 1rem; }
.dash-main-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px; flex-shrink: 0; }
.dash-stat-box { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 20px; transition: var(--transition); }
.dash-stat-box:hover { transform: translateY(-5px); border-color: var(--primary); }
.dash-stat-box i { font-size: 2.5rem; opacity: 0.8; }
.stat-text h4 { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.stat-text h2 { font-size: 2rem; color: var(--text-main); }
.dash-layout { display: flex; gap: 20px; flex: 1; min-height: 0; }
.dash-jobs { flex: 2; display: flex; flex-direction: column; overflow-y: auto; }
.jobs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-top: 15px; }
.job-item { background: var(--bg-dark); border: 1px solid var(--border); border-radius: 10px; padding: 15px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: 0.2s; }
.job-item:hover { background: var(--bg-hover); border-color: var(--primary); transform: scale(1.02); }
.job-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; flex-shrink: 0; }
.job-details h4 { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 2px; }
.job-details span { font-size: 1.2rem; font-weight: 700; color: var(--text-main); }
.dash-quick-list { flex: 1; display: flex; flex-direction: column; }

/* Monitoring */
.monitor-main { flex: 1; padding: 20px; overflow-y: auto; background: var(--bg-dark); border-radius: 16px 0 0 16px; }
.monitor-sidebar { width: 300px; background: var(--bg-surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; border-radius: 0 16px 16px 0; }
.monitor-grid { display: grid; gap: 15px; grid-template-columns: 1fr; grid-auto-rows: minmax(300px, 1fr); height: 100%; }
.monitor-grid.grid-2x2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 50%; }
.monitor-grid.grid-multi { grid-template-columns: 1fr 1fr; grid-auto-rows: 300px; height: auto; }
.monitor-screen { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; position: relative; overflow: hidden; display: flex; justify-content: center; align-items: center; transition: 0.2s; }

/* הוספתי תמיכה גם לווידאו (video) בנוסף ל-img שהיה */
.monitor-screen img, .monitor-screen video { width: 100%; height: 100%; object-fit: contain; }

.monitor-empty { color: var(--text-muted); font-size: 1.2rem; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.monitor-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--primary); z-index: 5; background: rgba(0,0,0,0.5); padding: 15px; border-radius: 8px;}
.monitor-loading i { font-size: 2rem; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.screen-info { position: absolute; bottom: 0; left: 0; width: 100%; background: rgba(0,0,0,0.8); padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; }
.screen-info span { font-weight: 600; font-size: 0.9rem; }
.screen-btn { background: var(--primary); color: #fff; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.8rem; transition: 0.2s; }
.screen-btn:hover { background: var(--primary-hover); }
.screen-disconnected { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(239, 68, 68, 0.2); backdrop-filter: blur(5px); display: flex; flex-direction: column; justify-content: center; align-items: center; color: #fff; z-index: 10; }
.monitor-list { flex: 1; overflow-y: auto; list-style: none; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.monitor-list li { padding: 12px; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: 0.2s; }
.monitor-list li:hover { background: var(--bg-hover); border-color: var(--primary); }
.monitor-list li.viewing { border-color: var(--primary); background: rgba(59, 130, 246, 0.1); }
.m-player-info { display: flex; flex-direction: column; }
.m-player-name { font-weight: 600; font-size: 0.9rem; color: var(--text-main); }
.m-player-sub { font-size: 0.75rem; color: var(--text-muted); }

/* Bans & Warns */
.bw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; flex-shrink: 0;}
.bw-stat { background: var(--bg-surface); border: 1px solid var(--border); padding: 15px; border-radius: 12px; text-align: center; }
.bw-stat span { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.bw-stat h2 { font-size: 1.8rem; }
.bw-table { width: 100%; border-collapse: collapse; text-align: left; }
.bw-table th { padding: 15px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; background: var(--bg-dark); position: sticky; top: 0; }
.bw-table td { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.02); font-size: 0.9rem; }
.bw-table tr:hover td { background: var(--bg-hover); cursor: pointer; }
.bw-status { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.status-active { background: rgba(239,68,68,0.15); color: var(--danger); }
.status-warn { background: rgba(245,158,11,0.15); color: var(--warn); }
.status-expired { background: rgba(16,185,129,0.15); color: #10b981; }

.tx-modal { background: var(--bg-dark); border: 1px solid var(--border); border-radius: 12px; overflow: visible; width: 600px; max-width: 95%; }
.tx-header { padding: 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--border); }
.tx-header h2 { font-size: 1.5rem; margin: 0; }
.tx-header.ban { background: linear-gradient(90deg, rgba(239,68,68,0.2) 0%, transparent 100%); border-left: 4px solid var(--danger); }
.tx-header.warn { background: linear-gradient(90deg, rgba(245,158,11,0.2) 0%, transparent 100%); border-left: 4px solid var(--warn); }
.tx-body { padding: 20px; }
.tx-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.tx-info-item { background: var(--bg-surface); padding: 15px; border-radius: 8px; border: 1px solid var(--border); }
.tx-info-item span { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.tx-info-item strong { display: block; font-size: 1.1rem; color: var(--text-main); }
.tx-info-item small { color: var(--text-muted); font-size: 0.8rem; }
.tx-reason-box { background: rgba(255,255,255,0.03); border-left: 3px solid var(--primary); padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.tx-reason-box span { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.tx-reason-box p { font-size: 1.1rem; margin-top: 5px; word-wrap: break-word; }
.tx-actions { background: var(--bg-surface); border: 1px solid var(--border); padding: 20px; border-radius: 8px; overflow: visible; }
.tx-actions h4 { margin-bottom: 15px; color: var(--text-muted); text-transform: uppercase; font-size: 0.85rem; }

/* Players */
.players-panel { width: 320px; height: 100%; display: flex; flex-direction: column; gap: 16px; flex-shrink: 0; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box i { position: absolute; left: 14px; color: var(--text-muted); }
.search-box input { width: 100%; padding: 12px 12px 12px 40px; background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-main); border-radius: 8px; outline: none; transition: border-color 0.2s; }
.search-box input:focus { border-color: var(--primary); }
.players-list-wrap { flex: 1; overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.list-header { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; margin: 16px 0 8px 4px; }
.players-list { list-style: none; display: flex; flex-direction: column; gap: 4px; overflow-x: hidden; }
.players-list li { padding: 12px; background: transparent; border-radius: 8px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; font-size: 0.9rem; border: 1px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 2px; }
.players-list li:hover { background: var(--bg-hover); border-color: var(--border); transform: translateX(4px); }
.players-list li.selected { background: rgba(59, 130, 246, 0.15); border-color: var(--primary); transform: translateX(4px); }
.players-list li.offline { opacity: 0.6; }
.me-separator { width: 90%; height: 1px; background: var(--border); margin: 8px auto; }

.details-panel { flex: 1; height: 100%; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.details-overlay-mode { position: relative; width: 90%; height: 90%; max-width: 1100px; background: var(--bg-surface) !important; border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 30px 60px rgba(0,0,0,0.9); }

.profile-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-shrink: 0; }
.profile-left { display: flex; align-items: center; gap: 24px; }
.avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--bg-dark); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--primary); border: 2px solid var(--primary); }
.profile-info { overflow: hidden; }
.profile-info h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.live-stats-container { display: flex; flex-direction: column; gap: 8px; width: 150px; }
.stat-wrapper { display: flex; align-items: center; gap: 10px; cursor: pointer; transition: transform 0.2s; padding: 4px; border-radius: 4px; }
.stat-wrapper:hover { transform: scale(1.05); background: rgba(255,255,255,0.05); }
.stat-wrapper i { width: 16px; font-size: 0.8rem; text-align: center; }
.stat-track { flex: 1; height: 6px; background: var(--bg-dark); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.stat-fill { height: 100%; border-radius: 4px; transition: width 0.3s ease; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.tag-admin { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.tag-job { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.tag-gang { background: rgba(245, 158, 11, 0.15); color: var(--warn); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; flex-shrink: 0; }
.card-title { font-size: 1rem; font-weight: 600; color: var(--primary); margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.stat-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.9rem; }
.stat-row:last-child { border-bottom: none; }
.stat-row span { color: var(--text-muted); }

.identifiers-box { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-height: 90px; overflow-y: auto; }
.id-badge { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 4px 8px; border-radius: 6px; font-size: 0.7rem; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.id-badge:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.notes-card { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }
.notes-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; min-height: 0; }
.note-item { background: var(--bg-dark); padding: 12px; border-radius: 8px; border-left: 3px solid var(--primary); }
.note-header { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.note-text { font-size: 0.85rem; line-height: 1.4; word-break: break-word; }
.note-actions { margin-top: 8px; display: flex; gap: 8px; }
.note-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; }
.note-btn:hover { color: var(--text-main); }

.icon-btn { background: rgba(59, 130, 246, 0.15); color: var(--primary); border: none; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; transition: var(--transition); }
.icon-btn:hover { background: var(--primary); color: white; }

.actions-wrapper { flex: 1; }
.action-category { margin-bottom: 24px; }
.action-category:last-child { margin-bottom: 0; }
.category-title { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.action-btn { background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-main); padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; transition: all 0.2s; white-space: nowrap; overflow: hidden; }
.action-btn i { font-size: 1.1rem; opacity: 0.8; flex-shrink: 0; }
.action-btn:hover:not(:disabled) { background: var(--bg-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.action-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.action-btn.warn:hover:not(:disabled) { border-color: var(--warn); color: var(--warn); }
.action-btn.danger:hover:not(:disabled), .action-btn.kick:hover:not(:disabled), .action-btn.ban:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.action-btn.success:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }

.modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; z-index: 100; display: none; align-items: center; justify-content: center; }
.modal { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9); overflow: visible; } 
.modal-header { padding: 20px; border-bottom: 1px solid var(--border); font-size: 1.1rem; font-weight: 600; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; overflow: visible; }
.input-field { width: 100%; padding: 12px; background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-main); border-radius: 8px; outline: none; transition: border-color 0.2s; }
.input-field:focus { border-color: var(--primary); }
.textarea { resize: vertical; min-height: 100px; }
.input-group { display: flex; gap: 10px; }
.btn { padding: 12px 20px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn.full { width: 100%; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { background: var(--danger); color: white; }
.btn.danger:hover { background: var(--danger-hover); }
.btn.warn { background: var(--warn); color: #111; }
.btn.warn:hover { background: #d97706; }
.btn.secondary { background: var(--bg-hover); color: var(--text-main); }
.btn.secondary:hover { background: #333; }
.modal-footer { padding: 16px 20px; background: var(--bg-dark); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; border-radius: 0 0 12px 12px; }

.custom-checkbox { display: flex; align-items: center; cursor: pointer; font-size: 0.9rem; user-select: none; position: relative; padding-left: 30px; }
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { position: absolute; top: 50%; left: 0; transform: translateY(-50%); height: 20px; width: 20px; background-color: var(--bg-dark); border: 1px solid var(--border); border-radius: 4px; transition: 0.2s; }
.custom-checkbox:hover input ~ .checkmark { border-color: var(--primary); }
.custom-checkbox input:checked ~ .checkmark { background-color: var(--primary); border-color: var(--primary); }
.checkmark:after { content: ""; position: absolute; display: none; left: 6px; top: 2px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.custom-checkbox input:checked ~ .checkmark:after { display: block; }

.custom-select { position: relative; width: 100%; user-select: none; }
.custom-select .select-selected { background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-main); padding: 12px 15px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: border-color 0.2s; }
.custom-select .select-selected:after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.8rem; color: var(--text-muted); transition: 0.2s; }
.custom-select .select-selected.select-arrow-active { border-color: var(--primary); }
.custom-select .select-selected.select-arrow-active:after { transform: rotate(180deg); color: var(--primary); }
.custom-select .select-items { position: absolute; background: var(--bg-surface); border: 1px solid var(--border); top: 100%; left: 0; right: 0; z-index: 99; border-radius: 8px; margin-top: 5px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); max-height: 200px; overflow-y: auto; }
.custom-select .select-items div { padding: 12px 15px; cursor: pointer; transition: 0.2s; border-bottom: 1px solid rgba(255,255,255,0.02); }
.custom-select .select-items div:last-child { border-bottom: none; }
.custom-select .select-items div:hover { background: rgba(59,130,246,0.1); color: var(--primary); }
.select-hide { display: none; }

.veh-list { list-style: none; max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.veh-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: var(--bg-dark); border-radius: 6px; font-size: 0.9rem; }
.veh-list button { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: none; padding: 6px 10px; border-radius: 4px; cursor: pointer; transition: 0.2s; }
.veh-list button:hover { background: var(--danger); color: white; }

.notify-wrapper { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.notify { display: flex; align-items: center; gap: 12px; padding: 16px; background: rgba(10, 10, 10, 0.95); border-left: 4px solid var(--primary); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.5); color: var(--text-main); min-width: 250px; pointer-events: all; }

@keyframes swallowLeft { 0% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(-20px); opacity: 0; } }
.swallow-left { animation: swallowLeft 0.25s forwards !important; }
@keyframes rollUpBottom { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }
.roll-up { animation: rollUpBottom 0.25s forwards !important; }

.slide-in-right { animation: slideInRight 0.3s forwards; }
.slide-out-right { animation: slideOutRight 0.3s forwards; }
.fade-in { animation: fadeIn 0.3s ease forwards; opacity: 0;}
.slide-down { animation: slideDown 0.3s ease forwards; opacity: 0;}
.zoom-in { animation: zoomIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.zoom-out { animation: zoomOut 0.2s forwards; }

@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Inventory Panel ──────────────────────────────────────────────────── */
.inv-modal { max-width: 500px; width: 90vw; max-height: 80vh; display: flex; flex-direction: column; }
.inv-modal-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.inv-add-row { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.inv-search-wrap { flex: 1; position: relative; }
.inv-qty-field { width: 70px !important; flex-shrink: 0; }
.inv-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; max-height: 220px; overflow-y: auto; z-index: 300; display: none; box-shadow: 0 8px 24px rgba(0,0,0,0.6); }
.inv-dropdown-item { padding: 8px 12px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; transition: 0.15s; border-bottom: 1px solid var(--border); }
.inv-dropdown-item:last-child { border-bottom: none; }
.inv-dropdown-item:hover { background: var(--bg-hover); color: var(--primary); }
.inv-dropdown-item img { width: 30px; height: 30px; object-fit: contain; border-radius: 4px; background: rgba(255,255,255,0.04); flex-shrink: 0; }
.inv-dropdown-item-info { display: flex; flex-direction: column; }
.inv-dropdown-item-label { font-weight: 500; font-size: 0.85rem; }
.inv-dropdown-item-name { font-size: 0.72rem; color: var(--text-muted); }
.inv-sel-tag { display: none; align-items: center; gap: 8px; background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.25); border-radius: 8px; padding: 7px 12px; font-size: 0.85rem; flex-shrink: 0; }
.inv-sel-code { font-size: 0.75rem; color: var(--text-muted); margin-left: 2px; }
.inv-sel-clear { margin-left: auto; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; padding: 2px 6px; border-radius: 4px; transition: 0.15s; line-height: 1; }
.inv-sel-clear:hover { background: rgba(239,68,68,0.2); color: var(--danger); }
.inv-items-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; min-height: 0; padding-right: 2px; }
.inv-item-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; transition: 0.15s; flex-shrink: 0; }
.inv-item-row:hover { border-color: rgba(255,255,255,0.12); }
.inv-item-img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,0.04); flex-shrink: 0; }
.inv-item-info { flex: 1; min-width: 0; }
.inv-item-label { font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-item-name { font-size: 0.73rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-item-count { font-size: 0.88rem; font-weight: 700; color: var(--primary); min-width: 40px; text-align: right; flex-shrink: 0; }
.inv-item-btns { display: flex; gap: 4px; flex-shrink: 0; }
.inv-item-btns button { width: 26px; height: 26px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.72rem; font-weight: 700; transition: 0.15s; display: flex; align-items: center; justify-content: center; }
.inv-btn-plus { background: rgba(16,185,129,0.15); color: #10b981; }
.inv-btn-plus:hover { background: rgba(16,185,129,0.3); }
.inv-btn-minus { background: rgba(245,158,11,0.15); color: var(--warn); }
.inv-btn-minus:hover { background: rgba(245,158,11,0.3); }
.inv-btn-del { background: rgba(239,68,68,0.15); color: var(--danger); }
.inv-btn-del:hover { background: rgba(239,68,68,0.3); }
.inv-empty { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.inv-empty i { font-size: 2rem; opacity: 0.3; }

/* ── Coins modal (ak4y gold/silver) ──────────────────────────────────────── */
.coins-balances { display: flex; gap: 12px; }
.coin-balance { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; padding: 12px; cursor: pointer; transition: var(--transition); }
.coin-balance:hover { border-color: rgba(255,255,255,0.18); }
.coin-balance.selected { border-color: var(--primary); background: rgba(59,130,246,0.10); }
.coin-balance i { font-size: 1.4rem; flex-shrink: 0; }
.coin-balance.gold i { color: #f5c542; }
.coin-balance.silver i { color: #cbd5e1; }
.coin-bal-info { display: flex; flex-direction: column; min-width: 0; }
.coin-bal-info span { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.coin-bal-info strong { font-size: 1.15rem; }
.coins-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: -8px; }
.coin-type-select { display: flex; gap: 10px; }
.coin-type-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: var(--bg-dark); border: 1px solid var(--border); color: var(--text-main); border-radius: 8px; cursor: pointer; font-weight: 600; transition: var(--transition); }
.coin-type-btn:hover { border-color: rgba(255,255,255,0.18); }
.coin-type-btn.gold i { color: #f5c542; }
.coin-type-btn.silver i { color: #cbd5e1; }
.coin-type-btn.active { border-color: var(--primary); background: rgba(59,130,246,0.12); }
.coins-actions { display: flex; gap: 10px; }
.coins-actions .btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ── Monitor Spectate (מודאל מעל ה-UI הקיים — לא סוגר את התפריט) ──────── */
#monitor-spectate { position: fixed; inset: 0; z-index: 99998; display: none; align-items: center; justify-content: center; pointer-events: auto; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
.ms-frame { width: 72vw; max-width: 1280px; background: rgba(8, 8, 8, 0.96); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); overflow: hidden; }
.ms-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: rgba(59, 130, 246, 0.12); border-bottom: 1px solid var(--border); font-size: 0.95rem; font-weight: 600; color: var(--text-main); }
.ms-top i { color: var(--primary); margin-right: 6px; }
.ms-top #ms-name { color: var(--primary); }
.ms-close { width: 32px; height: 32px; border: none; border-radius: 8px; cursor: pointer; background: rgba(239, 68, 68, 0.2); color: var(--danger); font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: 0.15s; }
.ms-close:hover { background: rgba(239, 68, 68, 0.4); }
.ms-screen { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; display: flex; align-items: center; justify-content: center; }
.ms-screen video { width: 100%; height: 100%; object-fit: contain; background: #000; }
#ms-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-muted); font-size: 1rem; }
#ms-loading i { font-size: 2.2rem; color: var(--primary); }

/* Alt-passive: המניו הגדול שקוף וניתן לראות דרכו תוך שליטה בדמות */
#app.menu-passive { opacity: 0.45; transition: opacity 0.18s ease; }

/* card-only: פתיחת כרטיס שחקן בודד בלי הסיידבר והעמודים */
#app.card-only .sidebar, #app.card-only .content-area { display: none !important; }
@keyframes zoomOut { from { transform: scale(1); opacity: 1; } to { transform: scale(0.95); opacity: 0; } }