.dark-mode  {
    background: #1a1a1a;
    color: #e0e0e0;
}
.color-blind-mode body {
    background: #ffffff;
}
.tool-section {
    position: relative;
    padding-bottom: 40px;
}
.left-section-img {
    position: absolute;
    left: 0;
    top: 50%;
    z-index: -1;
    width: 200px;
    height: 400px;
    opacity: 0;
    animation: fadeInSide 0.5s ease-out 0.5s forwards;
}
.right-section-img {
    position: absolute;
    right: 0;
    top: 30%;
    z-index: -1;
    width: 200px;
    height: 400px;
    opacity: 0;
    animation: fadeInSide 0.5s ease-out 0.5s forwards;
}
@keyframes fadeInSide {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
     gap: 2px;
}
.tool-grid {
    display: grid;
    grid-template-rows: repeat(6, 60px);
    margin-bottom: 0px;
}
.tool-row {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    flex-wrap: wrap;
}
.tile {
    border: 1px solid #EAEDF5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    max-width: 50px !important;
    max-height: 50px !important;
    color: #2C363D;
    background-color: #fff;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.dark-mode .tile {
    background-color: #2C363D;
    color: #e0e0e0;
    border-color: #555;
}
.color-blind-mode .tile {
    border: 2px solid #000000;
    background-color: #ffffff;
    color: #000000;
}
.tile.filled {
    border-color: #56B836;
    animation: hint-pop 0.2s ease-out;
}
@keyframes hint-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.tile.correct {
    background-color: #56B836;
    color: white;
    border-color: #56B836;
}
.color-blind-mode .tile.correct {
    border-color: #000000;
}
.popup p{
    text-align: left;
    margin: 0;
}
.tile.present {
    background-color: #F3C238;
    color: white;
    border-color: #F3C238;
}
.color-blind-mode .tile.present {
    background-color: #ff8c00;
    border-color: #000000;
    color: #000000;
}
.tile.absent {
    background-color: #565E64;
    color: white;
    border-color: #565E64;
}
.dark-mode .tile.absent {
    background-color: #6f6f6f;
    border-color: #6f6f6f;
}
.color-blind-mode .tile.absent {
    background-color: #d3d3d3;
    border-color: #000000;
    color: #000000;
}
.tile.flip {
    animation: flip 0.3s ease forwards;
}
@keyframes flip {
    0% { transform: rotateX(0); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}
.keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
  flex-wrap: nowrap;
  }  
  .key {
    padding: 10px 0px;
    font-size: 16px;
    text-transform: uppercase;
    background-color: #F2F2F2;
    border: none;
    height: 40px;
    min-width: 54px;
    width: 100%;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    color: #2C363D;
    transition: background-color 0.3s, color 0.3s;
  }
