html {
    position: relative;
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    font-family: "Gill Sans", sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.content .hidden {
    display: none !important;
}

.content .hidden.current {
    display: block !important;
}

a.remove, #countdown a, #startGame a {
    color: #ffc107;
}

a.remove:active, #countdown a:active, #startGame a:active {
    color: #000;
}

.container-fluid {
  min-height: calc(100vh - 70px);
  margin-bottom: 70px;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  overflow-x: hidden;
}

header {
  background-image: url("/static/image/frise.jpg");
  background-repeat: repeat-x;
  background-position: bottom center;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 100%); 
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

header img {
  max-width: 100%;
  height: auto;
  max-height: 90px;
  display: block;
}

footer.footer {
    position: fixed; 
    background: linear-gradient(135deg, #302b63 0%, #24243e 100%); 
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    padding: 10px 0;
    border-top: 1px solid #4a4580;
    z-index: 1000;
    box-sizing: border-box;
}

#playerList {
    display: inline-block;
    text-align: left;
    margin: 15px auto;
}

#playerAddForm {
    width: 300px;
    margin: 10px auto;
}
#playerAddForm label{
    display: block;
}

#playerAddForm label{
    display: block;
    font-weight: bold;
    font-size: 18px;
}

.content #playerAddForm .info {
    font-size: 14px;
    color: #4c4c4c;
}

.content #playerAddForm .info ul {
    display: inline-block;
    text-align: left;
}
.content #playerAddForm .info ul li {
    font-size: 14px;
    line-height: 16px;
}

.content h2 {
    margin: 10px 0 0 0;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.content {
    text-align: center;
}

.content ul {
    text-align: left;
}

.content ul li {
    font-size: 20px;
    line-height: 25px;
}

.content ul li label {
    margin-left: 8px;
    vertical-align: top;
}

#reset {
    margin-top: 25px;
}

.homelink {
    font-size: 12px;
    display: block;
    margin: 0 0 20px 0;
}
.homelink a {
    color: #fff;
    text-decoration: underline;
}

#reset, #reveal, #word, #timer, .role, .player {
    text-align: center;
    margin: 20px 0;
    color: #fff;
}

.role, #word {
    background-color: #23272b;
    color: #fff;
}

.role {
    padding: 10px;
}

#word span{
    display: block;
    padding: 10px;
}

.role strong, #word strong, .player {
    font-size: 25px;
    display: block;
}

#countdown, #startGame {
    font-weight: bold;
    font-size: 50px;
    color: #fff;
}

#countdown #timer {
    color: #f39c12;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#displayVote1, #vote1 button, #vote1Result, #displayVote2, #vote2Result {
    margin: 5px auto 15px auto;
}

/* Vote 2 Custom Styles */
#vote2 {
    background: transparent !important;
    padding: 0;
}

.vote2-choices {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    justify-content: stretch !important;
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
}

/* Force dark background on vote2 player cards - overrides Bootstrap .btn */
.btn.btn-vote2-player.vote2-player-card,
button.btn-vote2-player.vote2-player-card {
    background-color: rgba(30, 35, 50, 0.95) !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

button.btn-vote2-player.vote2-player-card.selected {
    background-color: rgba(46, 204, 113, 0.15) !important;
    background-image: none !important;
    border-color: rgba(46, 204, 113, 0.8) !important;
}

#vote1 button, #vote1Result {
    padding: 1rem 2rem;
    font-size: 30px;
    margin-left: 10px;
}

/* Vote sections text color */
#voteForm h4, #vote1 h4, #vote2 h4, #vote1Result h4, #vote2Result h4, #status p {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#vote2Result #finalResult {
    font-weight: bold;
    font-size: 20px;
    background-color: #23272b;
    color: #fff;
    padding: 10px;
}

.content button.cta, .content a.cta {
    width: 260px;
    max-width: 90%;
    height: 50px;
    margin: 0 auto;
    font-weight: bold;
    font-size: 18px;
    line-height: 32px;
    display: block;
}

.content button.cta.hidden,
.content a.cta.hidden {
    display: none;
}

.inline-block {
    display: inline-block;
    text-align: left;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

.playerStatus i {
    margin-left: 3px;
}
.playerStatus .online {
    color: #46A049;
}
.playerStatus .offline {
    color: #5F5F5F;
}
.player .playerStatus {
    font-size: 10px;
}

.ghost {
    color: #55585c;
    font-style: italic;
}

/* Base responsive adjustments */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 10px 0;
    }
    
    header img {
        max-width: 100%;
        height: auto;
        max-height: 80px;
    }
    
    .container-fluid {
        padding: 10px;
    }
    
    footer.footer {
        height: auto;
        min-height: 60px;
        padding: 10px;
    }
    
    #playerAddForm {
        width: 100%;
        max-width: 300px;
        padding: 0 10px;
    }
    
    #countdown, #startGame {
        font-size: 40px;
    }
    
    .content h2 {
        font-size: 20px;
    }
    
    .content ul li {
        font-size: 16px;
        line-height: 22px;
    }
    
    .role strong, #word strong, .player {
        font-size: 20px;
    }
    
    #vote1 button, #vote1Result {
        padding: 0.8rem 1.5rem;
        font-size: 24px;
        margin-left: 5px;
    }
}

/* ===========================================
   THEME SYSTEM - Using html element for themes
   =========================================== */

