html, body {
    display: flex;
    justify-content: center;
     margin: 0;
     padding: 0;
     height: 80dvh;
     width:100svw;
}

body {
    background-color:lightblue;
}

.mainGrid {    
    display: grid;
    grid-template-columns: 3fr 1fr;
    width:100svw;
    max-width: 2000px;    
    gap: 5px;
    box-sizing: border-box;
}

#rightWing {
    display: grid;
    grid-template-rows:
       1fr
       minmax(180px, auto);   
    gap: 5px;
    height: calc(100svh -10px);  
}

#leftWing {
    display:grid;
    grid-template-rows: 
        auto
        auto
        1fr 
        minmax(80px, 95px);
    gap: 5px; 
    height: calc(100svh -10px);  
}

#instructions {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #3171b0;        
    border-radius: 10px;
    margin-left: 2px;
    margin-top: 5px;    
}

#blocks {
    width:100px;
    height: 80px;
    margin-top:5px;
}

#title-instructions {
    text-align: center;    
    color: blue;
    font-size: 1.5rem;
    line-height: 0.9;
}

#mainText {
    margin-left: 10px; 
    margin-top: 4px;   
    font-size: 0.8rem;
    font-weight: bold;
    line-height: 1.2;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

#vowelBuying {
    font-size: 1.2rem;
    color: #3171b0;
    font-weight: bold;
}

#vowel-section {
    margin-left: 10px;    
    font-size: 0.8rem;
    font-weight: bold;
    line-height: 1.2;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

#replaceRow {
    font-size: 1.2rem;
    color: #3171b0;
    font-weight: bold;
}

#replace-section {
    margin-left: 10px;    
    font-size: 0.8rem;
    font-weight: bold;
    line-height: 1.2;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

#ending {
 font-size: 1.2rem;
    color: #3171b0;
    font-weight: bold;
    text-align: center;
}

#ending-section {
    margin-left: 10px;    
    font-size: 0.8rem;
    font-weight: bold;
    line-height: 1.2;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

#instructions-label {
    font-size: 0.9rem;
    font-weight:bold;
    color: white;
    margin-top: 5px;
}

#writingPad {
   width: 90%;
   height: 92%;   
   background-color:white;
   border-radius: 8px;
   margin-top: 6px;
}

#scoreboard {
    width: 99%;    
    display: flex;
    flex-direction: column;
    justify-items: left;    
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    background-color:#3171b0;
    background: linear-gradient(145deg, #3873af, #4995e1);
    box-shadow: inset 3px 3px 6px #4287cd, inset -3px -3px 6px #70b6fd;
    border-radius: 10px;
    margin-left: 4px;
}

#hiScoreLbl {   
    color: white;
    font-size: 1.4rem;
    margin-top: 6px; 
    margin-left: 30px; 
    margin-right: 6px;    
}

#hiScore_Value {    
    color: black;
    font-size: 1rem;   
    width: 60px;
    height: 28px;
}

#hiScorerLbl {
    color: white;
    font-size: 1.4rem;
    margin-top: 6px; 
    margin-left: 30px; 
    margin-right: 6px;    
}

#hiScorer {  
    color: black;
    font-size: 1rem;  
    width: 60px;
    height: 28px;
}

#mostWordsLbl {
    color: white;
    font-size: 1.4rem;   
    margin-top: 6px;
    margin-left: 30px;  
    margin-right: 6px;   
}

#mostWords {
    color: black;
    font-size: 1rem;   
    width: 60px;
    height: 28px;
}

#wordMasterLbl {
    color: white;
    font-size: 1.4rem;
    margin-top: 8px;
    margin-left: 30px;  
    margin-right: 6px;   
}

#wordMaster {
    color: black;
    font-size: 1rem;   
    width: 60px;
    height: 28px;
}

#titleBar {     
    margin-top: 5px;
    display: flex;
    flex-direction: row;   
    border-radius: 9px;
    background: #3dc2b9;
    border-radius: 10px;
    padding: 0px;
    box-shadow:
        4px 4px 10px rgba(0,0,0,0.4),    /* outer shadow (right/bottom) */
        -4px -4px 10px rgba(255,255,255,0.7),  /* outer highlight (top/left) */
        inset 2px 2px 5px rgba(0,0,0,0.3),  /* inner shadow */
        inset -2px -2px 5px rgba(255,255,255,0.5); /* inner highlight */
}

#titleBar > div {
    flex: 1;
}

#title {
    display: flex;
    font-size: 2rem;
    justify-content: center;
    text-align: center;
    margin-top: 8px;
}



#messageToPlayers {
    color:yellow;
    font-size: 0.8rem;
    margin-left: 20px;
    margin-top:26px;
    margin-bottom: 0px;
} 

#secondWord {
    margin-top: 10px;
}

#thirdWord {
    margin-top: 5px;
    color:rgb(245, 188, 83);
    font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-size: 2.5rem;
}

#info-line {
    display: flex;
    flex-direction:column;    
}

#messageToPlayers {
    color:yellow;
    font-size: 0.8rem;
    margin-left: 20px;
    margin-top:26px;
    margin-bottom: 0px;
} 