.dark-mode .key {
    background-color: #444;
    color: #e0e0e0;
}
.color-blind-mode .key {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}
.key:hover {
    background-color: #ebebeb;
}
.dark-mode .key:hover {
    background-color: #555;
}
.color-blind-mode .key:hover {
    background-color: #e0e0e0;
}
.key.correct {
    background-color: #56B836;
    color: white;
}
.color-blind-mode .key.correct {
    border-color: #000000;
}
.key.present {
    background-color: #F3C238;
    color: white;
}
.color-blind-mode .key.present {
    background-color: #ff8c00;
    color: #000000;
    border-color: #000000;
}
.key.absent {
    background-color: #787c7e;
    color: white;
}
.dark-mode .key.absent {
    background-color: #6f6f6f;
}
.color-blind-mode .key.absent {
    background-color: #d3d3d3;
    color: #000000;
    border-color: #000000;
}
.hint-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px auto 0;
    padding: 12px 24px;
    background-color: #2C363D;
    color: white;
    border: 2px solid #2C363D;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.hint-button:hover {
    background-color: #3d4854;
    border-color: #3d4854;
    transform: scale(1.05);
}
.hint-button:active {
    transform: scale(0.95);
}
.hint-button:disabled {
    background-color: #787c7e;
    border-color: #787c7e;
    cursor: not-allowed;
    opacity: 0.6;
}
.dark-mode .hint-button {
    background-color: #444;
    border-color: #444;
}
.dark-mode .hint-button:hover {
    background-color: #555;
    border-color: #555;
}
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border: 1px solid #2C363D;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 9999;
    max-width: 600px;
    text-align: center;
    max-height: 90vh;
    overflow: auto;
    border-radius: 10px;
    transition: background-color 0.3s, color 0.3s;
}
.dark-mode .popup {
    background-color: #2C363D;
    border-color: #555;
    color: #e0e0e0;
}
.color-blind-mode .popup {
    border: 2px solid #000000;
}
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.popup-header h2 {
    margin: 0;
    font-size: 28px;
    text-transform: uppercase;
}
.popup-header button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #2C363D;
}
.dark-mode .popup-header button {
    color: #e0e0e0;
}
.color-blind-mode .popup-header button {
    border: 1px solid #000000;
    padding: 2px 8px;
    border-radius: 5px;
}
.popup button {
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    background-color: #f0f0f0;
    color: #2C363D;
    font-size: 14px;
}
.dark-mode .popup button {
    background-color: #444 !important;
    color: #e0e0e0 !important;
}
.color-blind-mode .popup button {
    border: 2px solid #000000;
}
.popup button:not(.share-button) {
       font-size: 22px;
       border: 1px solid #2C363D;
       padding: 0 5px;
       background-color: #fff;
}
.stats-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        margin: 20px 0;
        text-align: center;
}
.stats-grid div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.stats-grid div span:first-child {
    font-size: 48px;
    font-weight: 700;
    color: #2C363D;
}
.dark-mode .stats-grid div span:first-child {
    color: #e0e0e0;
}
.stats-grid div span:last-child {
    font-size: 14px;
    text-transform: uppercase;
    color: #565E64;
}
.dark-mode .stats-grid div span:last-child {
    color: #bbb;
}
.color-blind-mode .stats-grid div span:last-child {
    color: #000000;
}
.guess-distribution {
    margin-top: 20px;
    text-align: left;
}
.guess-distribution h3 {
    font-size: 16px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 10px;
    color: #2C363D;
}
.dark-mode .guess-distribution h3 {
    color: #e0e0e0;
}
.color-blind-mode .guess-distribution h3 {
    color: #000000;
}
.guess-distribution .distribution-row {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.guess-distribution .distribution-row span:first-child {
    width: 20px;
    font-size: 14px;
    color: #2C363D;
}
.dark-mode .guess-distribution .distribution-row span:first-child {
    color: #e0e0e0;
}
.color-blind-mode .guess-distribution .distribution-row span:first-child {
    color: #000000;
}
.guess-distribution .bar-container {
    flex: 1;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 10px;
    position: relative;
}
.dark-mode .guess-distribution .bar-container {
    background-color: #555;
}
.color-blind-mode .guess-distribution .bar-container {
    background-color: #d3d3d3;
    border: 1px solid #000000;
}
.guess-distribution .bar {
    height: 100%;
    background-color: #6aaa64;
    transition: width 0.3s ease;
    position: relative;
}
.color-blind-mode .guess-distribution .bar {
    background-color: #1e90ff;
}
.guess-distribution .bar::after {
    content: attr(data-percentage) "%";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: none;
}
.guess-distribution .bar.wide-enough::after {
    display: block;
}
.guess-distribution .distribution-row span:last-child {
    width: 30px;
    font-size: 14px;
    color: #2C363D;
}
.dark-mode .guess-distribution .distribution-row span:last-child {
    color: #e0e0e0;
}
.color-blind-mode .guess-distribution .distribution-row span:last-child {
    color: #000000;
}
.share-button {
    margin-top: 20px !important;
    color: #000000 !important;
    background-color: #fff !important;
    cursor: pointer;
    font-size: 16px !important;
    text-transform: uppercase !important;
}
.dark-mode .share-button {
    background-color: #5a944e;
}
.color-blind-mode .share-button {
    background-color: #1e90ff;
    border: 2px solid #000000;
    color: #ffffff;
}
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.color-blind-mode .overlay {
    background: rgba(0,0,0,0.8);
}
.nav-buttons {
    top: 10px;
    right: 100px;
    display: flex;
    justify-content: end;
    position: absolute;
}
.nav-buttons img {
    cursor: pointer;
}
.key-enter,
.key-backspace {
  background-color: #2C363D !important;
  color: #FFFFFF !important;
  padding: 10px 13px !important;
  width: auto;
}
.key-enter{
    min-width: 90px !important;
}
.key-backspace{
    min-width: 80px !important;
}
.dark-mode .key-backspace, .dark-mode .key-enter {
    background-color: #555 !important;
}
.color-blind-mode .key-backspace, .color-blind-mode .key-enter {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff;
}

#settings p {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0 5px;
    color: #2C363D;
}
.dark-mode #settings p {
    color: #e0e0e0;
}
.color-blind-mode #settings p {
    color: #000000;
}
#settings .letter-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-bottom: 20px;
}
#settings .letter-buttons button {
    padding: 10px 20px;
    min-width: 80px;
    height: auto;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}
