* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #15151e;
    color: white;
    font-family: 'Rajdhani', sans-serif;
    text-align: center;
    background-image: url('https://media.formula1.com/image/upload/v1677244984/fom-website/2023/Miscellaneous/texture-carbon.png');
    background-attachment: fixed;
    padding-top: 60px;
    min-height: 100vh;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    margin-bottom: 50px;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border-bottom: 4px solid #e10600;
    display: inline-block;
    padding-bottom: 15px;
}

.arene {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.card {
    background: #1f1f1f;
    width: 320px;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #333;
    border-top: 3px solid #e10600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s;
    position: relative;
}

.pilote {
    border-top: 3px solid #4CAF50;
}

.pilote2 {
    border-top: 3px solid #e10600;
}

.numero {
    position: absolute;
    top: 15px;
    right: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    z-index: 1;
    line-height: 1;
}

.card h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    padding-right: 50px;
    line-height: 1;
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.card p {
    font-size: 1.1rem;
    margin: 8px 0;
    font-weight: 600;
}

.vs {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: #e10600;
    text-shadow: 0 0 20px rgba(225, 6, 0, 0.5);
    align-self: center;
    letter-spacing: 5px;
}

.barre-vie {
    width: 100%;
    height: 25px;
    background-color: #15151e;
    border-radius: 6px;
    margin: 15px 0;
    overflow: hidden;
    border: 1px solid #333;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.barre {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

.joueur {
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
}

.adversaire {
    background: linear-gradient(90deg, #e10600 0%, #ff1744 100%);
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.6);
}

.btn-attaquer {
    display: inline-block;
    margin-top: 30px;
    margin-bottom: 50px;
    padding: 18px 50px;
    background-color: #e10600;
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 8px;
    border: 2px solid #e10600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(225, 6, 0, 0.4);
    transition: all 0.3s;
}

.btn-attaquer:hover {
    background-color: transparent;
    border-color: #e10600;
    color: #e10600;
    box-shadow: 0 6px 25px rgba(225, 6, 0, 0.6);
}

.historique-combat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    max-height: 350px;
    background: rgba(31, 31, 31, 0.95);
    border: 2px solid #e10600;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.historique-combat::-webkit-scrollbar {
    width: 5px;
}

.historique-combat::-webkit-scrollbar-track {
    background: #15151e;
    border-radius: 10px;
    margin: 4px 0;
}

.historique-combat::-webkit-scrollbar-thumb {
    background: #e10600;
    border-radius: 10px;
}

.historique-combat::-webkit-scrollbar-thumb:hover {
    background: #ff0800;
}

.historique-combat .message {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

.historique-combat .message:nth-child(even) {
    background: rgba(0, 255, 0, 0.15);
    border-left-color: #00ff00;
    color: #66ff66;
    margin-bottom: 20px;
}

.historique-combat .message:nth-child(odd) {
    background: rgba(225, 6, 0, 0.15);
    border-left-color: #e10600;
    color: #ff6666;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out forwards;
}

.popup {
    background: linear-gradient(135deg, #1f1f1f 0%, #15151e 100%);
    border: 3px solid #e10600;
    border-radius: 15px;
    padding: 50px 70px;
    text-align: center;
    box-shadow: 0 10px 50px rgba(225, 6, 0, 0.7);
    animation: popIn 0.4s ease-out forwards;
    max-width: 600px;
}

.popup h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: #e10600;
    text-transform: uppercase;
    margin-bottom: 30px;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(225, 6, 0, 0.8);
}

.popup .gagnant {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-accueil {
    padding: 18px 50px;
    background-color: #e10600;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #e10600;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(225, 6, 0, 0.4);
    transition: all 0.3s;
}

.btn-accueil:hover {
    background-color: transparent;
    border-color: #e10600;
    color: #e10600;
    box-shadow: 0 6px 25px rgba(225, 6, 0, 0.6);
}