/* Reset and basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 50px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Header Styling */
h1, h2 {
    text-align: center;
    color: #333;
}

/* Form and button styling */
form, .character-list, .game-form {
    margin-top: 20px;
}

form input, .dropdown, .btn {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Main button styles */
.btn {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

/* Character Card Styling */
.character-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.character-card {
    background: #007bff;
    color: white;
    padding: 10px;
    border-radius: 8px;
    flex: 1 1 200px;
    text-align: center;
    transition: transform 0.2s ease;
}

.character-card:hover {
    transform: scale(1.05);
}

.character-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.character-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.character-card p {
    font-size: 1rem;
}

/* Success and Error Messages */
.success {
    color: green;
    text-align: center;
}

.error {
    color: red;
    text-align: center;
}

/* Battle Log Styling */
.battle-log {
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    animation: fadeIn 0.5s ease-in-out;
    margin-bottom: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Battle Results Styling */
.battle-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.vs {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin: 0 20px;
}

.character-info {
    font-size: 1.2rem;
    color: #555;
}

/* Final Battle Result */
.result {
    margin-top: 20px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #007bff;
    text-align: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .character-list {
        flex-direction: column;
    }

    .character-card {
        flex: 1 1 100%;
        margin-bottom: 20px;
    }

    .vs {
        font-size: 1.5rem;
        margin: 15px 0;
    }
}