.dark-mode #settings .letter-buttons button {
    background-color: #444;
    border-color: #2C363D;
    color: #e0e0e0;
    
}
.color-blind-mode #settings .letter-buttons button {
    background-color: #ffffff;
    border: 2px solid #000000;
    color: #000000;
}
#settings .letter-buttons button.active {
    background-color: #6aaa64 !important;
    color: white;
    border-color: #6aaa64;
}
.color-blind-mode #settings .letter-buttons button.active {
    background-color: #1e90ff;
    border-color: #000000;
    color: #ffffff;
}
#settings .setting-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    gap: 10px;
}
#settings .setting-option label {
    font-size: 16px;
    font-weight: bold;
    color: #2C363D;
    display: flex;
}
.dark-mode #settings .setting-option label {
    color: #e0e0e0;
}

#settings .setting-option p {
    font-size: 14px;
    font-weight: normal;
    margin: 5px 0 0;
    color: #565E64;
    text-align: left;
}
.dark-mode #settings .setting-option p {
    color: #bbb;
}

#settings .setting-option input[type="checkbox"] {
    display: none;
}
#settings .setting-option .toggle-switch {
    position: relative;
    width: 50px;
    min-width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.color-blind-mode #settings .setting-option .toggle-switch {
    background-color: #d3d3d3;
    border: 2px solid #000000;
}
#settings .setting-option .toggle-switch::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}
#settings .setting-option input[type="checkbox"]:checked + .toggle-switch {
    background-color: #6aaa64;
}
.color-blind-mode #settings .setting-option input[type="checkbox"]:checked + .toggle-switch {
    background-color: #1e90ff;
    border-color: #000000;
}
#settings .setting-option input[type="checkbox"]:checked + .toggle-switch::before {
    transform: translateX(26px);
}

.popup#lose {
    background-color: #fff;
    border-radius: 12px;
    padding: 0;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

.dark-mode .popup#lose {
    background-color: #2C363D;
}

.color-blind-mode .popup#lose {
    border: 2px solid #000000;
}

.popup#lose .popup-header {
    background-color: #2C363D;
    color: #fff;
    padding: 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .popup#lose .popup-header {
    background-color: #444;
}

.color-blind-mode .popup#lose .popup-header {
    border-bottom: 2px solid #ffffff;
}

.popup#lose .popup-header h3 {
    font-size: 20px;
    margin: 0;
}

.popup#lose .popup-header button {
    background: none;
    border: 1px solid #fff;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
}

.dark-mode .popup#lose .popup-header button {
    color: #e0e0e0;
}

.color-blind-mode .popup#lose .popup-header button {
    border: 1px solid #ffffff;
    padding: 2px 8px;
    border-radius: 5px;
}

.popup#lose .popup-grid {
    margin: 20px auto;
    display: flex !important;
    grid-template-rows: unset !important;
    justify-content: center;
    gap: 5px;
    width: 95%;
    flex-shrink: 0;
    height: auto !important;
    min-height: auto !important;
}

.popup#lose .popup-grid .tile {
    width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    flex-shrink: 0;
    font-size: 16px;
    line-height: 30px;
    background-color: #56B836;
    color: white;
    border-color: #56B836;
}

.color-blind-mode .popup#lose .popup-grid .tile {
    background-color: #1e90ff;
    border-color: #000000;
    color: #ffffff;
}

.popup#lose .popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    align-items: center;
}

.popup#lose .popup-buttons button {
    width: 226px;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.popup#lose .reveal-button {
    background-color: #2C363D;
    color: #fff;
}

.dark-mode .popup#lose .reveal-button {
    background-color: #555;
}

