*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: sans-serif; background-color: #000000; padding: 20px;
    line-height: 1.5; color: #ffffff;
}
.main-content-wrapper {
    max-width: 1200px; margin: 0 auto; background-color: #1a1a1a;
    padding: 0 15px 15px 15px; border-radius: 8px; overflow: hidden; border: 1px solid #444;
}
.banner-image { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 5px; }
.banner-top { margin-bottom: 20px; }
.banner-bottom { margin-top: 30px; }
#adventure-title { text-align: center; margin-bottom: 20px; color: #ffffff; padding-top: 0; margin-top: 20px; font-size: 2em; }
#game-container {
    background-color: #222222; padding: 20px; border-radius: 8px;
    width: 100%; max-width: 900px; margin: 20px auto; text-align: center; border: 1px solid #555555;
}
#round-title { text-align: center; margin-bottom: 15px; font-size: 1.6em; color: #e0e0e0; font-weight: bold; }
#story-text-area { margin-bottom: 20px; }
#story-text {
    font-size: 1.1em; line-height: 1.6; color: #dddddd;
    background-color: #2c2c2c; padding: 15px; border-radius: 5px; text-align: center; min-height: 50px;
}
.cards-display-area {
    display: flex; justify-content: space-around; align-items: flex-start;
    gap: 20px; margin-bottom: 20px; flex-wrap: wrap;
}
.fighter-card {
    background-color: #333333; border: 2px solid #555555; border-radius: 8px;
    padding: 15px; width: 100%; max-width: 350px; text-align: center;
    display: flex; flex-direction: column;
}
.fighter-card img {
    max-width: 100%;
    height: 280px;
    object-fit: contain; border-radius: 4px;
    background-color: #111; margin-bottom: 10px;
}
.fighter-card h3.card-title {
    font-size: 1.3em;
    color: #ffffff;
    margin-bottom: 10px;
    min-height: 2.6em;
}
.fighter-card .profile-text {
    font-size: 0.8em; color: #b0b0b0; text-align: left;
    max-height: 100px; overflow-y: auto; margin-bottom: 10px;
    padding: 5px; border-top: 1px solid #444; border-bottom: 1px solid #444;
    background-color: #2a2a2a; line-height: 1.4;
}
.fighter-card .profile-text::-webkit-scrollbar { width: 6px; }
.fighter-card .profile-text::-webkit-scrollbar-track { background: #2a2a2a; }
.fighter-card .profile-text::-webkit-scrollbar-thumb { background-color: #555; border-radius: 3px; }

.stats-list { list-style-type: none; padding: 0; margin-top: 10px; text-align: left; }
.stats-list li {
    display: flex; justify-content: space-between; padding: 5px 8px;
    margin-bottom: 3px; background-color: #252525; border-radius: 3px; font-size: 0.95em;
}
.stats-list .stat-name { color: #cccccc; text-align: left; padding-right: 10px; flex-grow: 1; }
.stats-list .stat-value { font-weight: bold; color: #ffffff; text-align: right; min-width: 30px; }

.stats-list button.stat-choice-button {
    width: 100%;
    text-align: left;
    background-color: #cc0000;
    color: #000000;
    border: 1px solid #990000;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 5px 8px;
    font-size: 1em;
    font-weight: bold;
}
.stats-list button.stat-choice-button:hover {
    background-color: #aa0000;
    color: #000000;
}
.stats-list button.stat-choice-button:disabled {
    background-color: #770000;
    color: #330000;
    border-color: #550000;
    cursor: not-allowed;
    opacity: 0.7;
}

#opponent-card .stats-list.hidden-stats li .stat-value {
    background-color: #444; color: #444; user-select: none;
}
#opponent-card .stats-list.hidden-stats li .stat-value::before { content: "?"; color: #888; }
#options-container button {
    padding: 12px 25px; margin: 8px 5px; font-size: 1.1em; font-weight: bold;
    color: #000000; background-color: #ffffff; border: 1px solid #333;
    border-radius: 5px; cursor: pointer; transition: background-color 0.2s ease;
}
#options-container button:hover { background-color: #e0e0e0; }
.result-message { font-size: 1.25em; font-weight: bold; margin: 20px 0; padding: 10px; border-radius: 5px; }
.win-message { color: #111; background-color: #5cb85c; }
.lose-message { color: #fff; background-color: #d9534f; }
.end-message { color: #111; background-color: #f0ad4e; }

/* Video Player Overlay Styles */
#video-player-overlay {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85); /* Semi-transparent black background */
    z-index: 1000; /* Ensure it's on top of other content */
    justify-content: center; /* Horizontally center */
    align-items: center; /* Vertically center */
    flex-direction: column; /* Stack video and button vertically */
    padding: 20px;
    box-sizing: border-box;
}
#round-win-video {
    max-width: 80vw; /* Max width relative to viewport width */
    max-height: 80vh; /* Max height relative to viewport height */
    border: 3px solid #cc0000; /* Red border, consistent with theme */
    background-color: #000; /* Background for video area */
    margin-bottom: 15px; /* Space between video and button */
}
#close-video-button {
    padding: 10px 20px;
    font-size: 1.1em;
    font-weight: bold;
    background-color: #ffffff; /* White button for contrast */
    color: #000000;
    border: 1px solid #333;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#close-video-button:hover {
    background-color: #e0e0e0;
}


@media (max-width: 767px) {
    body { padding: 10px; }
    .main-content-wrapper { padding: 0 5px 5px 5px; }
    #adventure-title { font-size: 1.6em; }
    #game-container { padding: 15px; }
    .cards-display-area { flex-direction: column; align-items: center; }
    .fighter-card { max-width: 90%; margin-bottom: 15px;}
    .fighter-card img {
        height: 250px;
    }
    .fighter-card .profile-text { max-height: 80px; font-size: 0.75em;}
    #round-title { font-size: 1.4em; }
    #story-text { font-size: 1em; }
    #options-container button { width: calc(100% - 10px); }

    #round-win-video {
        max-width: 90vw;
        max-height: 70vh;
    }
    #close-video-button {
        font-size: 1em;
        padding: 8px 15px;
    }
}