/* =============================================================
   TeamTycoonNew — Base Styles (Plan A)
   ============================================================= */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #14171c;
    color: #e6e9ed;
    line-height: 1.5;
}

a { color: #6cb4ee; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Header === */
.site-header {
    background: linear-gradient(180deg, #1a1f26 0%, #161b21 100%);
    border-bottom: 1px solid #2a313a;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
    flex-shrink: 0;
}
.brand a {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.brand a:hover { color: #6cb4ee; text-decoration: none; }
.brand .tagline {
    color: #6c747f;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.main-nav {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: nowrap;
}
.main-nav a {
    color: #cdd2da;
    padding: 7px 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.main-nav a:hover {
    background: rgba(108, 180, 238, 0.1);
    color: #fff;
    text-decoration: none;
}
.main-nav a.active {
    background: #2a313a;
    color: #fff;
}
.main-nav a.cta {
    background: #4caf50;
    color: #fff;
    padding: 7px 16px;
    margin: 0 6px;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.25);
}
.main-nav a.cta:hover {
    background: #5cbe5e;
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}
.main-nav a.admin-link { color: #ffb84a; }
.main-nav a.admin-link:hover {
    background: rgba(255, 184, 74, 0.12);
    color: #ffd680;
}
.main-nav a.admin-link.active {
    background: rgba(255, 184, 74, 0.18);
    color: #ffd680;
}
.lang-switch {
    margin-left: 6px;
    padding-left: 12px;
    border-left: 1px solid #2a313a;
    display: flex;
    gap: 2px;
}
.lang-switch a {
    padding: 4px 8px;
    font-size: 12px;
    color: #6c747f;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.lang-switch a.active {
    background: #2a313a;
    color: #fff;
}
.lang-switch a:hover {
    color: #fff;
    text-decoration: none;
}

@media (max-width: 1180px) {
    .brand .tagline { display: none; }
}
@media (max-width: 900px) {
    .main-nav a { padding: 6px 8px; font-size: 13px; }
    .main-nav a.cta { padding: 6px 12px; margin: 0 4px; }
    .site-header .container { gap: 12px; }
}

/* === Main === */
.site-main { padding: 32px 0; min-height: calc(100vh - 160px); }

/* === Footer === */
.site-footer {
    background: #11141a;
    color: #6c747f;
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
}

/* === Forms === */
form.card {
    background: #1c2129;
    padding: 24px;
    border-radius: 6px;
    max-width: 480px;
    margin: 0 auto;
    border: 1px solid #2a313a;
}
form.card h1 { margin-top: 0; }
.field { margin-bottom: 16px; }
.field label {
    display: block;
    margin-bottom: 6px;
    color: #b8bfc9;
    font-size: 14px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    background: #14171c;
    border: 1px solid #2a313a;
    color: #e6e9ed;
    border-radius: 4px;
    font-size: 15px;
}
.field input:focus { outline: none; border-color: #6cb4ee; }
button, .btn {
    background: #4caf50;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
}
button:hover, .btn:hover { background: #5cbe5e; }
button.secondary { background: #3a4250; }
button.secondary:hover { background: #4a5260; }

.error { background: #4a1f1f; border: 1px solid #8c2c2c; color: #ffd9d9; padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; }
.success { background: #1f4a2a; border: 1px solid #2c8c3a; color: #d9ffd9; padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; }

/* === Cards / Sections === */
.section {
    background: #1c2129;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 24px;
    border: 1px solid #2a313a;
}
.section h2 { margin-top: 0; }

/* === Index Hero === */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(180deg, #1c2129 0%, #14171c 100%);
    border-radius: 8px;
    border: 1px solid #2a313a;
}
.hero h1 { font-size: 38px; margin: 0 0 16px; }
.hero p { font-size: 18px; color: #b8bfc9; max-width: 720px; margin: 0 auto 24px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* === Tables (admin) === */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #2a313a;
    text-align: left;
    font-size: 14px;
}
.data-table th { background: #14171c; color: #b8bfc9; font-weight: 600; }
.data-table tr:hover { background: rgba(108, 180, 238, 0.05); }
.status-OK { color: #5cbe5e; }
.status-RUNNING { color: #ffb84a; }
.status-ERROR { color: #ff6b6b; }

/* === Plan B: Stat-Bars / Player-Profile === */
.stat-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.stat-cat h3 { font-size: 14px; color: #8c95a3; text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 8px; }
.stat-row {
    display: grid;
    grid-template-columns: 160px 1fr 40px;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 13px;
}
.stat-label { color: #cdd2da; }
.stat-bar {
    background: #14171c;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #2a313a;
    display: block;
}
.stat-fill {
    height: 100%;
    display: block;
    transition: width 0.4s ease;
}
.stat-val { font-weight: 600; text-align: right; }

/* === Trait Chips === */
.trait-list { display: flex; flex-wrap: wrap; gap: 6px; }
.trait-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    background: #2a313a;
    color: #e6e9ed;
    border: 1px solid #3a4250;
}
.trait-chip.rarity-uncommon { border-color: #5cbe5e; color: #b8e6b8; }
.trait-chip.rarity-rare { border-color: #6cb4ee; color: #b8d8f0; }
.trait-chip.rarity-legendary { border-color: #b069ff; color: #d8b8ff; box-shadow: 0 0 6px rgba(176,105,255,0.4); }

/* === Hero-Pool / Hero-Cards === */
.hero-pool, .hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.hero-pool-card, .hero-card {
    display: block;
    background: #14171c;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #2a313a;
    color: #e6e9ed;
    transition: border-color 0.2s;
}
.hero-pool-card:hover, .hero-card:hover { border-color: #6cb4ee; text-decoration: none; }
.hero-pool-name, .hero-card-name { font-weight: 600; margin-bottom: 4px; }
.hero-pool-role, .hero-card-role { color: #8c95a3; font-size: 12px; margin-bottom: 8px; }
.hero-card-diff { color: #ffc94a; font-size: 12px; }
.hero-pool-mastery { display: grid; grid-template-columns: 1fr 40px; gap: 8px; align-items: center; }

/* === Hero-Detail Skills === */
.skill-row { display: grid; grid-template-columns: 50px 1fr; gap: 12px; margin-bottom: 16px; padding: 12px; background: #14171c; border-radius: 6px; border: 1px solid #2a313a; }
.skill-slot { font-size: 24px; font-weight: 700; color: #ffc94a; text-align: center; padding: 6px 0; background: #1a1f26; border-radius: 4px; }
.skill-name { font-weight: 600; margin-bottom: 4px; }
.skill-desc { color: #cdd2da; font-size: 14px; margin-bottom: 6px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.skill-tags .tag { background: #2a313a; padding: 2px 8px; border-radius: 10px; font-size: 11px; color: #8c95a3; }

/* === Plan E: Live-Feed-Events === */
.feed-row {
    padding: 8px 12px;
    border-bottom: 1px solid #2a313a;
    display: grid;
    grid-template-columns: 70px 24px 1fr;
    gap: 8px;
    align-items: center;
    font-size: 14px;
}
.feed-row .feed-tick { color: #6c747f; font-size: 12px; font-family: monospace; }
.feed-row .feed-icon { font-size: 16px; text-align: center; }
.feed-row .feed-text { color: #cdd2da; }

/* Default-Farben pro Event-Typ */
.feed-row.ev-KILL { background: rgba(255, 107, 107, 0.10); border-left: 3px solid #ff6b6b; }
.feed-row.ev-KILL .feed-text { color: #ffd9d9; }

.feed-row.ev-FIRST_BLOOD,
.feed-row.ev-DOUBLE_KILL,
.feed-row.ev-TRIPLE_KILL,
.feed-row.ev-ULTRA_KILL,
.feed-row.ev-RAMPAGE {
    background: rgba(255, 107, 107, 0.20);
    border-left: 4px solid #ff4444;
    font-weight: 600;
    font-size: 15px;
    padding-top: 12px; padding-bottom: 12px;
}
.feed-row.ev-FIRST_BLOOD .feed-text { color: #ffaaaa; text-shadow: 0 0 4px rgba(255,107,107,0.5); }
.feed-row.ev-RAMPAGE .feed-text { color: #ff8855; text-shadow: 0 0 6px rgba(255,136,85,0.6); }

/* Killstreaks (Kills ohne Death dazwischen) — andere Farbsprache als Multi-Kills */
.feed-row.ev-KILLING_SPREE,
.feed-row.ev-DOMINATING {
    background: rgba(255, 184, 74, 0.14);
    border-left: 3px solid #ffb84a;
    font-weight: 600;
}
.feed-row.ev-KILLING_SPREE .feed-text,
.feed-row.ev-DOMINATING .feed-text { color: #ffd9a3; }

.feed-row.ev-MEGA_KILL_STREAK,
.feed-row.ev-UNSTOPPABLE {
    background: rgba(255, 201, 74, 0.20);
    border-left: 4px solid #ffc94a;
    font-weight: 700;
    font-size: 15px;
}
.feed-row.ev-MEGA_KILL_STREAK .feed-text,
.feed-row.ev-UNSTOPPABLE .feed-text { color: #ffe1a3; }

.feed-row.ev-WICKED_SICK,
.feed-row.ev-MONSTER_KILL {
    background: rgba(176, 105, 255, 0.18);
    border-left: 4px solid #b069ff;
    font-weight: 700;
    font-size: 15px;
}
.feed-row.ev-WICKED_SICK .feed-text,
.feed-row.ev-MONSTER_KILL .feed-text { color: #d8b8ff; }

.feed-row.ev-GODLIKE,
.feed-row.ev-BEYOND_GODLIKE {
    background: linear-gradient(90deg, rgba(255, 201, 74, 0.25), rgba(176, 105, 255, 0.25));
    border-left: 4px solid #ffc94a;
    font-weight: 800;
    font-size: 16px;
    padding-top: 14px; padding-bottom: 14px;
}
.feed-row.ev-GODLIKE .feed-text,
.feed-row.ev-BEYOND_GODLIKE .feed-text {
    color: #ffe1a3;
    text-shadow: 0 0 8px rgba(255,201,74,0.6);
}

.feed-row.ev-STREAK_ENDED {
    background: rgba(108, 180, 238, 0.10);
    border-left: 3px solid #6cb4ee;
    font-style: italic;
}
.feed-row.ev-STREAK_ENDED .feed-text { color: #b8d8f0; }

.feed-row.ev-TOWER_DESTROY,
.feed-row.ev-BARRACK_DESTROY {
    background: rgba(255, 201, 74, 0.12);
    border-left: 3px solid #ffc94a;
}
.feed-row.ev-TOWER_DESTROY .feed-text { color: #ffe1a3; font-weight: 600; }

.feed-row.ev-ROSHAN_KILL,
.feed-row.ev-AEGIS_PICKUP,
.feed-row.ev-AEGIS_USE {
    background: rgba(176, 105, 255, 0.12);
    border-left: 3px solid #b069ff;
}
.feed-row.ev-ROSHAN_KILL .feed-text { color: #d8b8ff; font-weight: 600; }

.feed-row.ev-LEVEL_UP {
    border-left: 3px solid #6cb4ee;
}
.feed-row.ev-LEVEL_UP .feed-text { color: #b8d8f0; }

.feed-row.ev-LH_MILESTONE { border-left: 3px solid #5cbe5e; }
.feed-row.ev-LH_MILESTONE .feed-text { color: #b8e6b8; }

.feed-row.ev-GANK_SUCCESS { border-left: 3px solid #ffb84a; }
.feed-row.ev-GANK_SUCCESS .feed-text { color: #ffd9a3; }

.feed-row.ev-GANK_FAIL,
.feed-row.ev-WARD_PLACED {
    color: #6c747f;
    opacity: 0.8;
    font-size: 13px;
}
.feed-row.ev-WARD_PLACED .feed-text { color: #8c95a3; }
.feed-row.ev-GANK_FAIL .feed-text { color: #8c95a3; }

.feed-row.ev-SURRENDER,
.feed-row.ev-SURRENDER_VOTE,
.feed-row.ev-THRONE_DESTROY,
.feed-row.ev-TIME_CAP {
    background: rgba(176, 105, 255, 0.20);
    border-left: 4px solid #b069ff;
    font-weight: 700;
    font-size: 15px;
}

.feed-row.ev-CALL_DISOBEYED {
    background: rgba(255, 184, 74, 0.10);
    border-left: 3px solid #ffb84a;
    font-style: italic;
}
.feed-row.ev-CALL_DISOBEYED .feed-text { color: #ffd9a3; }

/* === Team-Indikator (Home = grün-Akzent, Away = rot-Akzent) === */
/* Dünner farbiger Balken am rechten Rand, signalisiert "wer hat den Event ausgelöst".
   Wirkt zusätzlich zum Event-Typ-Border-Left, damit man Multi-Kill-Rot etc. nicht überschreibt. */
.feed-row.team-home {
    border-right: 4px solid #5cbe5e;
    box-shadow: inset -4px 0 0 -2px rgba(92, 190, 94, 0.18);
}
.feed-row.team-away {
    border-right: 4px solid #ff6b6b;
    box-shadow: inset -4px 0 0 -2px rgba(255, 107, 107, 0.18);
}

/* Bei "neutralen" Events (kein farbiger Border-Left aus event-type), zusätzlich Hintergrund-Tint */
.feed-row.team-home.ev-LH_MILESTONE,
.feed-row.team-home.ev-LEVEL_UP,
.feed-row.team-home.ev-WARD_PLACED,
.feed-row.team-home.ev-GANK_FAIL { background: rgba(92, 190, 94, 0.06); }
.feed-row.team-away.ev-LH_MILESTONE,
.feed-row.team-away.ev-LEVEL_UP,
.feed-row.team-away.ev-WARD_PLACED,
.feed-row.team-away.ev-GANK_FAIL { background: rgba(255, 107, 107, 0.06); }

/* === Plan F: Live-Match Frontend === */
.ml-fade-in { animation: ml-fade-in 0.4s ease; }
@keyframes ml-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ml-scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto 24px;
}

.ml-num-gold { transition: color 0.3s; font-variant-numeric: tabular-nums; }

.ml-active-call {
    padding: 6px 10px;
    margin-bottom: 6px;
    background: #14171c;
    border-left: 3px solid #ffc94a;
    border-radius: 4px;
    font-size: 13px;
}
.ml-call-team { border-left-color: #6cb4ee; }
.ml-call-player { border-left-color: #b069ff; }

.ml-call-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
}
.ml-call-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.ml-call-group {
    background: #14171c;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #2a313a;
}
.ml-call-group-title {
    font-size: 12px;
    color: #8c95a3;
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 600;
}
.ml-call-group button {
    margin: 2px;
    padding: 4px 10px;
    font-size: 13px;
}

.ml-player-link { color: #6cb4ee; text-decoration: underline; }
.ml-player-link:hover { color: #ffc94a; }

/* === Plan F: Live-Minimap === */
#ml-minimap-container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}
#ml-minimap {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #2a313a;
    display: block;
}
.mm-base { stroke: #4a525a; stroke-width: 2; }
.mm-base-home { fill: #1a3a1f; stroke: #5cbe5e; }
.mm-base-away { fill: #3a1a1f; stroke: #ff6b6b; }
.mm-roshan { stroke: #b069ff; stroke-width: 2; opacity: 0.85; }
/* Tower auf der Minimap: kleine Squares, gedeckt eingefärbt; "dead" = stark transparent + grau */
.mm-tower {
    stroke: #0a0d12;
    stroke-width: 1;
    transition: opacity 0.4s, fill 0.4s;
}
.mm-tower-home { fill: #5cbe5e; }
.mm-tower-away { fill: #ff6b6b; }
.mm-tower-dead { fill: #3a4250; opacity: 0.4; stroke-dasharray: 2 2; }
.mm-dot { transition: transform 0.7s ease; }
.mm-dot.mm-dead { opacity: 0.35; }
.mm-dot circle { filter: drop-shadow(0 0 3px rgba(0,0,0,0.5)); }
#ml-minimap-legend {
    margin-top: 8px;
    font-size: 12px;
    color: #8c95a3;
    text-align: center;
}
