@media (max-width: 640px) and (max-height: 1000px) {

:root {
    --primary-blue: #08dafb; 
    --primary-blue-dark: #409eca; 
    --secondary-gray: #ffffff; 
    --secondary-gray-dark: #ffffff; 
    --bg-light-blue: #d1f1f4; 
    --bg-white: #ffffff;
    --text-gray-dark: #58479a;
    --text-gray-medium: #a8b5c0; 
    --text-gray-light: #e6e6e6; 
    --card-purple: #bffbff; 
    --card-storyteller-green: #2ae5a0; 
    --selection-yellow: #613898; 
    --accent-indigo: #30f789; 
    --game-over-green: #047857; 

    --border-radius-base: 0.75rem; 
    --border-radius-card: 0.75rem; 
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3);
    --shadow-2xl: 0 25px 50px rgba(40, 40, 40, 0.6);
}



::-webkit-scrollbar {
    visibility: hidden;
    display: none;
}

body, html {
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    height: auto;
    width: 100vw;
    color: rgb(228, 228, 228);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-color: rgb(0, 0, 0);
    
background: linear-gradient(to top, #000000, #252525, #242424, #000000)   ;
    line-height: 1.5; 

}

footer {
    height: auto;
    color: #373535;
    font-size: 0.8rem;
    position: fixed;
    width: 96vw;
height: auto;
bottom: 2rem;
text-align: center;
}



#singledevice  {
    font-size: 1.72rem;
    font-weight: 900;
  
    
  
    color: white;
  }
  

.scoreboard-container {
    margin-bottom: 8rem;
}


.game-container {
    width: 100vw;
    scroll-behavior: smooth;
    min-height: 100%;
    height: auto;
        display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
    gap: 1.5rem;
    transition: all 0.3s ease-in-out;
}


#playerask {
    font-size: 7.2vw !important;
    text-align: center;

    color: white;
}
#player-count {
    margin-bottom: 6svh;
    transform: translateX(100%);
    text-align: center;
    margin-top: 6svh;
    font-size: 1.2rem;
    font-weight: bold;
    
}

#player-name-inputs input, #player-name-inputs {
    gap: 1.6rem;
    height: auto;
    min-height: 3.6rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    padding-left: 0.32rem;
    
}

#team-count-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
}

#playteam {
    font-size: 1.16rem;
    align-items: center;
    align-content: center;

    display: none;
    visibility: hidden;
}

.checkbox-input, .checkbox-input input {
    width: 2rem;
    height: 2rem;
  
  
    cursor: pointer;
  

    display: none;
    visibility: hidden;
}

#start-game-btn, #start-game-btn button {

margin-top: 4svh;
margin-bottom: 12svh;

}

.input-group {
    margin-top: 6svh;
}

input {
    border-radius: 8.8px;
   border: none !important;
   background: linear-gradient(to right,
   #092541 0%,
   #273a6f 20%,
   #5e42aa 40%,
   #453274 60%,
   #342f3a 80%,
   #242424 100%);

   opacity: 0.72;
}

button, #start-game-btn, #start-game-btn button {
    
    border: none !important;
    background-image: url('images/title2.jpg');
    background-size: cover;
    background-repeat: no-repeat; 
}


.game-title {

    font-size: 14vw;
    text-transform: uppercase;
    font-weight: 900;
    background: url('bc.jpg') center/36% repeat;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
  
    font-family: 'Impact', 'Anton', sans-serif; 
    filter: drop-shadow(2px 2px 2px rgba(245, 155, 0, 0.729));

    }

.game-title {
    margin-top: 4svh;
    text-align: center;
    width: 100vw;
    flex-direction: column;
    align-items: center;
    align-content: center;
    display: flex;
    margin-bottom: 1.5rem; 
}

.screen-section {
    display: flex;
    align-self: center;
    align-content: center;
background: transparent;
    flex-direction: column;
    gap: 1.5rem;
}

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

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.input-label {
    font-size: 1.125rem; 
    font-weight: 600; 
    color: var(--text-gray-medium);
}

.text-input {
    font-weight: bold;
    color: rgb(255, 255, 255);
    padding: 0.75rem; 
    border-radius: 0.5rem; 
    width: 100%; 
    box-sizing: border-box;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5); 
}

.small-input {
    width: 6rem; 
}

.player-inputs-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; 
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 1rem;}

    img:hover, img:active {
border-radius: 12px;
    }



.button-primary {
    color: white;
    padding: 0.75rem 1.5rem;
    
    box-shadow: var(--shadow-lg);
    font-weight: 600; 
    border: none;
    cursor: pointer;

    border-radius: 12px;

    background-image: url('images/title2.jpg');
    background-size: cover;
    background-repeat: no-repeat; 
}

