/* ===== Reset & Base ===== */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  background: transparent;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #f0e6d2;
  padding: 60px;
}
#mainframe { display:flex; gap:8px; height:600px; width:1500px; }

/* ===== Layout halves ===== */
.half { flex:1; position:relative; overflow:hidden; }
.panel {
  position:absolute; inset:0; opacity:0; transition:opacity .35s ease-in-out;
  display:flex; justify-content:center; align-items:center;
}
.panel.active { opacity:1; }

/* ===== Left side ===== */
.left { display:flex; justify-content:flex-end; align-items:center; }
.half.left .panel { justify-content:flex-end; align-items:center; padding-right:12px; }

.summoner-box { display:flex; flex-direction:column; align-items:center; text-align:center; gap:18px; }
.summoner-icon { width:192px; height:192px; border-radius:50%; border:9px solid #c8aa6e; object-fit:cover; }
.summoner-text { display:flex; flex-direction:column; align-items:center; gap:4px; }
.summoner-name {
  font-size:48px; font-weight:600; color:#f0e6d2; line-height:1.2;
  text-shadow:0 6px 12px #000, 0 0 6px #000;
}
.summoner-region {
  font-size:36px; color:#c8aa6e; font-weight:600;
  text-shadow:0 3px 18px #000, 0 0 6px #000;
}

/* ===== Rank card (left, slide 2) ===== */
.rank-card { display:flex; align-items:center; justify-content:flex-start; gap:16px; width:100%; height:100%; }
.rank-col { display:flex; flex-direction:column; align-items:center; gap:6px; margin-top:-6px; }
.rank-emblem {
  width:250px; height:250px; object-fit:contain;
  filter:drop-shadow(0 6px 18px rgba(0,0,0,.35));
  animation: floatY 3.8s ease-in-out infinite;
}
.rank-text { display:grid; gap:10px; text-align:left; text-shadow:0 6px 12px #000, 0 0 6px #000; }
.rank-text-center { text-align:center; }
#rank-tier { font-size:48px; font-weight:700; color:#f0e6d2; text-shadow:0 6px 12px #000, 0 0 6px #000; }
.rank-line { display:flex; align-items:baseline; justify-content:center; gap:12px; }
#lp { font-size:36px; font-weight:700; color:#c8aa6e; text-shadow:0 6px 12px #000, 0 0 6px #000; }
.wl { font-size:32px; color:#9ec5ff; text-shadow:0 6px 12px #000, 0 0 6px #000; }
#wins { color:#5fd1ff; } #losses { color:#ffb057; } #winrate { color:#c8aa6e; }

/* ===== Right side ===== */
.half.right { display:flex; justify-content:flex-start; align-items:center; }
.half.right .panel { justify-content:flex-start; align-items:center; padding-left:12px; }

/* ===== Live Panel ===== */
.live-wrap { position:relative; width:600px; height:260px; border-radius:12px; overflow:hidden; animation:slideInFromRight .6s ease-out; }
.live-champ-splash {
  position:absolute; width:200%; height:200%; bottom:0; left:0; transform:translate(-50%, 50%);
  object-fit:cover; object-position:center center;
  -webkit-mask-image: radial-gradient(ellipse 120% 120% at 0% 100%, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 35%, rgba(0,0,0,.95) 50%, rgba(0,0,0,.85) 65%, rgba(0,0,0,.6) 78%, rgba(0,0,0,.3) 88%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(ellipse 120% 120% at 0% 100%, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 35%, rgba(0,0,0,.95) 50%, rgba(0,0,0,.85) 65%, rgba(0,0,0,.6) 78%, rgba(0,0,0,.3) 88%, rgba(0,0,0,0) 100%);
}
.live-overlay { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:space-between; padding:14px; z-index:10; }
.live-header { display:flex; flex-direction:column; gap:6px; }
.live-indicator { color:#ff4444; font-size:14px; font-weight:700; text-shadow:0 4px 12px rgba(0,0,0,.8); animation:pulse 2s infinite; }
.live-info { display:flex; flex-direction:column; gap:2px; }
#live-mode, #live-timer, #live-avg-elo { color:#fff; font-size:22px; font-weight:600; text-shadow:0 4px 12px rgba(0,0,0,.9); line-height:1.3; }
#live-timer { font-size:26px; font-weight:700; }
.live-stats { display:flex; flex-direction:column; gap:2px; align-self:flex-start; text-align:left; }
#live-champ-name { font-size:28px; font-weight:700; color:#fff; text-shadow:0 6px 15px rgba(0,0,0,.9); margin-bottom:2px; }
#live-winrate, #live-kda { font-size:22px; font-weight:600; color:#fff; text-shadow:0 4px 12px rgba(0,0,0,.9); line-height:1.3; }

/* ===== Animations ===== */
@keyframes pulse { 0%{opacity:1} 50%{opacity:.7} 100%{opacity:1} }
@keyframes slideInFromRight { 0%{opacity:0; transform:translateX(30px)} 100%{opacity:1; transform:translateX(0)} }
@keyframes floatY { 0%{transform:translateY(0)} 50%{transform:translateY(-10px)} 100%{transform:translateY(0)} }

/* ===== Match History (Splash-Kacheln) ===== */
/* Fix: explizite Breite setzen, damit die Kacheln nicht als schmale Pillen erscheinen */
#panel-right-history { padding:8px; box-sizing:border-box; width:640px; }
.history-list { display:flex; flex-direction:column; gap:12px; width:640px; }
.history-item {
  position:relative; width:640px; height:120px; border-radius:12px; overflow:hidden;
  background-size:cover; background-position:center 10%; background-repeat:no-repeat;
  box-shadow:0 8px 18px rgba(0,0,0,.6); flex-shrink:0;
}
.history-item .overlay {
  position:absolute; inset:0;
  background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,.3));
}
.history-item .info {
  position:absolute; bottom:40px; left:16px; right:16px;
  color:#f5e6c0; text-shadow:0 0 6px #000; z-index:2;
  display:flex; flex-direction:column; gap:2px;
}
.history-item .champ { font-weight:700; font-size:18px; }
.history-item .meta, .history-item .kda { font-size:13px; opacity:.95; }
.history-item .kda.win {
  color: #7dff7a; /* weiches Grün für Wins */
  font-weight: 700;
}

.history-item .kda.loss {
  color: #ff6b6b; /* leichtes Rot für Losses */
  font-weight: 700;
}
.history-item .items {
  position:absolute; bottom:8px; left:12px; right:12px;
  display:flex; gap:6px; z-index:2;
}
.hist-item { width:28px; height:28px; border-radius:4px; box-shadow:0 2px 6px rgba(0,0,0,.6); }

/* Empty state */
.history-empty {
  color:#ddd; padding:14px; width:640px;
  background: rgba(0,0,0,.2); border-radius:8px; text-align:center;
}

/* Responsive */
@media (max-width:480px) {
  #panel-right-history, .history-list, .history-item, .history-empty { width:100%; }
  .history-item { height:90px; }
  .history-item .champ { font-size:14px; }
  .history-item .meta, .history-item .kda { font-size:11px; }
}
