body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fce4ec;
    color: #333;
    margin: 0;
    padding: 0;
    /* Imagem de fundo gloriosa */
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('https://wallpapercave.com/wp/wp1833139.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

header {
    background: linear-gradient(135deg, #E30613 0%, #B20000 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-bottom: 5px solid #bd040f;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

h1 { margin: 0; font-size: 3em; text-transform: uppercase; letter-spacing: 2px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
h2 { color: #E30613; border-bottom: 3px solid #E30613; padding-bottom: 10px; margin-top: 0; }

nav {
    background-color: #222;
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 20px;
    font-weight: bold;
    font-size: 1.1em;
    text-transform: uppercase;
    transition: color 0.3s;
}

nav a:hover { color: #E30613; }

.container {
    max-width: 900px;
    margin: 30px auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(227, 6, 19, 0.15);
    border-radius: 12px;
}

/* Simulador Avançado */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.standings-table th {
    background-color: #333;
    color: white;
    padding: 12px;
}

.standings-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
    font-size: 1.1em;
}

.standings-table .benfica-row {
    background-color: #ffebee;
    font-weight: bold;
    color: #E30613;
    border-left: 5px solid #E30613;
}

.matches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.team-column {
    flex: 1;
    min-width: 250px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.team-column h3 {
    text-align: center;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
}

.benfica-col { border-top: 5px solid #E30613; }
.sporting-col { border-top: 5px solid #008000; }
.porto-col { border-top: 5px solid #0000FF; }

.match-card {
    background: white;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opponent-name {
    font-size: 0.9em;
    font-weight: bold;
}

.match-select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.calculate-btn {
    display: block;
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #E30613 0%, #B20000 100%);
    color: white;
    border: none;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(227, 6, 19, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.6);
}

.result-area {
    margin-top: 0;
    margin-bottom: 40px;
    padding: 30px;
    background-color: #fff3e0;
    border: 3px solid #ffb74d;
    text-align: center;
    border-radius: 12px;
    animation: popIn 0.5s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.champion-text {
    color: #E30613;
    font-size: 2.5em;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Finanças e Palmares */
.finance-table { width: 100%; border-collapse: collapse; }
.finance-table th { background-color: #333; color: white; padding: 12px; }
.finance-table td { padding: 12px; border-bottom: 1px solid #ddd; text-align: right; }
.positive { color: #2e7d32; font-weight: bold; }
.negative { color: #c62828; font-weight: bold; }


.legends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
    text-align: center;
}

.legend-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.legend-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.legend-card p {
    margin: 0;
    font-weight: bold;
    color: #333;
}