#firstWord {
    color:#3171b0;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    margin-top: 12px;   
}

#resetGame {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

#startBtn {
     border-radius: 8px;
     cursor: pointer;
     background-color: rgb(0, 110, 255);     
     text-align: center;     
     color: white;  
     width: 200px;
     height: 34px;
     margin-top: 10px;
     margin-left: 20px;
}

#startBtn:disabled {
    background-color: dimgray;
    color: darkgrey;
    opacity: 0.4;
}

#wordBar {
    display: flex; 
    background-color: #3171b0;
    border-radius: 9px;
}

#letterBoard {
    height: 100%;
    min-height: 300px;
    overflow: hidden;
    display: grid;
    border-style:double;
    border-width: 4px;
    border-color:#3171b0;
    border-radius: 9px;
    display: grid;
    grid-template-columns: repeat(12, 70px);
    grid-auto-rows: 70px;   
    gap: 8px;    
    justify-content: center;  
    align-content: center;
    background-color: grey;   
}

.grid-btn {
    width: 70px;
    height: 70px;    
    cursor: pointer;
    background-color: #3dc2b9;
    border-radius: 6px;    
}

.grid-btn, .cell {
    display: flex;
    flex-direction: column;   /* stack vertically */
    justify-content: center;
    align-items: center;
    background: steelblue;
    color: white;
    border-radius: 6px;
    padding: 4px;
    font-family: Georgia, serif;
    min-width: 32px;
    min-height: 32px;
}

.grid-btn .letter {
    font-size: 1.6em;
    font-weight: bold;
}

.cell .letter {
    font-size: 1.6em;
    font-weight: bold;
    color: black;
}

.grid-btn .value {
    font-size: 0.7em;
    opacity: 0.8;
}

.cell .value {
    font-size: 0.7em;
    opacity: 0.8;
    color:black;
}

.cell {
  width: 70px;
  height: 70px;
  background: #eee;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.displayLetters {
    flex: 65%;
    display: flex;   
    align-items: center;
    justify-content: center;
    gap: 7px;       
}

#letter1, #letter2, #letter3, #letter4, #letter5, #letter6, #letter7, #letter8 {
    width: 80px;
    height: 110px;
    background-color: white; 
    justify-items: center;  
    text-align: center;
    color: black;
    border-radius: 6px;
    font-size: 5rem;
    margin-left: 5px;   
}

#arrow-section {
  flex: 15%; 
   display: flex; 
   flex-direction: column;
   justify-content: center; 
   align-items: center;
   background: linear-gradient(145deg, #477baf, #66a4e2);
   box-shadow: inset 3px 3px 6px #277acc, inset -3px -3px 6px #70b6fd; 
   border-radius: 10px;
   text-align: center; 
}

#icon-button {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 12px;
  background: red;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

#icon-button:disabled { 
    background-color: rgb(247, 139, 139);   
    opacity: 0.7;
}

#button-text {
    color: white;
    font-style: bold;
    font-size: 0.8;
}

.arrow-box::before {  
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 14px solid black; /* arrow color */
}

#vowelColumn {
    flex: 20%;
    display: grid;
    grid-template-rows: 0.3fr 1fr;
    justify-content: center;
}

#vowelLbl {
    color: white;
    text-align: center;
    font-size: 0.7rem;
    margin-top: 6px;
}

#useVowel {
    display: flex;
    align-items: center;
    justify-content: center;
    width:85px;
    height: 75px;
    background-color:#3dc2b9;     
     border-radius: 8px;
     box-shadow:
        4px 4px 10px rgba(0,0,0,0.4),    /* outer shadow (right/bottom) */
        -4px -4px 10px rgba(255,255,255,0.7),  /* outer highlight (top/left) */
        inset 2px 2px 5px rgba(0,0,0,0.3),  /* inner shadow */
        inset -2px -2px 5px rgba(255,255,255,0.5); /* inner highlight */     
     margin-top: 6px;    
     font-size: 4rem;
     color: yellow;
}

#useVowel:disabled {
     background-color:white;
     color: black;
     opacity: 0.4;
     box-shadow:
        inset 3px 3px 6px rgba(0,0,0,0.3),     /* inner dark edge */
        inset -3px -3px 6px rgba(255,255,255,0.6); /* inner highlight */
}

#informationBar {
    display:grid;
    grid-template-columns: 2.5fr 0.5fr 1fr;
    border-radius: 9px;
    background: rgb(245, 188, 83);
    border-radius: 10px;
    gap: 8px;
    box-shadow:
        4px 4px 10px rgba(0,0,0,0.4),    /* outer shadow (right/bottom) */
        -4px -4px 10px rgba(255,255,255,0.7),  /* outer highlight (top/left) */
        inset 2px 2px 5px rgba(0,0,0,0.3),  /* inner shadow */
        inset -2px -2px 5px rgba(255,255,255,0.5); /* inner highlight */   
}

#gameInfo {
    flex-basis: 65%;
    margin-left: 8px;     
}