.button-primary:hover {
    background-color: var(--primary-blue-dark);
}

.full-width-button {
    width: 100%; 
}

#submit-clue-btn {
    width: 40vw;
    height: 4rem;
    margin-bottom: 2rem;
    margin-left: 30vw;
}

#submit-guess-btn {
    width: 40vw;
    height: 4rem;
    margin-bottom: 2rem;
    margin-left: 30vw;
}

#next-round-btn {
    margin-top: 2.2rem;
    width: 40vw;
    height: 4rem;
    margin-bottom: 2rem;
    margin-left: 30vw;
}

#submit-player-card-btn {
    width: 40vw;
    height: 4rem;
    margin-bottom: 2rem;
    margin-left: 30.2vw;
}



.text-center {
    text-align: center;
    margin-top: 2rem;
}

.round-info {
    font-size: 8vw; 
    font-weight: 800; 
    margin-bottom: 2rem;
    color: var(--text-gray-dark);
}

.current-player-info {
    font-size: 5.2vw; 
    font-weight: 600;

    color: var(--accent-indigo);
    margin-top: 0.5rem;
    margin-bottom: 0.4rem;
}

.current-role-info {
    font-size: 1.1rem; 
    color: var(--text-gray-light);
    margin-top: 0.32rem;
    margin-bottom: 2rem; 
}

.game-phase-section {
    display: flex;
    flex-direction: column;
    gap: 1rem; }

.section-title {
    font-size: 5.8vw; 
    font-weight: 700; 
    color: var(--text-gray-dark);
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    font-size: 7.2vw; 
    margin-bottom: 2rem;
    font-weight: 700; 
    color: var(--text-gray-dark);
    text-align: center;
}

.clue-input-group {
    display: flex;
    flex-direction: column;
    gap: 3.2rem; 
    width: 100vw;
    
    margin-top: 1rem; 
}

#clue-input {
    width: 88vw !important;
    margin-left: 1rem;
    height: 3.8rem;
}

.clue-text {
    color: var(--card-purple); 
    font-weight: 600;
}

/*
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    justify-items: center;
}
*/

/*



.tilt-container {
width: 92vw;  
height: auto;
}
  .card-grid {
    display: flex;
    overflow-x: scroll;
    height: 24rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    gap: 16vw; 

    padding-left: calc((100vw - 80vw) / 2);
    padding-right: calc((100vw - 80vw) / 2);
  
    box-sizing: border-box;
  }
  
  .card {
    margin-top: 1rem;
    flex: 0 0 80vw; 
    scroll-snap-align: center;
    border-radius: 8px;
    background: transparent;
    transform-style: preserve-3d;
    transition: transform 0.122s ease-out;



    display: flex;
    align-items: center;
    justify-content: center;
  }


*/






/*
.card {
    background-color: var(--card-purple);
    color: white;
    border-radius: var(--border-radius-card);
    padding: 1rem;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem; 
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer; 
}

*/


.card:hover {
    scale: 1.05;
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}
.card.selected {
    border: 3px solid var(--selection-yellow);
    transform: scale(1.08);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s;
}

.card.storyteller-card {
    background-color: var(--card-storyteller-green);
}

.card.pointer-events-none { 
    cursor: default;
    pointer-events: none;
}

.results-details-container {
    font-size: 1.125rem; /* text-lg */
    color: var(--text-gray-medium);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; }

.results-details-container .font-bold {
    font-weight: 700;
}

.results-details-container .text-green-600 {
    color: #18bf85; 
}




.results-details-container div { 
    margin-top: 1rem;
    padding: 1rem;
    background-color: #2e3032; 
    border-radius: 0.5rem; 
    text-align: left;
}

.scoreboard-container {
    margin-top: 2rem; 
}

.score-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    font-size: 1.24rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    grid-template-columns: 1fr; 
    gap: 2.4rem; 
    color: var(--text-gray-medium);
}

.score-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.25rem; 
    padding-bottom: 0.25rem; 
    border-bottom: 1px solid #e5e7eb; 
}

.score-list li:last-child {
    border-bottom: none;
}

.score-list li span {
    font-weight: 600;
}

.score-list li span.text-blue-700 {
    color: #1dd897;
}


.game-over-title {
    font-size: 2.25rem;
    font-weight: 800; 
    color: var(--game-over-green);
}

.final-scores-heading {
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--text-gray-dark);
}

.final-score-list {
    list-style: none; 
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; 
    font-size: 1.125rem; 
    color: var(--text-gray-medium);
}

