::-webkit-scrollbar { display: none; width: 0; background: transparent; }
* { scrollbar-width: none; -ms-overflow-style: none; -webkit-tap-highlight-color: transparent; }

:root {
    --bg-main: #0B132B; --glass-bg: rgba(28, 43, 70, 0.6); --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff; --text-muted: #8c9baf; --accent-blue: #3A86FF; --accent-green: #00E676;
    --ice-bg: #E0F2FE; --ice-line-red: #ef4444; --ice-line-blue: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main); background-image: radial-gradient(circle at 50% -20%, #1c315e, var(--bg-main));
    color: var(--text-main); margin: 0 auto; max-width: 550px; position: relative;
    padding: 0; min-height: 100vh; box-sizing: border-box; overflow-y: auto; -webkit-overflow-scrolling: touch; 
}
#app-container { padding: 16px; padding-bottom: 90px; }

.glass-panel { background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); }

.fullscreen-modal {
    position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 550px; width: 100%; height: 100%;
    background: var(--bg-main); z-index: 2000; display: flex; flex-direction: column; animation: slideUp 0.3s ease-out; overflow: hidden;
}
.fullscreen-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--glass-border); background: var(--glass-bg); flex-shrink: 0; }
.fullscreen-header h3 { margin: 0; font-size: 18px; }
.players-scroll-list, .fullscreen-body { flex: 1 1 auto; overflow-y: auto; padding: 15px; padding-bottom: 40px; min-height: 0; -webkit-overflow-scrolling: touch; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 19, 43, 0.85); z-index: 3000; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(8px); }
.modal-content { padding: 30px; width: 85%; text-align: center; }
.action-overlay { align-items: flex-end; }
.action-sheet { background: var(--bg-dark); width: 100%; max-width: 550px; margin: 0 auto; border-radius: 24px 24px 0 0; padding: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--glass-border); animation: slideUp 0.3s ease-out; }
.action-sheet h3 { margin: 0 0 5px 0; text-align: center; }
.action-sheet .price-tag { text-align: center; margin-bottom: 15px; display: block; font-size: 16px; }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.highlight { color: var(--accent-green); }
.icon-btn { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--glass-border); color: var(--text-main); width: 32px; height: 32px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 16px; cursor: pointer; transition: 0.2s; touch-action: manipulation; flex-shrink: 0; }
.icon-btn:active { transform: scale(0.9); background: rgba(255, 255, 255, 0.2); }

