:root{--bg: #16181c;--surface: #1f2228;--surface-active: #282c35;--border: #2e333d;--text: #d6dae2;--muted: #8b93a1}*{box-sizing:border-box}html,body,#app{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.35}.app-shell{min-height:100vh;display:flex;flex-direction:column}.topbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1.25rem;border-bottom:1px solid var(--border);background:var(--surface)}.brand{margin:0;font-size:1.1rem;font-weight:600}.nav{display:flex;align-items:center;gap:.5rem}.btn{padding:.45rem .9rem;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font:inherit;font-size:.9rem;cursor:pointer}.btn:hover:not(:disabled){background:var(--surface-active)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.is-active{background:var(--surface-active);border-color:var(--muted)}.btn-subtle{color:var(--muted)}.content{flex:1;padding:1rem 1.25rem}.muted{color:var(--muted);font-size:.85rem}.live-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:1.25rem;min-height:calc(100vh - 5.25rem)}.bracket-panel{display:flex;flex-direction:column}.bracket-grid{position:relative;flex:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(150px,.8fr);column-gap:2rem;row-gap:1rem}.bracket-connectors{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:0}.connector-line{fill:none;stroke:var(--border);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.connector-line.is-active{stroke-width:2.75;stroke-dasharray:1;stroke-dashoffset:1;animation:bracket-line-draw .5s cubic-bezier(.22,1,.36,1) forwards}.connector-sparkle{fill:none;stroke:#fffffff2;stroke-width:3;stroke-linecap:round;stroke-dasharray:.005 .032 .004 .044 .003 .036 .003 1.2;stroke-dashoffset:.16;opacity:0;filter:drop-shadow(0 0 4px rgba(255,255,255,.95));animation:bracket-sparkle-travel .54s cubic-bezier(.22,1,.36,1) forwards}.connector-spark-head{fill:none;stroke:#fff8dc;stroke-width:4.5;stroke-linecap:round;stroke-dasharray:.012 1.2;stroke-dashoffset:.012;opacity:0;filter:drop-shadow(0 0 6px #ffffff);animation:bracket-spark-head-travel .5s cubic-bezier(.22,1,.36,1) forwards}@keyframes bracket-line-draw{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}@keyframes bracket-sparkle-travel{0%{opacity:0;stroke-dashoffset:.16}15%{opacity:1}80%{opacity:.95}to{opacity:0;stroke-dashoffset:-1}}@keyframes bracket-spark-head-travel{0%{opacity:0;stroke-dashoffset:.012}12%{opacity:1}85%{opacity:1}to{opacity:0;stroke-dashoffset:-1}}.round-col{position:relative;z-index:1;display:flex;flex-direction:column}.round-title{margin:0 0 .75rem;font-size:.9rem;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.bracket-panel .round-title{text-align:center}.round-matches{flex:1;display:flex;flex-direction:column;justify-content:space-around;align-items:center;gap:.75rem}.match-card{width:100%;max-width:210px;border:1px solid var(--border);border-radius:4px;background:var(--surface);padding:.5rem}.match-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.4rem;min-height:1.35rem}.match-label{font-size:.75rem;color:var(--muted)}.reset-btn{padding:.15rem .45rem;border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--muted);font:inherit;font-size:.72rem;cursor:pointer}.reset-btn:hover{color:var(--text);border-color:var(--muted)}.match-teams{display:flex;flex-direction:column;gap:.35rem}.team-slot{width:100%;text-align:left;padding:.48rem .6rem;border:1px solid var(--team-border, var(--border));border-left:4px solid var(--team-color, var(--border));border-radius:3px;background:var(--team-bg, var(--bg));color:var(--text);font:inherit;display:flex;flex-direction:column;gap:.15rem;transition:background-color .15s ease,border-color .15s ease,opacity .15s ease}.team-slot.is-playable{cursor:pointer}.team-slot.is-playable:hover{background:var(--team-bg-hover, var(--surface-active))}.team-slot:disabled{cursor:default}.team-slot.is-empty{color:var(--muted);background:var(--bg)}.team-slot.is-winner{background:var(--team-bg, var(--surface-active));border-color:var(--team-border, var(--muted));border-left-color:var(--team-color, var(--muted))}.team-slot.is-loser{opacity:.42}.slot-name{font-size:.92rem;font-weight:600}.slot-players{font-size:.78rem;color:var(--muted)}.champion-card{position:relative;width:100%;max-width:190px;border:1px solid var(--team-border, var(--border));border-left:4px solid var(--team-color, var(--border));border-radius:4px;background:var(--team-bg, var(--surface));padding:.85rem;transition:background-color .2s ease,border-color .2s ease}.champion-crown{position:absolute;left:50%;bottom:calc(100% + 8px);width:68px;height:49px;pointer-events:none;opacity:0;transform:translate(-50%,20px) scale(.5);filter:drop-shadow(0 0 12px rgba(246,201,69,.6));animation:champion-crown-rise .54s cubic-bezier(.22,1.32,.36,1) .48s forwards}.champion-crown-svg{display:block;width:100%;height:100%}@keyframes champion-crown-rise{0%{opacity:0;transform:translate(-50%,16px) scale(.55)}60%{opacity:1;transform:translate(-50%,-3px) scale(1.08)}to{opacity:1;transform:translate(-50%) scale(1)}}.champion-name{font-size:1.1rem;font-weight:600;margin-bottom:.25rem}.rules-panel{border:1px solid var(--border);border-radius:4px;background:var(--surface);padding:.85rem 1rem;overflow:hidden;max-height:calc(100vh - 5.25rem);display:flex;flex-direction:column;gap:.65rem}.rules-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-shrink:0}.rules-header .round-title{margin:0}.rules-search{font-size:.82rem;flex-shrink:0}.rules-summary-list{flex:1;min-height:0;overflow-y:auto;padding-right:.2rem;display:flex;flex-direction:column;gap:.4rem}.rule-summary-card{width:100%;text-align:left;padding:.5rem .65rem;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font:inherit;cursor:pointer;display:flex;flex-direction:column;gap:.2rem;transition:background-color .15s ease,border-color .15s ease}.rule-summary-card:hover{background:var(--surface-active);border-color:var(--muted)}.rule-summary-head{display:flex;align-items:center;gap:.45rem}.rule-badge{display:inline-flex;align-items:center;justify-content:center;padding:.08rem .38rem;border-radius:3px;background:#5b8ec929;border:1px solid rgba(91,142,201,.38);color:#6ea8fe;font-size:.72rem;font-weight:600;flex-shrink:0}.rule-badge.is-large{font-size:.82rem;padding:.15rem .5rem}.rule-summary-title{font-size:.88rem;font-weight:600;flex:1}.rule-chevron{color:var(--muted);font-size:1rem;line-height:1}.rule-summary-preview{margin:0;font-size:.78rem;color:var(--muted);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.rules-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;background:#0a0c10b8;display:flex;align-items:center;justify-content:center;padding:1rem}.rules-modal{width:min(640px,100%);max-height:85vh;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--text);display:flex;flex-direction:column;overflow:hidden;box-shadow:0 18px 48px #00000080}.rules-modal-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.9rem 1.1rem;border-bottom:1px solid var(--border)}.rules-modal-title-wrap{display:flex;align-items:center;gap:.55rem}.rules-modal-title{margin:0;font-size:1.1rem;font-weight:600}.rules-modal-close{font-size:.85rem;padding:.2rem .5rem}.rules-modal-body{padding:1.1rem;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem}.rules-modal-desc{margin:0;font-size:.96rem;line-height:1.55;color:var(--text)}.rules-modal-details{margin:0;padding-left:1.25rem;display:flex;flex-direction:column;gap:.45rem;font-size:.9rem;line-height:1.5;color:var(--muted)}.rules-modal-all{gap:1rem}.rules-modal-all-item{padding-bottom:.9rem;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:.4rem}.rules-modal-all-item:last-child{padding-bottom:0;border-bottom:none}.rules-modal-all-title{margin:0;font-size:.98rem;font-weight:600;display:flex;align-items:center;gap:.45rem}.rules-modal-footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.75rem 1.1rem;border-top:1px solid var(--border);background:var(--bg)}.teams-section{max-width:1120px;margin:0 auto}.section-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.section-bar h2{margin:0 0 .2rem;font-size:1.1rem}.section-bar p{margin:0}.teams-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:.85rem}.team-card{border:1px solid var(--border);border-left:4px solid var(--border);border-radius:4px;background:var(--surface);padding:.8rem;display:flex;flex-direction:column;gap:.5rem}.team-card-head{display:flex;align-items:center;justify-content:space-between}.team-meta{font-size:.8rem;color:var(--muted)}.color-picker{display:flex;align-items:center;gap:.35rem;cursor:pointer}.color-picker input{width:26px;height:22px;padding:0;border:1px solid var(--border);background:transparent;cursor:pointer}.input{width:100%;padding:.4rem .55rem;border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--text);font:inherit;font-size:.88rem}.input-name{font-weight:600}.players-inputs{display:flex;flex-direction:column;gap:.35rem}@media(max-width:1024px){.live-layout{grid-template-columns:1fr}.rules-panel{max-height:65vh}}@media(max-width:720px){.bracket-grid{grid-template-columns:1fr}.match-card,.champion-card{max-width:100%}.bracket-connectors{display:none}}