.final-score-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem; 
}

.final-score-list li span {
    font-weight: 600;  
}

.final-score-list li span.text-2xl {
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--card-storyteller-green); 
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.74);
    background: rgba(0, 0, 0, 0.691);
    z-index: 999;
    display: none;
}

.message-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: black;
    background: linear-gradient(to top, #000000, #252525, #242424, #000000)   ;
width: 100vw;
height: 100%;
max-height: 100%;
min-height: 100%;
padding: 0;
overflow: hidden;
scroll-behavior: none;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.message-content {
    font-size: 6.3vw; 
    margin-top: -8rem;
    margin-bottom: 8rem;
    font-weight: 600; 
    color: var(--text-gray-dark);
}




img {
    max-height: 270px;
    height: auto;
    max-width: 280px;
    border-radius: 12px;
    width: auto;

}

    .tilt-container {
        width: 92vw;  
        height: auto;
        }
          .card-grid {
            display: flex;
            overflow-x: scroll;
            height: 24rem;
            scroll-snap-type: x mandatory;
            scroll-behavior: smooth;
        margin-top: -3rem;
            gap: 16vw; 
        margin-left: 8vw;
            padding-left: calc((100vw - 80vw) / 2);
            padding-right: calc((100vw - 80vw) / 2);
            padding-top: calc((100vw - 80vw) / 2);
            padding-bottom: calc((100vw - 80vw) / 2);

            box-sizing: border-box;

          }
          
          .card {
            margin-top: 1rem;
            flex: 0 0 80vw; 
            scroll-snap-align: center;
            border-radius: 8px;
            background: transparent;
            transform-style: preserve-3d;
            transition: transform 0.122s ease-out;
        
        
        
            display: flex;
            align-items: center;
            justify-content: center;
          }
        
        



    .game-container {
       /* padding: 1.5rem; */
       padding: 0;
    }
    .card {
        max-height: 288px;
        height: auto;
        width: 288px;
        max-width: 72vw;
        font-size: 0.75rem;
        padding: 0.75rem;
    }




  .game-title {

    font-size: 24vw;
    text-transform: uppercase;
    font-weight: 900;
    background: url('images/title2.jpg') center/cover no-repeat;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
  
    font-family: 'Impact', 'Anton', sans-serif; 
    }
    .game-over-title {
        font-size: 2.25rem;
    }
    .final-score-list li span.text-2xl {
        font-size: 1.25rem;
    }






.snake-title {
    display: inline-flex;
    font-size: 3rem;
    font-weight: bold;
    gap: 2px;
  }
  
  .snake-title span {
    display: inline-block;
    animation: snakeWave 3.2s ease-in-out infinite;
  }
  
  @keyframes snakeWave {
    0%, 100% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-10px);
    }
  }

  .snake-title span:nth-child(1) { animation-delay: 0s; }
.snake-title span:nth-child(2) { animation-delay: 0.1s; }
.snake-title span:nth-child(3) { animation-delay: 0.2s; }
.snake-title span:nth-child(4) { animation-delay: 0.3s; }
.snake-title span:nth-child(5) { animation-delay: 0.4s; }
.snake-title span:nth-child(6) { animation-delay: 0.5s; }
.snake-title span:nth-child(7) { animation-delay: 0.6s; }
.snake-title span:nth-child(8) { animation-delay: 0.7s; }
.snake-title span:nth-child(9) { animation-delay: 0.8s; }
.snake-title span:nth-child(10) { animation-delay: 0.9s; }
.snake-title span:nth-child(11) { animation-delay: 1s; }
.snake-title span:nth-child(12) { animation-delay: 1.1s; }
.snake-title span:nth-child(13) { animation-delay: 1.2s; }
.snake-title span:nth-child(14) { animation-delay: 1.3s; }
.snake-title span:nth-child(15) { animation-delay: 1.4s; }



@keyframes titleGlow {
    0% {
        transform: rotateY(0deg) rotateX(64deg);
        filter: opacity(0.1);
        scale: 0.63;
      }
    
      100% {
        transform: rotateY(360deg) rotateX(0);
        filter: opacity(1);
        scale: 1;

      }
}


#section1 {
    min-height: 100vh;
    top: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
overflow: hidden;
    height: 100vh;
    width: 100vw;
    z-index: 1000;
    background: linear-gradient(-230deg, #000000, #1d201f, #000000);    position: fixed;
    background-size: 112% 108%;  
  animation: moveBg 18s ease infinite;

}


@keyframes moveBg {
    0% {
        background-size: 112% 108%;
      }
      50% {
       background-size: 108% 104%;
      }
      100% {
        background-size: 112% 108%;

      }
  }

