:root {
  --primary-color: #652e8c;
  --secondary-color: rgb(119 119 119);
  --accent-color: gold;
    --accent-color2: #fff5c5;

}

   body {
    font-family: 'Roboto', sans-serif;
    background: #333333;
   }

p {
    color:white;
}
  html, body {
      height: 100%;
      margin: 0;
    }

    .page-wrapper {
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    .content {
      flex: 1;
    }

    footer {
      background-color: #333;
      color: white;
      text-align: center;
      padding: 16px;
    }

tr {
    border-bottom: 1px solid #afafaf;
    border-top: none;
}

.scoreinput.scoretotal {
    border-left: none;
    
}


.scoreinput {
    border-left: 1px solid #afafaf;
}


#welcome, #footNoteMsg {
    background-color: var(--accent-color2);
    padding:5px 25px;
    transition: 1s;
        text-align: center;
}

#liveLeaderboard {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

#alert {
    background-color: #2a103c;
    color:white;
    padding:10px 25px;
    font-weight: bold;
    transition: 1s;
}

#alertbanner {
    transition: opacity 1.5s ease-out;
}

#alertbanner.hidden {
    opacity: 0;
    pointer-events: none;
}

body {

    font-family: 'Roboto', sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: unset !important;
}

#tooldiv {
    display: flex;
    margin-left: auto;
    margin-right: 10px;
        justify-content: end;
}


#logo {
    margin-left: 5px;
}

header p, header a {
    line-height: 1;
    font-size: large;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

header>div {
    display: flex;
    align-items: center;
}

header>div {
    width: 1000px;
    margin: 0 auto;
    padding: 0px;
}

header {
    background: var( --primary-color);
    padding: 15px;
    width: 100%;
    z-index: 100;
    display:flex;
}

section {
    padding:20px
}

footer {
    padding:10px
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.scoreinput {
    text-align: center;
    border-radius: 0px;
    background-color: #fef5c6;  
}
.form-control.scoreinput:focus {  
-webkit-box-shadow: none;
box-shadow: none;
    border-radius: 5px;
    outline: solid;
        outline-color: #642d8a;
        outline-width: 2px;
}

.form-control[readonly].scoreinput:focus {
      outline: 0;
}

#playerinput {
    background: white;
    padding: 30px;
    border-radius: 15px;
    touch-action: manipulation;
    width: 100%;
    max-width: 400px;
      box-shadow: 0 1px 5px grey;
}

.btn-group-lg>.btn, .btn-lg {
    padding: 4px 12px;
    border-radius: 0px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.btn-block+.btn-block {
     margin-top: 0px; 
}

.btn-block {
    display: block;
    width: auto;
    font-size: 12px;
}

td {
    width: 100px;
}

.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
    background-color: rgba(255, 255, 255, 0);
    opacity: 1;
    cursor: default;
}

.form-control {
padding: 3px 8px;
border-right:none;
border-top:none;
border-bottom:none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.scoreinput.rnd {
        background-color: none;
    color: #424242;
    font-weight: bold;
    font-size: 18px;
}

#gameSection, #liveLeaderboard {
background-color: #d4c4e0;
}
 #playerSection {
background-color:#fef5c6
 }

#R11deal, #R10deal, #R9deal, #R8deal, #R7deal, #R6deal, #R5deal, #R4deal, #R3deal, #R2deal, #R1deal {
    background-color: white;
    color: #424242;
    font-weight: normal;
    font-size: 12px;
}

#gametbl.table tr th:first-child,
#gametbl.table tr td:first-child {
  font-weight: bold;
  color: white;
}

#gametbl.table tr td:first-child input {
background-color: var( --primary-color) !important;
color: rgb(255, 255, 255) !important;
}

#gametbl.th {
    text-align: center;
    color: white;
    font-size: 18px;
}
th {
    text-align: center;
    font-size: 16px;
    border-bottom:1px solid black;
}

th .scoreinput {
background-color: none !important;
color: #424242 !important;
}

/* table tr:nth-child(even) {
  background:rgb(214, 214, 214);
} */



.btn.nonheader {
    background: var(--primary-color);
    color: white;
}
/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


.leaderboard-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  margin: 10px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

 #playertotals {
    display: none;
  }

@media screen and (max-width: 400px) {
  td.scoretotal {
    display: none;
  }
  #playertotals {
    display: table-row;
  }
}
.leaderboard-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.player-card {
  flex: 0 0 calc(16.66% - 10px); /* Fit 6 per row on wider screens */
  min-width: 120px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  padding: 10px;
  text-align: center;
  font-family: 'Roboto', sans-serif;
    transition: all 1s ease;
}