.color-blind-mode .popup#lose .reveal-button {
    border: 2px solid #ffffff;
}

.popup#lose .play-again-button {
    background-color: #28a745;
    color: #fff;
}

.dark-mode .popup#lose .play-again-button {
    background-color: #5a944e;
}

.color-blind-mode .popup#lose .play-again-button {
    background-color: #1e90ff;
    border: 2px solid #000000;
}

.popup#lose .download-button {
    background-color: #f0f0f0;
    color: #2C363D;
}

.dark-mode .popup#lose .download-button , .dark-mode .popup#win .popup-buttons .download-button{
    background-color: #444;
    color: #e0e0e0;
}

.color-blind-mode .popup#lose .download-button , .color-blind-mode .popup#win .popup-buttons .download-button {
    border: 2px solid #000000;
}
.popup#win {
    background-color: #fff;
    border-radius: 12px;
    padding: 0;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
}

.dark-mode .popup#win {
    background-color: #2C363D;
}

.color-blind-mode .popup#win {
    border: 2px solid #000000;
}

.popup#win .popup-header {
    background-color: #2C363D;
    color: #fff;
    padding: 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .popup#win .popup-header {
    background-color: #444;
}

.color-blind-mode .popup#win .popup-header {
    border-bottom: 2px solid #ffffff;
}

.popup#win .popup-header h2 {
    margin: 0;
    font-size: 28px;
    text-transform: uppercase;
}

.popup#win .popup-header button {
    background: none;
    border: 1px solid #fff;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
}

.dark-mode .popup#win .popup-header button {
    color: #e0e0e0;
}

.color-blind-mode .popup#win .popup-header button {
    border: 1px solid #ffffff;
    padding: 2px 8px;
    border-radius: 5px;
}

.popup#win .popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    align-items: center;
}

.popup#win .popup-buttons .play-again-button {
    background-color: #28a745;
    color: #fff;
    width: 226px;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dark-mode .popup#win .popup-buttons .play-again-button {
    background-color: #5a944e;
}

.color-blind-mode .popup#win .popup-buttons .play-again-button {
    background-color: #1e90ff;
    border: 2px solid #000000;
}



.popup#win .popup-buttons .copy-button {
    background-color: #f0f0f0;
    color: #2C363D;
    width: 226px;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dark-mode .popup#win .popup-buttons .copy-button {
    background-color: #444;
    color: #e0e0e0;
}

.color-blind-mode .popup#win .popup-buttons .copy-button {
    border: 2px solid #000000;
}

.popup#win .popup-buttons .download-button {
    background-color: #f0f0f0;
    color: #2C363D;
    width: 226px;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.3);
    background-color: #2C363D;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    font-size: 16px;
    z-index: 1000;
    transition: transform 0.05s ease-out, opacity 0.05s ease-out;
    cursor: pointer;
    opacity: 0;
    display: none;
}

.custom-alert.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    display: block;
}

.custom-alert:hover {
    background-color: #444;
}

body.dark-mode .custom-alert {
    background-color: #444;
}

body.dark-mode .custom-alert:hover {
    background-color: #555;
}

/* Hint Popup */
.popup#hint-popup {
    background-color: #fff;
    border-radius: 10px;
    padding: 0;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.dark-mode .popup#hint-popup {
    background-color: #1E1E1E;
}

.popup#hint-popup .popup-header {
    background-color: #2C363D;
    color: #fff;
    padding: 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .popup#hint-popup .popup-header {
    background-color: #444;
}

.popup#hint-popup .popup-header h3 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff !important;
}

.popup#hint-popup .popup-header button {
    background: none;
    border: 2px solid #fff;
    font-size: 18px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
}

.popup#hint-popup .popup-header button:hover {
    transform: scale(1.15) rotate(90deg);
}

.hint-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 30px 25px 20px;
}

.hint-tile {
    width: 62px;
    height: 62px;
    border: 3px solid #D3D6DA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.dark-mode .hint-tile {
    background: #2C363D;
    border-color: #565E64;
    color: #F1F5F9;
}

.hint-tile.correct {
    background: #6AAA64;
    border-color: #538D4E;
    color: #fff;
}

.hint-tile.present {
    background: #C9B458;
    border-color: #B59F3B;
    color: #fff;
}

.hint-tile.absent {
    background: #787C7E;
    border-color: #5A5C5E;
    color: #fff;
}