#toggle, #toggle button {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 20svh;
height: 20vw;
max-height: 200px;
    width: 40vw;
    max-width: 300px;
    border-radius: 50%;
    background-image: url('images/title2.jpg');
background-repeat: no-repeat;
background-size: cover;
animation: pulse 5s ease-in-out infinite;
}







@keyframes pulse {
    0%, 100% {
        scale: 1;
        box-shadow: 0 0 4px #6a6a6a;

    }
    50% {
        scale: 1.06;
        box-shadow: 0 0 8px #d44e00;
    }
}




#beta {
    display: flex;
    top: 0;
    width: 100vw;
     height: 100%;
        background-image: url(bc.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: rgb(238, 238, 238);
    overflow-x: hidden;
    position: absolute;
    z-index: 1002;
    scroll-behavior: smooth;
}

#betadiv {
    flex-direction: column;
    align-items: center;
    align-content: center;
    text-align: center;
    font-size: 1rem;
    line-height: 1.7;
    width: 98vw;
}
#betap {
    font-weight: 400;
    text-shadow: 0 0 6px #000000;
}
#betah2 {
    margin-top: 2rem;
    margin-bottom: 4rem;
    font-size: 6.3vw;
    font-weight: bold;
}

#toggle2 {
    background-image: url('bc.jpg');
    background-repeat: no-repeat;
    background-size: cover;

    margin-bottom: 3rem;
    margin-top: 3rem;
    width: 6rem;
    height: 3.4rem;
    pointer-events: all;
    border-radius: 10px;
    box-shadow: 0 0 10px #007d53;
    font-weight: bolder;
    font-size: 1.1rem;
    animation: pulseShadow 3.2s ease-in-out infinite;
}

@keyframes pulseShadow {
    0%, 100% {
        box-shadow: 0 0 6px #007d53;
scale: 1;
opacity: 0.8;
    }
    50% {
        box-shadow: 0 0 14px #007d53;
scale: 1.02;
opacity: 1;
    }
}


#feedback {
    font-size: 1.2rem;
margin-top: 1rem;
background: none;
text-decoration: underline;
color: white;
font-weight: bold;
}



.btn-video-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none; /* so video doesn't block click */
    filter: brightness(0.6); /* optional dimming */
  }
  
  .btn-label {
    position: relative;
    z-index: 1;
    color: white;
    font-size: 1.6rem;
    font-weight: bold;
    text-transform: uppercase;
    font-family: 'Impact', 'Anton', sans-serif;
    letter-spacing: 1px;
  }







#beta2 {
    display: flex;
    top: 0;
    width: 100vw;
    height: 100%;
    background-image: url(bc3.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: rgb(238, 238, 238);
overflow-x: hidden;
    position: absolute;
    z-index: 1001;
    scroll-behavior: none;
}

#betadiv2 {
    flex-direction: column;
    align-items: center;
    align-content: center;
    font-size: 1rem;
    line-height: 1.7;
    text-align: center;
margin-left: 2vw;
    width: 96vw;
}
#betap2 {
    font-weight: 500;
    text-shadow: 0 0 5px #000000;
    text-align: left;

}
#betah22 {
    margin-top: 2rem;
    margin-bottom: 4rem;
    font-size: 8.3vw;
    font-weight: bold;
}

#toggle22 {
    background-image: url('bc3.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    margin-bottom: 3rem;
    margin-top: 3rem;
    width: 6rem;
    height: 3.4rem;
    pointer-events: all;
    border-radius: 10px;
    box-shadow: 0 0 10px #ff14b1c0;
    font-weight: bolder;
    font-size: 1.1rem;
    animation: pulseShadow2 3.2s ease-in-out infinite;
}

@keyframes pulseShadow2 {
    0%, 100% {
        box-shadow: 0 0 6px #ff14b1c0;
scale: 1;
opacity: 0.8;
    }
    50% {
        box-shadow: 0 0 14px #ff14b1c0;
scale: 1.02;
opacity: 1;
    }
}

#kops {
    display: none;
    visibility: hidden;
}

}

@media screen and (min-width: 641px) and (min-height: 1001px) {
    body, html, div, .game-container  {
        display: none;
        visibility: hidden;
    }
}


@media screen and (min-width: 641px) and (orientation: landscape){
    body, html, div, .game-container  {
        display: none;
        visibility: hidden;
    }
    #kops {
        visibility: visible;
        display: flex;
        color: #000000;
        font-size: 1.3rem;
        text-align: center;
width: 100vw;
flex-direction: column;
    }
}