    html, body {
    margin: 0;
    padding: 0;
    }

    /* Main page container */
    body {
        font-family: sans-serif;
        display: flex;
        flex-direction: column;
        align-items: center;
        background-color: #f0f0f0;
    }
    
#focus-letters {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    font-weight: bold;
    }
    #letter-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 10px 0;
    max-width: 600px;
    gap: 5px;
    }
    .letter-box {
    width: 30px;
    height: 30px;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    position: relative;
    background-color: white;
    }
    .locked {
    background: repeating-linear-gradient(45deg, #f88, #f88 5px, #fff 5px, #fff 10px);
    }
    .letter-box:hover .tooltip {
    display: block;
    }
    .tooltip {
    display: none;
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #333;
    padding: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    }
    #text-display {
    font-size: 24px;
    margin: 20px;
    padding: 10px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 5px;
    min-height: 100px;
    font-family: monospace;
    max-width: 90vw;
    word-break: break-word;
    }
    .line {
    display: block;
    margin-bottom: 5px;
    }
    .char {
    display: inline-block;
    position: relative;
    white-space: pre;
    }
    .cursor {
    border-left: 2px solid black;
    animation: blink 1s steps(2, start) infinite;
    }
    @keyframes blink {
    to { border-color: transparent; }
    }
    .correct { color: green; }
    .error { color: red; }
    .fixed { color: goldenrod; }
    .incorrect {
    color: red;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    animation: fadeout 1s forwards;
    }
    @keyframes fadeout {
    to { opacity: 0; transform: translateY(-20px); }
    }
    .keyboard {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 20px auto;
    width: max-content;
    }
    .row {
    display: flex;
    }
    .key {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ddd;
    border-radius: 4px;
    border: 1px solid #999;
    margin: 1px;
    font-size: 14px;
    padding: 2px;
    text-align: center;
    line-height: 1.2;
    user-select: none;
    transition: background 0.1s, color 0.1s;
    height: 40px;
    }
    .key span.shift {
    font-size: 12px;
    color: #555;
    }
    .current {
    background-color: #88f !important;
    color: white;
    }
    .correct-pressed {
    background-color: limegreen !important;

    color: white;
    }
    .incorrect-pressed {
    background-color: crimson !important;
    color: white;
    }
    .size-1 { width: 40px; }
    .size-1-5 { width: 60px; }
    .size-2 { width: 80px; }
    .size-2-25 {width: 90px;}
    .size-2-5 { width: 110px; }
    .size-3 { width: 120px; }
    .size-4 { width: 160px; }
    .size-6 { width: 275px; }

    /* .pressed { background-color: #88f !important; color: white; } */
    #stats {
    margin-top: 20px;
    font-size: 16px;
    }
    #export-btn {
    margin-top: 10px;
    }
    #navbar {
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

#navbar a {
    text-decoration: none;
    color: #007bff;
    font-size: 24px;
    font-weight: bold;
}

#navbar nav button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 10px;
    transition: 0.2s ease;
}

#navbar nav button:hover {
    color: #007bff;
}

/* --------------------------------------------- */
/* SETTINGS POPUP                                */
/* --------------------------------------------- */

#settings-popup {
    display: none; /* controlled in JS */
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#settings-popup .settings-container {
    background: white;
    padding: 20px;
    width: 320px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#close-settings {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #444;
}

#close-settings:hover {
    color: #000;
}

/* (Optional) fade in animation */
#settings-popup .settings-container {
    animation: popupFade 0.15s ease-out;
}

@keyframes popupFade {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* ------------------------------
   LOGIN PAGE LAYOUT
------------------------------ */

.login-body {
    margin: 0;
    background: #fafafa;
    font-family: Arial, sans-serif;
}

.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding-top: 80px;
    text-align: center;
}

.login-title {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.login-sub {
    color: #555;
    margin-bottom: 25px;
    font-size: 1rem;
}

.login-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-input {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
}

.login-main-btn {
    background: #0078ff;
    color: white;
    padding: 12px;
    border: none;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
}

.login-main-btn:hover {
    background: #0069db;
}

.login-secondary-btn {
    background: #e8e8e8;
    color: #333;
    padding: 12px;
    border: none;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
}

.login-secondary-btn:hover {
    background: #dcdcdc;
}

/* Divider between password login and Google login */
.login-divider {
    position: relative;
    text-align: center;
    margin: 10px 0;
}

.login-divider span {
    background: #fff;
    padding: 0 10px;
    color: #666;
    font-size: 0.9rem;
}

.login-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ddd;
    transform: translateY(-50%);
    z-index: -1;
}

/* Google button (official styling) */
.google-btn {
    display: flex;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-appearance: none;
  background-color: WHITE;
  background-image: none;
  border: 1px solid #747775;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: 'Roboto', arial, sans-serif;
  font-size: 14px;
  height: 40px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
  transition: background-color .218s, border-color .218s, box-shadow .218s;
  vertical-align: middle;
  white-space: nowrap;
  width: auto;
  max-width: 400px;
  min-width: min-content;
}

.gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 12px;
  min-width: 20px;
  width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  -webkit-align-items: center;
  align-items: center;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
  -webkit-flex-grow: 1;
  flex-grow: 1;
  font-family: 'Roboto', arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  -webkit-transition: opacity .218s;
  transition: opacity .218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.gsi-material-button:disabled {
  cursor: default;
  background-color: #ffffff61;
  border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents {
  opacity: 38%;
}

.gsi-material-button:disabled .gsi-material-button-icon {
  opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state, 
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
  background-color: #303030;
  opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
  -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
  background-color: #303030;
  opacity: 8%;
}