.popup#hint-popup .popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 25px 25px;
    align-items: center;
}

.reveal-hint-button {
    background-color: #2C363D;
    color: #fff;
    width: 240px;
    padding: 12px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reveal-hint-button:hover {
    background-color: #3d4854;
    transform: translateY(-3px);
}

.reveal-hint-button:disabled {
    background-color: #787c7e;
    cursor: not-allowed;
    opacity: 0.6;
}

.dark-mode .reveal-hint-button {
    background-color: #444;
}

.dark-mode .reveal-hint-button:hover {
    background-color: #555;
}

.popup#win .popup-buttons .share-button {
    background-color: #2C363D !important;
    color: #fff !important;
    width: 226px;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 5px !important;
}

.dark-mode .popup#win .popup-buttons .share-button {
    background-color: #444 !important;
}

.color-blind-mode .popup#win .popup-buttons .share-button {
    border: 2px solid #000000;
}
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, #ff6f61, #ffeb3b, #4caf50);
    animation: fall 3s linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.win-message {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    border-radius: 5px;
    background-color: #565E64;
    padding: 8px 16px;
    animation: fadeInOut 3s forwards;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.play-again-button {
    display: block;
    margin: 0 auto;
    padding: 8px 20px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #2C363D;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.play-again-button:hover {
    background-color: #45a049;
}
@media screen and (max-width: 1024px) {
    .nav-buttons {
     right: 50px;
    }
}
@media screen and (max-width: 768px) {
        .keyboard {
            display: grid;
            grid-template-columns: repeat(6, 1fr); 
            gap: 6px;
            justify-content: center;
            padding: 0 10px;
          }
        
          .keyboard-row {
            display: contents;
          }
        
          .key {
            min-width: 0;
            width: 100%;
            height: 38px;
            font-size: 14px;
            padding: 6px 0;
          }
        
          .key-enter,
          .key-backspace {
            grid-column: span 2;
            font-size: 13px;
            padding: 6px 8px !important;
          }
      
    .popup {
        width: 280px;
    }
    .nav-buttons {
        position: relative;
       }
}
@media screen and (max-width: 320px) {
    .container {
        padding: 5px;
    }
    .popup {
        width: 260px;
    }
    #settings .letter-buttons button {
        padding: 8px 15px;
        min-width: 70px;
        font-size: 12px;
    }
    #settings .setting-option label {
        font-size: 14px;
    }
    #settings .setting-option p {
        font-size: 12px;
    }
}

/* tool section start ------------------------------------------------ */

.tool-content-section {
    padding: 40px 0;
    background-color: #fff;
}

.dark-mode .tool-content-section {
    background-color: #1a1a1a;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    color: #2C363D;
    margin-bottom: 10px;
}

.dark-mode .section-title {
    color: #e0e0e0;
}

.section-subtitle {
    font-size: 18px;
    color: #2C363D;
    text-align: center;
    margin: 0 auto 40px;
    border-bottom: 1px solid #EAEDF5;
    padding-bottom: 40px;
}

.dark-mode .section-subtitle {
    color: #bbb;
}