#infoPanel {  
    display: flex;
    flex-direction: row;  
    justify-content: space-evenly;      
    width: 95%;
    height:75%;
    background-color:#3dc2b9;
    border-radius: 8px;
    margin-top: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;  /* label above input */
    align-items:center;     /* center align if desired */
}

#wordsFormed {    
    color:yellow;
    font-size: 1.2rem; 
    font-weight: bold; 
    margin-top: 12px; 
    margin-right: 4px;
}

#formedNumber {
  width: 50px;
  height: 30px;
  color:red;
  font-weight: bold;
  text-align: center;
  margin-top: 8px;
}

#lastWord {  
  color: white;
  font-size: 1.2rem; 
  font-weight: bold;
  margin-top: 12px;
  margin-right: 4px;
}

#wordPoints {
    width: 50px;
    height: 30px;
    color:red;
    font-weight: bold;
    text-align: center;
    margin-top: 8px;
}

#gamePointsLbl {
    color: yellow;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 12px;
    margin-right: 4px;
}

#totalPoints {
    width: 50px;
    height: 30px;
    font-weight: bold;  
    text-align: center;
    margin-top: 8px;
}

#submit-area {
    flex-basis: 15%; 
    height: 75px;   
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 7px;
    border-color:black;
    border-width: 2px;
    border-style: double;
    background-color: #70b6fd;
    margin-top: 9px;
}

#submitWord {    
     border-radius: 12px;
     cursor: pointer;
     background-color: rgb(0, 110, 255);     
     text-align: center;     
     color: yellow;  
     width: 150px;
     height: 40px;
     font-weight:bold    
}

#submitWord:disabled {
     background-color: grey;  
     color: black;
     opacity: 0.4;
     cursor: not-allowed;
}

#gameOptions {
    flex-basis: 30%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

#buyVowel {
    border-radius: 8px;
     cursor: pointer;
     background-color: rgb(0, 110, 255); 
     align-items: center;
     text-align: center;
     color: white;  
     width: 225px;
     height: 32px;
     margin-top: 7px;
     margin-left: 20px;
}

#buyVowel:disabled {
     background-color: rgb(98, 100, 101); 
     color: black;
     opacity: 0.4;
}

#renewTopRow {
    border-radius: 8px;
    cursor: pointer;
    background-color: rgb(0, 110, 255); 
    align-items: center;
    text-align: center;
    color: yellow;  
    width: 225px;
    height: 32px;
    margin-top: 6px;
    margin-left: 20px;
}

#renewTopRow:disabled {
     background-color: rgb(98, 100, 101); 
     color:black;
     opacity: 0.4;
}

#blankButton {
    width: 10px;
    height: 20px;
}

#exitGame {
    border-radius: 8px;
    cursor: pointer;
    background-color: rgb(0, 110, 255); 
    align-items: center;
    text-align: center;
    color: white;  
    width: 160px;
    height: 32px;
    margin-top: 10px;
    margin-right: 20px;
    margin-left: 10px;
}

#blankButton {
    width: 10px;
    height: 20px;
}

#endCurrentGame {
     border-radius: 8px;
     cursor: pointer;
     background-color: rgb(0, 110, 255); 
     align-items: center;
     text-align: center;
     color: white;  
     width: 200px;
     height: 32px;
     margin-top: 10px;
     margin-right: 30px;
}

#endCurrentGame:disabled  {
     background-color: rgb(98, 100, 101); 
     color: black;
     opacity:0.4;
}

.flash {
    animation: flashAnim 0.8s linear infinite;
}

@keyframes flashAnim {
    0%  { opacity: 1; }
    50%  { opacity: 0.2; }
    100%  { opacity: 1; }
}

#vowelDialog {  
   width: 400px;
   height: 250px;
   gap: 10px;
}

#vowelDialog[open] {
    display: flex;
    flex-direction: column;
}

#vowel-message {
    color: blue;
    font-size: 1.5rem;
}

.vowel-btn {
   width: 50px;
   height: 50px;
   border-radius: 8px;
   cursor: pointer;
   background-color: rgb(0, 110, 255); 
   align-items: center;
   text-align: center;
   color: yellow; 
   font-size: 1.2rem;  
   font-weight:bold; 
}

#cancelVowel {
    width: 268px;
    border-radius: 8px;
    cursor: pointer;
    background-color: rgb(0, 110, 255); 
    align-items: center;
    text-align: center;
    color: white;      
    height: 32px;
    margin-top: 6px;    
}

#hiScoreDialog {
    width: 400px;
    height: 300px;
    border-radius: 10px;
    border-width: 6px;
    border-style:double;
    border-color:rgb(245, 188, 83);
    background-color: #70b6fd ;
}

#score-dialog-headline {
    color: yellow;
    font-size: 1.5rem;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    font-weight: bold;
}

#enter-initials {
    width: 50px;
    height: 30px; 
    color:red; 
    margin-top: 20px; 
    font-weight: bold; 
}

#okBTN {
    border-radius: 8px;
    cursor: pointer;
    background-color: rgb(0, 110, 255); 
    align-items: center;
    text-align: center;
    color: white;  
    width: 70px;
    height: 32px;
    margin-top: 20px;  
}