:root {
    --bg1: #1a0f3b;
    --bg2: #2b0f4a;
    --bg3: #0b0e1a;
    --text: #f4f6ff;
    --muted: #c7c9d9;
    --accent: #ff4fd8;
    --accent2: #4fd8ff;
    --panel: rgba(255,255,255,0.10);
    --radius: 20px;
    --font: "Segoe UI", system-ui, sans-serif;
}

/* HEADER */
header {
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

header nav a {
    margin-left: 24px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    opacity: 0.85;
}

/* BODY */
body {
    margin: 0;
    font-family: var(--font);
    background: radial-gradient(circle at top, #ff4fd8 0%, #7a3bd1 40%, #0b0e1a 100%);
    color: var(--text);
    min-height: 100vh;
    padding: 40px 20px;
}

h1 {
    text-align: center;
    font-size: 48px;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 900;
}

/* PANEL TOP 15 */
.top15-panel {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.12);
    max-width: 900px;
    margin: 0 auto;
}

.top15-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    -webkit-background-clip: text;
    color: transparent;
}

.top15-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.top15-controls button {
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    background: rgba(255,255,255,0.15);
    color: white;
}

.top15-controls .active {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #0b0e1a;
}

/* LISTA EDITABLE */
.top15-list.vertical {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.top15-list.horizontal {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1.2fr;
    gap: 18px;
}

.top15-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    background: rgba(255,255,255,0.10);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.18);
    cursor: grab;
    transition: 0.15s;
}

.top15-item:hover {
    background: rgba(255,255,255,0.18);
}

.top15-flag {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(0,0,0,0.35);
    flex-shrink: 0;
}

.top15-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top15-text {
    flex: 1;
    min-width: 0;
}

.top15-name {
    font-size: 16px;
    font-weight: 700;
}

.info-extra {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.top15-position {
    margin-left: 12px;
    font-size: 20px;
    font-weight: 900;
    opacity: 0.7;
    white-space: nowrap;
    flex-shrink: 0;
}

/* TARJETA FINAL */
#finalCard {
    margin: 60px auto 0;
    max-width: 1200px;
    padding: 32px;
    border-radius: 32px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,79,216,0.35), transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(79,216,255,0.35), transparent 60%),
        linear-gradient(145deg, #120b24, #1c0f3f 55%, #2b0f4a 100%);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 20px 40px rgba(0,0,0,0.45);
    display: none;
    position: relative;
}

.final-year {
    position: absolute;
    top: 14px;
    left: 20px;
    font-size: 60px;
    font-weight: 900;
    opacity: 0.12;
    letter-spacing: -3px;
}

.final-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
}

.final-list.vertical {
    display: flex;
    gap: 18px;
}

.final-list.horizontal {
    display: flex;
    gap: 18px;
}

.final-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.final-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: rgba(255,255,255,0.10);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.18);
}

.final-flag {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.final-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.final-text {
    flex: 1;
    min-width: 0;
}

.final-name {
    font-size: 15px;
    font-weight: 700;
}

.final-extra {
    font-size: 12px;
    color: var(--muted);
}

.final-position {
    margin-left: 12px;
    font-size: 18px;
    font-weight: 900;
    opacity: 0.7;
    white-space: nowrap;
    flex-shrink: 0;
}

.final-credit {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    opacity: 0.6;
}

/* === GLOBAL FOOTER === */

.global-footer {
  margin-top: 40px;
  padding: 18px 24px;
  background: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #f5f5ff;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

.footer-right {
  display: flex;
  gap: 14px;
}

.footer-link {
  font-size: 14px;
  color: #4fd8ff;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(79, 216, 255, 0.4);
  background: rgba(10, 15, 35, 0.6);
  transition: 0.2s ease;
}

.footer-link:hover {
  background: rgba(79, 216, 255, 0.15);
  box-shadow: 0 0 10px rgba(79, 216, 255, 0.5);
  transform: translateY(-1px);
}