.guide-text { text-align: left; } .guide-text h4 { color: var(--accent-blue); margin-top: 20px; margin-bottom: 8px; font-size: 16px; } .guide-text h4:first-child { margin-top: 0; } .guide-text p, .guide-text ul { font-size: 14px; color: #cbd5e1; line-height: 1.5; margin-top: 0; margin-bottom: 12px;} .guide-text li { margin-bottom: 6px; }

.filters-container { padding: 15px; flex-shrink: 0; border-bottom: 1px solid var(--glass-border); }
.sort-group { display: flex; justify-content: space-between; gap: 10px; }
.price-range-group { display: flex; gap: 10px; margin-bottom: 12px; }
.half-input { width: 50%; margin-bottom: 0 !important; }
.glass-input, .glass-select { width: 100%; box-sizing: border-box; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--glass-border); color: var(--text-main); padding: 14px 16px; border-radius: 12px; font-size: 15px; margin-bottom: 12px; outline: none; transition: 0.3s; }
.glass-select { appearance: none; background-image: url('data:image/svg+xml;utf8,<svg fill="%238c9baf" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); background-repeat: no-repeat; background-position: right 10px center; }
.glass-select option { background: var(--bg-main); color: var(--text-main); }
.glass-btn { width: 100%; padding: 16px; border-radius: 14px; border: none; font-size: 16px; font-weight: 600; color: white; cursor: pointer; touch-action: manipulation;}
.primary-btn { background: linear-gradient(135deg, var(--accent-blue), #2563eb); box-shadow: 0 4px 15px rgba(58, 134, 255, 0.3); }
.primary-btn:disabled { background: var(--glass-border); color: var(--text-muted); box-shadow: none; }
.pick-btn { background: rgba(0, 230, 118, 0.15); color: var(--accent-green); border: 1px solid rgba(0, 230, 118, 0.3); padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; touch-action: manipulation;}
.info-small-btn { background: rgba(255, 255, 255, 0.1); border: none; color: #ffffff; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; align-self: center; }
.player-slot *, .glass-btn *, .pick-btn * { pointer-events: none; }

.action-btn { width: 100%; padding: 16px; border-radius: 14px; border: none; font-size: 16px; font-weight: 700; cursor: pointer; background: #f8fafc; color: #0f172a; transition: 0.2s; touch-action: manipulation;}
.action-btn:active { transform: scale(0.97); }
.action-sell-btn { color: #ef4444; }
.action-cancel-btn { background: rgba(255,255,255,0.1); color: #ffffff; margin-top: 5px;}

.player-card { display: flex; align-items: center; justify-content: space-between; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.player-left { display: flex; align-items: center; gap: 12px; flex-grow: 1; }
.jersey-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; font-weight: 800; font-size: 14px; background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="%23ffffff20" xmlns="http://www.w3.org/2000/svg"><path d="M6 3l-4 5v2h2v10h16V10h2V8l-4-5H6z"/></svg>'); background-size: cover; border: 1px solid rgba(255,255,255,0.1);}
.jersey-logo { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0px 1px 2px rgba(0,0,0,0.5)); }
.jersey-team-text { font-size: 13px; font-weight: 800; letter-spacing: 0.5px; }
.player-info { display: flex; flex-direction: column; gap: 4px; }
.player-name { font-size: 16px; font-weight: 600; margin: 0; }
.player-tags { display: flex; gap: 6px; font-size: 12px; align-items: center; }
.badge { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 6px; font-weight: 600; }
.badge.pos-F { color: #f87171; } .badge.pos-D { color: #60a5fa; } .badge.pos-G { color: #fbbf24; }
.player-price-white { color: #ffffff; font-weight: 600; }
.player-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 70px; }
.pts-value { font-size: 18px; font-weight: 800; }
.pts-positive { color: var(--accent-green); } .pts-negative { color: var(--ice-line-red); } .pts-neutral { color: var(--text-muted); }
.pts-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }

.log-card { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: 16px; margin-bottom: 12px; padding: 15px; }
.log-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; margin-bottom: 10px; }
.log-date { font-size: 12px; color: var(--text-muted); font-weight: 600;}
.log-opp { font-size: 16px; font-weight: 800; color: white; }
.log-pts { font-size: 15px; font-weight: 800; }
.log-grid { display: flex; justify-content: space-between; }
.stat-box { display: flex; flex-direction: column; align-items: center; width: 25%; }
.stat-box span { font-size: 16px; font-weight: 700; color: white; }
.stat-box label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; font-weight: 600; }
.profile-season-box { display: flex; justify-content: space-around; background: rgba(0,0,0,0.2); padding: 15px 10px; border-bottom: 1px solid var(--glass-border); }
.profile-stat-item { display: flex; flex-direction: column; align-items: center; }
.profile-stat-val { font-size: 18px; font-weight: 800; color: white; }
.profile-stat-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; font-weight: 600; }

.match-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 15px; margin-bottom: 15px; }
.match-header { text-align: center; font-size: 13px; font-weight: bold; color: var(--text-muted); border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; margin-bottom: 10px; }
.match-teams { display: flex; justify-content: space-around; align-items: center; margin-bottom: 15px; }
.match-team { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; width: 40%; }
.match-team.away { justify-content: flex-end; } .match-team.home { justify-content: flex-start; }
.match-score { font-size: 24px; font-weight: 900; color: white; padding: 0 15px; }
.match-details { font-size: 12px; color: #cbd5e1; line-height: 1.6; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 10px; }
.match-details-title { font-weight: bold; color: var(--accent-blue); margin-bottom: 5px; margin-top: 5px;}
.match-details-title:first-child { margin-top: 0; }
.period-divider { color: var(--text-hint); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-top: 10px; margin-bottom: 2px; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 2px; }

.segmented-control { display: flex; background: rgba(0, 0, 0, 0.3); border-radius: 12px; padding: 4px; margin-bottom: 15px; border: 1px solid var(--glass-border); flex-shrink: 0;}
.segment-tab { flex: 1; text-align: center; padding: 10px 0; font-size: 14px; font-weight: 600; color: var(--text-muted); border-radius: 8px; transition: all 0.2s ease; cursor: pointer; }
.segment-tab.active { background: var(--glass-bg); color: var(--text-main); border: 1px solid var(--glass-border); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.sub-section { display: none; flex-direction: column; flex-grow: 1; }
.sub-section.active { display: flex; animation: fadeIn 0.3s ease; }
.tab-content { display: none; height: 100%;} 
.tab-content.active { display: flex; flex-direction: column; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.header-info { display: flex; justify-content: space-between; padding: 16px 20px; font-size: 15px; font-weight: 600; margin-bottom: 15px; }
.balance-box { color: var(--accent-green); }
/* 🌟 ИСПРАВЛЕННЫЙ ЛЕД (Убрали overflow: hidden) */
/* 🌟 ФИКС ОБРЕЗАНИЯ ВРАТАРЕЙ */
.ice-rink { 
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%); 
    border-radius: 24px; 
    padding: 15px 5px 25px 5px; 
    position: relative; 
    border: 4px solid rgba(255,255,255,0.5); 
    margin-bottom: 20px;
    min-height: auto; /* Лед растягивается под количество слотов */
    overflow: visible; /* Отключили скрытие контента! */
}
.rink-section-title { text-align: center; font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 2px; margin: 8px 0; }
.rink-row { display: flex; justify-content: space-evenly; margin: 5px 0; position: relative; z-index: 2; }
.blue-line, .red-line { height: 4px; width: 100%; margin: 15px 0; }
.blue-line { background: var(--ice-line-blue); opacity: 0.5;} .red-line { background: var(--ice-line-red); opacity: 0.5;}
.player-slot { display: flex; flex-direction: column; align-items: center; width: 60px; position: relative; touch-action: manipulation;}
.jersey { width: 46px; height: 46px; border-radius: 10px; background-color: #1e293b; color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; font-weight: 700; font-size: 14px; border: 2px solid rgba(255,255,255,0.8); background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="%23ffffff30" xmlns="http://www.w3.org/2000/svg"><path d="M6 3l-4 5v2h2v10h16V10h2V8l-4-5H6z"/></svg>'); background-size: cover; }
.jersey.empty { background: rgba(0,0,0,0.05); border: 2px dashed #94a3b8; color: #94a3b8; box-shadow: none; background-image: none; }
.slot-name { font-size: 11px; margin-top: 6px; color: #475569; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60px;}
.rink-price { color: #059669; font-weight: 800; font-size: 11px; margin-top: 2px; }
.rink-price-diff { font-size: 9px; font-weight: 800; margin-top: 2px; }
.captain-badge { position: absolute; top: -5px; right: -5px; background: #FFD700; color: #000; font-weight: 900; font-size: 12px; width: 18px; height: 18px; border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 1px solid #fff; z-index: 5; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 550px; width: 100%; display: flex; justify-content: space-between; background: rgba(11, 19, 43, 0.95); backdrop-filter: blur(15px); border-top: 1px solid var(--glass-border); padding: 10px 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); z-index: 100; box-sizing: border-box;}
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--text-muted); font-weight: 700; transition: 0.2s; flex: 1; padding: 10px 0; margin: 0 4px; border-radius: 14px; cursor: pointer; touch-action: manipulation;}
.nav-item.active { color: var(--accent-blue); background: rgba(58, 134, 255, 0.15); box-shadow: inset 0 0 10px rgba(58, 134, 255, 0.05); }

.standings-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--glass-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--glass-border); margin-bottom: 20px; }
.standings-table th { background: rgba(0,0,0,0.3); padding: 10px 5px; color: var(--text-muted); font-weight: 600; text-align: right; }
.standings-table th:nth-child(1), .standings-table th:nth-child(2) { text-align: left; }
.standings-table td { padding: 10px 5px; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.05); }
.standings-table td:nth-child(1), .standings-table td:nth-child(2) { text-align: left; }
.team-cell { display: flex; align-items: center; gap: 8px; font-weight: bold;}
.team-logo { width: 20px; height: 20px; object-fit: contain; }
.playoff-spot td { background-color: rgba(46, 204, 113, 0.08); }
.playoff-spot td:first-child { border-left: 3px solid var(--accent-green); }

.leaderboard-item { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.03); padding: 12px 15px; border-radius: 12px; margin-bottom: 8px; border: 1px solid transparent; }
.leaderboard-item.is-me { background: rgba(58, 134, 255, 0.15); border-color: rgba(58, 134, 255, 0.3); }
.rank-badge { width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 800; font-size: 14px; background: #1e293b; color: var(--text-muted); margin-right: 12px; }
.rank-1 { background: #FFD700; color: #000; box-shadow: 0 0 10px rgba(255,215,0,0.5); } .rank-2 { background: #C0C0C0; color: #000; } .rank-3 { background: #CD7F32; color: #fff; }
.lb-user-info { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.lb-team-name { font-weight: 700; font-size: 15px; color: var(--text-main); }
.lb-manager-name { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.lb-points { font-size: 16px; font-weight: 800; color: var(--accent-green); }
.my-rank-sticky { background: var(--bg-main); border-top: 1px solid var(--glass-border); padding: 10px; box-shadow: 0 -4px 10px rgba(0,0,0,0.2); z-index: 10; flex-shrink: 0;}
.league-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; padding: 16px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; position: relative;}
.league-card-title { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.league-card-code { font-size: 12px; color: var(--text-muted); }
.loading-text { text-align: center; color: var(--text-muted); padding: 30px; }
.spoiler { filter: blur(5px); cursor: pointer; transition: filter 0.3s ease; background: rgba(0,230,118,0.1); padding: 2px 6px; border-radius: 4px; }
.spoiler.revealed { filter: blur(0); }

.draft-my-team-summary { background: rgba(0,0,0,0.2); border-bottom: 1px solid var(--glass-border); padding: 10px 15px; font-size: 13px; flex-shrink: 0; }
.draft-counts { display: flex; justify-content: space-between; font-weight: bold; margin-bottom: 10px; }
.draft-mini-players-container { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; }
.draft-mini-player { background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: 8px; padding: 6px 10px; white-space: nowrap; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
@keyframes pulseGreen { 0% { background-color: #00C853; } 50% { background-color: #00E676; box-shadow: 0 0 15px #00E676; } 100% { background-color: #00C853; } }
.draft-turn-me { animation: pulseGreen 2s infinite; }

/* Анимации кнопок и карточек */
.player-card, .match-card, .league-card, .leaderboard-item, .glass-btn { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.player-card:active, .match-card:active, .league-card:active, .leaderboard-item:active, .glass-btn:active { transform: scale(0.97); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

/* 🌟 Скамейка запасных (Snake Draft) */
.bench-zone {
    background: rgba(0,0,0,0.3);
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 10px 5px;
    margin-bottom: 20px;
}
.bench-row { margin: 10px 0; }

/* 🌟 ФИКС НАЛОЖЕНИЯ ОКОН: Окно чужой команды всегда поверх остальных */
#other-team-modal {
    z-index: 2500;
}

/* 🌟 ФИКС: Окно логов всегда поверх всех других окон (даже поверх Snake Hub) */
#player-profile-modal { z-index: 4000 !important; }

/* 🌟 КАРТОЧКИ ТРЕЙДОВ (Trade Center) */
.trade-card { 
    background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); 
    border-radius: 16px; padding: 15px; margin-bottom: 12px; 
}
.trade-header { 
    font-size: 12px; color: var(--text-muted); border-bottom: 1px solid rgba(255,255,255,0.05); 
    padding-bottom: 10px; margin-bottom: 15px; display: flex; justify-content: space-between; font-weight: 600;
}
.trade-body { 
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; 
}
.trade-player { 
    display: flex; flex-direction: column; align-items: center; width: 42%; text-align: center; 
}
.trade-player-name { 
    font-weight: 700; font-size: 13px; margin-top: 6px; color: white; 
}
.trade-vs { 
    font-size: 24px; color: var(--accent-blue); font-weight: 900; 
}
.trade-actions { 
    display: flex; gap: 10px; 
}

/* 🌟 СЕТКА КАЛЕНДАРЯ (Schedule Grid) */
.schedule-table-container { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    border-radius: 16px; 
    border: 1px solid var(--glass-border); 
    background: var(--glass-bg); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); /* 🌟 Вернули магию стекла контейнеру */
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); /* 🌟 Добавили объем */
}

/* 🌟 СПЕЦИАЛЬНЫЙ МИНИ-СКРОЛЛБАР ДЛЯ ПК */
.schedule-table-container::-webkit-scrollbar { 
    display: block; 
    height: 6px; 
}
.schedule-table-container::-webkit-scrollbar-track { 
    background: rgba(0,0,0,0.1); 
    border-radius: 8px; 
    margin: 8px; /* Отступы по краям скролла */
}
.schedule-table-container::-webkit-scrollbar-thumb { 
    background: rgba(255,255,255,0.2); 
    border-radius: 8px; 
}
.schedule-table-container::-webkit-scrollbar-thumb:hover { 
    background: rgba(255,255,255,0.4); 
}

.schedule-table { 
    width: 100%; border-collapse: collapse; font-size: 11px; text-align: center; color: white;
}
.schedule-table th { 
    background: rgba(0,0,0,0.3); padding: 10px 4px; color: var(--text-muted); 
    font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--glass-border);
}
.schedule-table td { 
    padding: 8px 2px; border: 1px solid rgba(255,255,255,0.05); min-width: 40px;
}
/* 🌟 ИСПРАВЛЕНА ЛЕВАЯ КОЛОНКА (Теперь она вписывается в общий дизайн) */
.schedule-table .team-col { 
    position: sticky; left: 0; 
    background: rgba(11, 19, 43, 0.95); /* Глубокий полупрозрачный цвет вместо глухого черного */
    z-index: 2; border-right: 1px solid var(--glass-border); 
}
.sched-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;}
.sched-home { color: white; font-weight: 800; }
.sched-away { color: var(--text-muted); font-weight: 600;}
.sched-tot { font-size: 14px; font-weight: 900; color: var(--accent-green); background: rgba(0, 230, 118, 0.1); }
.day-date { font-size: 9px; opacity: 0.7; font-weight: normal; }