.header-card {
  flex: 0 0 calc(16.66% - 10px); /* default width to match player cards */
  background: #702da2;
  color:white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  font-weight: bold;
 flex-wrap: wrap;
}

.header-card .crowns {
  font-size: 22px;
  align-items: center;
  gap: 8px;
}

.header-card .crowns strong {
  font-size: 18px; /* slightly smaller than before */
}




.player-card .rank {
  font-size: 16px;
  font-weight: bold;
  color: #7a5894;
}

.player-card .name {
  font-size: 16px;
  margin-top: 4px;
}

.player-card .score {
  font-size: 18px;
  margin-top: 4px;
  padding: 6px 12px;
  border-radius: 50px; /* Makes it pill-shaped like a medal */
  display: inline-block;
  min-width: 60px;
  text-align: center;
  font-weight: bold;
  background: #eee; /* default neutral background */
  color: #333;
}

/* Rank-based medal colors */
.gold .score {
  background: #ffd700;
  color: #3a3a3a;
}

.silver .score {
  background: #c0c0c0;
  color: #3a3a3a;
}

.bronze .score {
  background: #cd7f32;
  color: #fff;
}


.player-card .behind {
  font-size: 0.8em;
  color: #777;
  margin-top: 2px;
}



@media (max-width: 500px) {
  .player-card {
    flex: 1 1 calc(50% - 10px); /* 2 cards per row */
  }
}

/* At 500px or below, fill the full row width */
@media (max-width: 500px) {
  .header-card {
    flex: 1 1 100%;
  }
}

@media (max-width: 350px) {
  .player-card,
  .header-card {
    flex: 1 1 100%; /* single column layout */
  }
}


.player-card {
  animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


.speech-bubble {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  animation: popIn 0.3s ease-out;
  display:flex;
  flex-wrap: wrap;
  z-index: 10;
  width: 100%;
  justify-content: center;
}


@keyframes popIn {
  from { opacity: 0; transform: translateX(-50%) scale(0.8); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

/* Disable animations & transitions during screenshot */
.screenshot-mode * {
    animation: none !important;
    transition: none !important;
}

/* Remove shadows only during screenshot */
.screenshot-mode .player-card,
.screenshot-mode .header-card,
.screenshot-mode .leaderboard-card {
    box-shadow: none !important;
}

/* Keep original colors — DO NOT override backgrounds */
.screenshot-mode .player-card,
.screenshot-mode .header-card,
.screenshot-mode .leaderboard-card {
    background: white;
}

.screenshot-mode .player-card.header-card {
    background: #702da2;
}


/* Ensure parent containers don't apply opacity */
.screenshot-mode #liveLeaderboard,
.screenshot-mode #gameSection {
    opacity: 1 !important;
}


  #sidemenu {
            transform: translateX(100%);
            transition: transform 0.5s ease;
            display: none;
            position: fixed;
            height: 100%;
            background: white;
            color: black;
            width: 50%;
            padding: 20px;
                z-index: 20;
        }
        #sidemenubackground {
            display:none;
            background-color:black;
            transition: opacity 0.5s ease;
            opacity: 0.25;
            position: fixed;
            height: 100%;
            background: #000000;
            width: 100%;
            top: 0px;
                }

        .smclosebtn {
            height: 48px;
            transition: opacity .2s;
            width: 48px;
            z-index: 1;
            right: -4px;
            cursor: pointer;
            position: absolute;
            top: 19px;
            text-align: center;
            padding: 10px;
        }

        .smlinkitems {
        margin:0px 0;
        font-size:18px;
        display: flex;
        padding:10px 10px;
        border-radius: 5px;
        transition: background-color 0.5s ease;
        }

        .smlinkitems button {
          background: antiquewhite;
          padding: 10px;
          border-radius: 10px;
          text-align: left;
          padding-left: 15px;
          display: flex;
        }

        
        .smlinkitems:hover {
        background-color: #e9e9e9;
        }

        .smhr {
            margin-bottom:10px;
            opacity: 1;
            margin-top:5px;
        }
        .smlink{
            text-decoration: none;
            color:black;
            width: 100%;
        }


        header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
}

#logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: bold;
}

#menuToggleButton {
  display: flex;
  justify-content: end;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