/* Default Theme (Purple) - also fallback */
.container-fluid {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

header {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 100%);
}

footer.footer {
    background: linear-gradient(135deg, #302b63 0%, #24243e 100%);
    border-top-color: #4a4580;
}

/* ============ DARK THEME ============ */
html.theme-dark .container-fluid {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
}

html.theme-dark header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

html.theme-dark footer.footer {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-top-color: #444;
}

html.theme-dark .player-card,
html.theme-dark .room-card,
html.theme-dark .room-card-dark,
html.theme-dark .menu-item,
html.theme-dark .profile-card,
html.theme-dark .stats-card,
html.theme-dark .settings-container,
html.theme-dark .settings-section {
    background: rgba(30, 30, 30, 0.95) !important;
    border-color: #444 !important;
}

html.theme-dark .chat-box,
html.theme-dark .chat-container,
html.theme-dark .chat-messages,
html.theme-dark .room-chat-messages {
    background: rgba(20, 20, 20, 0.9) !important;
    border-color: #444 !important;
}

html.theme-dark .btn-back,
html.theme-dark .btn-settings {
    background: #333 !important;
    border-color: #555 !important;
}

/* ============ RED THEME ============ */
html.theme-red .container-fluid {
    background: linear-gradient(135deg, #4a0000 0%, #8b0000 50%, #4a0000 100%);
}

html.theme-red header {
    background: linear-gradient(135deg, #4a0000 0%, #8b0000 100%);
}

html.theme-red footer.footer {
    background: linear-gradient(135deg, #8b0000 0%, #4a0000 100%);
    border-top-color: #ff4444;
}

html.theme-red .player-card,
html.theme-red .room-card,
html.theme-red .room-card-dark,
html.theme-red .menu-item,
html.theme-red .profile-card,
html.theme-red .stats-card,
html.theme-red .settings-container,
html.theme-red .settings-section {
    background: rgba(60, 0, 0, 0.9) !important;
    border-color: #8b0000 !important;
}

html.theme-red .chat-box,
html.theme-red .chat-container,
html.theme-red .chat-messages,
html.theme-red .room-chat-messages {
    background: rgba(40, 0, 0, 0.9) !important;
    border-color: #660000 !important;
}

html.theme-red .btn-back,
html.theme-red .btn-settings {
    background: #6b0000 !important;
    border-color: #8b0000 !important;
}

html.theme-red .menu-item:hover {
    border-color: #ff4444 !important;
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.3) !important;
}

/* ============ LIGHT/WHITE THEME ============ */
html.theme-white .container-fluid {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 50%, #f5f5f5 100%);
}

html.theme-white header {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

html.theme-white footer.footer {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    border-top-color: #ccc;
}

html.theme-white .player-card,
html.theme-white .room-card,
html.theme-white .room-card-dark,
html.theme-white .menu-item,
html.theme-white .profile-card,
html.theme-white .stats-card,
html.theme-white .settings-container,
html.theme-white .settings-section {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #ccc !important;
    color: #333 !important;
}

html.theme-white .chat-box,
html.theme-white .chat-container,
html.theme-white .chat-messages,
html.theme-white .room-chat-messages {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: #ccc !important;
}

html.theme-white .btn-back,
html.theme-white .btn-settings {
    background: #fff !important;
    border-color: #ccc !important;
    color: #333 !important;
}

html.theme-white .player-name,
html.theme-white .player-details h2,
html.theme-white .player-details p,
html.theme-white .menu-title,
html.theme-white .menu-desc,
html.theme-white .room-name,
html.theme-white .room-info,
html.theme-white .stat-value,
html.theme-white .stat-label,
html.theme-white .setting-info h3,
html.theme-white .setting-info p,
html.theme-white h2, html.theme-white h3, html.theme-white h4,
html.theme-white .content h2 {
    color: #333 !important;
}

html.theme-white .chat-message,
html.theme-white .chat-text {
    color: #333 !important;
}

html.theme-white .menu-item:hover {
    border-color: #999 !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
}

html.theme-white .player-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

html.theme-white a.remove,
html.theme-white #countdown a,
html.theme-white #startGame a {
    color: #e67e22 !important;
}

/* body / page-level overrides (lobby, profile, room list, etc.) */
html.theme-dark body,
html.theme-dark body.content {
    background: linear-gradient(180deg, #111 0%, #1a1a1a 45%, #222 100%) !important;
}

html.theme-red body,
html.theme-red body.content {
    background:
        radial-gradient(circle at 8% 10%, rgba(127, 29, 29, 0.5), transparent 18%),
        linear-gradient(180deg, #2a0000 0%, #4a0000 45%, #1a0000 100%) !important;
}

html.theme-white body,
html.theme-white body.content {
    background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 45%, #f0f0f0 100%) !important;
}

html.theme-dark header {
    background-color: #222 !important;
}

html.theme-red header {
    background-color: #6b0000 !important;
}

html.theme-white header {
    background-color: #ddd !important;
}

html.theme-white .settings-header h1,
html.theme-white .settings-section h2,
html.theme-white .theme-name,
html.theme-white .setting-info h3 {
    color: #333 !important;
}

html.theme-white .settings-header p,
html.theme-white .setting-info p,
html.theme-white .version-info p {
    color: #666 !important;
}