.content-block {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.content-block.reverse {
    flex-direction: row-reverse;
}

.content-block .text-block {
    flex: 1;
}

.content-block .text-block h2 {
    font-size: 28px;
    font-weight: bold;
    color: #2C363D;
    margin-bottom: 15px;
}

.dark-mode .content-block .text-block h2 {
    color: #e0e0e0;
}

.content-block .text-block p {
    font-size: 18px;
    color: #2C363D;
    line-height: 1.6;
}

.dark-mode .content-block .text-block p {
    color: #bbb;
}

.content-block .image-block {
    flex: 1;
}

.content-block .image-block img {
    width: max-content;
    height: auto;
    border-radius: 10px;
}

.how-to-play {
    margin-bottom: 60px;
}

.how-to-play h2 {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: #2C363D;
    margin-bottom: 40px;
}

.dark-mode .how-to-play h2 {
    color: #e0e0e0;
}

.step {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.step.reverse {
    flex-direction: row-reverse;
}

.step-text {
    flex: 1;
}

.step-text h3 {
    font-size: 20px;
    font-weight: bold;
    color: #2C363D;
    margin-bottom: 10px;
}

.dark-mode .step-text h3 {
    color: #e0e0e0;
}

.step-text p {
    font-size: 18px;
    color: #2C363D;
    line-height: 1.6;
}

.dark-mode .step-text p {
    color: #bbb;
}

.step-image {
    flex: 1;
}

.step-image img {
    width: max-content;
    height: auto;
    border-radius: 10px;
}


@media screen and (max-width: 768px) {
    .content-block, .step {
        flex-direction: column;
        gap: 20px;
    }
    .step-image img  , .content-block .image-block img {
        max-width: 250px;
        width: 100%;
    }
    .content-block.reverse, .step.reverse {
        flex-direction: column;
    }

    .section-title {
        font-size: 28px;
    }

    .content-block .text-block h2, .how-to-play h2, .tips h2 {
        font-size: 24px;
    }

    .step-text h3 {
        font-size: 18px;
    }


    
}

@media screen and (max-width: 320px) {
    .tool-content-section {
        padding: 20px 0;
    }

}

.benefits-tips {
    background-color: #2C363D;
    padding: 40px 0;
    border-radius: 0;
    position: relative;
}

.benefits-tips .left-section-img , .benefits-tips .right-section-img{
z-index: 0 !important;
} 

.benefits-tips .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.benefits-tips-content {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
}

.benefits, .tips {
    flex: 1;
    padding: 20px;
    border-radius: 10px;
}

.benefits h2, .tips h2 {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    text-align: left;
}

.benefits ul, .tips ul {
    list-style: none;
    padding: 0;
}

.benefits ul li, .tips ul li {
    font-size: 18px;
    color: #ede9e9;
    line-height: 1.6;
    margin-bottom: 15px;
    background-color: #565d63;
    border-radius: 12px;
    position: relative;
    padding: 30px 10px;
}
.benifits-left{
    border-right: 1px solid #FFFFFF33;
    padding-right: 30px;
    border-radius: 0;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -ms-border-radius: 0;
    -o-border-radius: 0;
}
.benefits ul li strong {
    color: #fff;
}

.popularity-section {
    background-color: #fff;
    padding: 20px;
    text-align: center;
    margin-bottom: 0px;
    border-radius: 10px;
}

.dark-mode .popularity-section {
    background-color: #1a1a1a;
}

.popularity-section h2 {
    font-size: 28px;
    font-weight: bold;
    color: #2C363D;
    margin-bottom: 20px;
    text-align: left !important;
}

.dark-mode .popularity-section h2 {
    color: #e0e0e0;
}
.popularity-section p{
    text-align: left !important;
}
.dark-mode .popularity-section p {
    color: #bbb;
}

.trophy-image img {
    width: 150px;
    height: auto;
}

.faq-section {
    background-color: #fff;
    padding: 40px 20px;
    border-radius: 10px;
}

.dark-mode .faq-section {
    background-color: #1a1a1a;
}

.faq-section h2 {
    font-size: 28px;
    font-weight: bold;
    color: #2C363D;
    margin-bottom: 20px;
    text-align: center;
}

.dark-mode .faq-section h2 {
    color: #e0e0e0;
}

.faq-section ul {
    list-style: none;
    padding: 0;
}

.faq-section ul li {
    font-size: 18px;
    color: #2C363D;
    line-height: 1.6;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dark-mode .faq-section ul li {
    color: #bbb;
}

.dark-mode .faq-section ul li::before {
    color: #e0e0e0;
}

.faq-section ul li strong {
    color: #2C363D;
    font-weight: bold;
}

.dark-mode .faq-section ul li strong {
    color: #e0e0e0;
}

@media screen and (max-width: 768px) {
    .benefits-tips-content {
        flex-direction: column;
    }

    .benefits, .tips {
        padding: 15px;
    }

    .popularity-section, .faq-section {
        padding: 20px;
    }

    .popularity-section h2, .faq-section h2 {
        font-size: 20px;
    }


    .trophy-image img {
        width: 100px;
    }
}

@media screen and (max-width: 320px) {
    .benefits-tips {
        padding: 20px 0;
    }

    .benefits, .tips {
        padding: 10px;
    }

    .popularity-section, .faq-section {
        padding: 15px;
    }

    .popularity-section h2, .faq-section h2 {
        font-size: 18px;
    }

    .trophy-image img {
        width: 80px;
    }
}