/* --- Basic Reset & Body Styles --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: sans-serif;
    background-color: #000000; /* Black background */
    padding: 20px;
    line-height: 1.5;
    color: #ffffff; /* White text */
    text-align: center;
}
body.lightbox-open { overflow: hidden; } /* Prevent background scroll when lightbox open */

/* --- Main Content Wrapper --- */
.main-content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #444;
}

/* --- Banner Styles --- */
.banner-image { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 5px; margin: 0 auto 20px auto; }
#top-banner { max-width: 1000px; }
.banner-bottom { margin-top: 30px; max-width: 1000px;}

/* --- General Typography --- */
h1 { text-align: center; margin-bottom: 10px; color: #ffffff; font-size: 1.8em; }
h2 { text-align: center; margin-bottom: 15px; color: #e0e0e0; font-size: 1.3em; }
h3 { font-size: 1.1em; color: #e0e0e0; margin-bottom: 10px; }
p { margin-bottom: 15px; color: #cccccc; }

/* --- Section Styling --- */
section {
    border: 1px solid #555555;
    background-color: #222222;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 6px;
    text-align: center;
}

/* --- How to Play Section --- */
.how-to-play {
    background-color: #252525;
    border: 1px dashed #666;
    text-align: left;
    padding: 15px 25px;
    margin: 20px 0 25px 0;
}
.how-to-play h3 { text-align: center; border-bottom: 1px solid #555; padding-bottom: 5px; }
.how-to-play ul { list-style: none; padding-left: 0; }
.how-to-play li { margin-bottom: 10px; padding-left: 1.5em; position: relative; color: #ccc; font-size: 0.95em; }
.how-to-play li::before { content: "▶"; position: absolute; left: 0; top: 1px; color: #ffffff; font-size: 0.8em; }

/* --- Input and Label Styles --- */
#player-names label { display: block; margin-bottom: 8px; color: #dddddd; }
#player-names input[type="text"] { padding: 8px; margin-left: 5px; border-radius: 4px; border: 1px solid #555; background-color: #333; color: #fff; width: calc(100% - 70px); max-width: 300px;}
#round-slider { max-width: 500px; width: 80%; cursor: pointer; }
#round-count { color: #e0e0e0; margin-top: 5px; font-weight: bold; }

/* --- Button Styling --- */
button {
    display: inline-block; padding: 10px 20px; font-size: 0.9em; font-weight: bold;
    color: #000000; background-color: #ffffff; border: 1px solid #333; border-radius: 5px;
    cursor: pointer; text-decoration: none; transition: background-color 0.2s ease, border-color 0.2s ease;
    text-align: center; margin: 5px; text-transform: uppercase; vertical-align: middle;
}
button:hover { background-color: #e0e0e0; border-color: #555; color: #000000; }
button:disabled { background-color: #cccccc; color: #777777; border-color: #aaaaaa; cursor: default; opacity: 0.7;}

/* Player Win Buttons - Bigger */
#player-buttons button {
    background-color: #4CAF50; color: white; border-color: #388E3C;
    font-size: 1.1em; padding: 12px 24px; min-width: 120px;
}
#player-buttons button:hover:enabled { background-color: #66BB6A; border-color: #4CAF50; }

#footer-buttons button { font-size: 1em; padding: 12px 24px; }
#footer-buttons { margin-top: 20px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }

/* --- Scoreboard Specific Styles --- */
#section-divider { margin: 30px auto; width: 80%; border-color: #444; border-style: dashed;}
#scoreboard { background-color: #2a2a2a; padding: 20px; border-radius: 8px; }
#round-number-display { font-size: 1.6em; font-weight: bold; margin-bottom: 10px; color: #fff; }
#winner-label { font-size: 1.1em; margin-bottom: 15px; color: #ccc;}
#player-buttons { margin-bottom: 20px; }
#score-display h2 { font-size: 1.2em; margin-bottom: 10px; color: #fff; border-bottom: 1px solid #555; padding-bottom: 5px;}
#score-display p { font-size: 1.1em; color: #e0e0e0; margin-bottom: 5px; font-weight: bold; text-align: left; padding-left: 20px; }
#winner-display { font-size: 1.8em; font-weight: bold; color: #4CAF50; text-transform: uppercase; margin-top: 20px; padding: 10px; background-color: #333; border-radius: 5px; border: 1px solid #4CAF50; }

/* --- Points Lightbox Styles --- */
.points-lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.92);
    display: none; justify-content: center; align-items: center; z-index: 1000; padding: 15px;
    opacity: 0; transition: opacity 0.3s ease;
}
.points-lightbox-overlay.show { display: flex; opacity: 1; }
.points-lightbox-content {
    position: relative; background-color: #1a1a1a; padding: 15px; border-radius: 5px;
    max-width: 95vw; max-height: 95vh; display: flex; flex-direction: column; align-items: center; border: 1px solid #555;
}
.points-lightbox-image {
    display: block; width: auto; max-width: 100%; height: auto; max-height: 45vh; object-fit: contain;
    border-radius: 3px; flex-shrink: 1; margin-bottom: 10px; background-color: #333;
}
.points-lightbox-text {
    padding: 10px 15px; text-align: left; width: 90%; max-width: 650px; overflow-y: auto; max-height: 30vh;
    border-top: 1px solid #555; margin-top: 10px; background-color: #252525; border-radius: 4px;
    color: #ffffff; scrollbar-width: thin; scrollbar-color: #555 #252525;
}
.points-lightbox-text::-webkit-scrollbar { width: 8px; }
.points-lightbox-text::-webkit-scrollbar-track { background: #252525; }
.points-lightbox-text::-webkit-scrollbar-thumb { background-color: #555; border-radius: 4px; }
.points-lightbox-title { font-size: 1.2em; font-weight: bold; margin-bottom: 8px; color: #ffffff; text-align: center; }
.points-lightbox-description { font-size: 0.95em; color: #cccccc; margin-bottom: 12px; text-align: center; }
.points-lightbox-profile { margin-top: 10px; margin-bottom: 10px; font-size: 0.95em; color: #bbbbbb; line-height: 1.5; }
.points-lightbox-stats { margin-top: 10px; padding-top: 10px; border-top: 1px solid #555; }
.points-lightbox-stats .stat-entry { display: flex; justify-content: space-between; padding: 1px 5px; line-height: 1.4; font-size: 1.05em; }
.points-lightbox-stats .stat-name { color: #dddddd; text-align: left; padding-right: 5px; flex-grow: 1; white-space: normal; }
.points-lightbox-stats .stat-value { font-weight: bold; color: #ffffff; text-align: right; min-width: 25px; flex-shrink: 0; font-size: 1.05em; }
.points-lightbox-close {
    position: absolute; top: 5px; right: 5px; background-color: #ffffff; color: #000000; border: 1px solid #333;
    border-radius: 50%; width: 30px; height: 30px; font-size: 1.5em; line-height: 28px; text-align: center;
    cursor: pointer; font-weight: bold; z-index: 1011; transition: background-color 0.2s ease;
}
.points-lightbox-close:hover { background-color: #e0e0e0; }
.points-lightbox-newcard { margin-top: 10px; padding: 8px 16px; font-size: 0.9em; }

/* --- Responsive Design --- */
@media (max-width: 768px) {
    body { padding: 10px; }
    .main-content-wrapper { padding: 10px; }
    #top-banner, .banner-bottom { max-width: 95%; }
    h1 { font-size: 1.5em; } h2 { font-size: 1.2em; } h3 { font-size: 1.0em; }
    p, #player-names label, #round-count, .how-to-play li { font-size: 0.9em; }
    #player-names input[type="text"] { width: calc(100% - 60px); }
    button { font-size: 0.8em; padding: 8px 16px; }
    #player-buttons button { font-size: 1em; padding: 10px 20px; }
    #footer-buttons button { font-size: 0.9em; padding: 10px 20px; }
    #round-number-display { font-size: 1.3em; } #winner-label { font-size: 1em; }
    #winner-display { font-size: 1.4em; } #score-display h2 { font-size: 1.1em; }
    #score-display p { font-size: 1em; padding-left: 10px;} #footer-buttons { gap: 10px; }
    .points-lightbox-overlay { padding: 5px; }
    .points-lightbox-content { padding: 10px 5px 5px 5px; max-width: 100vw; max-height: 98vh; }
    .points-lightbox-image { max-height: 40vh; } .points-lightbox-text { max-height: 30vh; }
    .points-lightbox-title { font-size: 1.1em; } .points-lightbox-description { font-size: 0.9em; }
    .points-lightbox-profile { font-size: 0.85em; } .points-lightbox-stats .stat-entry { font-size: 1em; }
    .points-lightbox-close { width: 28px; height: 28px; font-size: 1.3em; line-height: 26px; }
    .points-lightbox-newcard { padding: 6px 12px; font-size: 0.8em;}
}
 @media (max-width: 480px) {
      h1 { font-size: 1.3em; } h2 { font-size: 1.1em; } h3 { font-size: 0.95em; }
      #round-number-display { font-size: 1.2em; } #winner-display { font-size: 1.2em; }
      button { padding: 6px 12px; }
      #player-buttons button { font-size: 0.9em; padding: 8px 16px; min-width: 100px; }
      #footer-buttons button { font-size: 0.8em; padding: 8px 16px; }
      #player-names input[type="text"] { width: calc(100% - 50px); }
      .how-to-play li { font-size: 0.85em; padding-left: 1.2em;}
 }