  
        :root {
            --bg-color: #ffffff; 
            --content-bg-color: #ffffff;
            --text-color: #1a1a1a;
            --tile-bg: #e0e0e0;
            --tile-selected-bg: #4A4841;
            --border-color: #e0e0e0;
            --button-bg: #EAF6F1;
            --button-hover-bg: #EAF6F1;
            --button-text: #000;
            --disabled-color: #b0b0b0;

            /* Updated Group Colors */
            --group1-bg: #FFE224; /* Yellow */
            --group2-bg: #91D57C; /* Green */
            --group3-bg: #FF7739; /* Orange */
            --group4-bg: #D1A3FF; /* Purple */
        }

        body.dark-mode {
            --bg-color: #121212; 
            --content-bg-color: #1a1a1a;
            --text-color: #e1e1e1;
            --tile-bg: #2e2e2e;
            --tile-selected-bg: #555555;
            --border-color: #444;
            --button-bg: #1a1a1a;
            --button-hover-bg: #1a1a1a;
            --button-text: #fff;
            --disabled-color: #666;
            --group1-bg: #F0D52E;
            --group2-bg: #87C571;
            --group3-bg: #F27037;
            --group4-bg: #C199EC;

        }
        
        
        body.dark-mode .tile { box-shadow: none; }
        html, body {
            height: 100vh;
            overflow: hidden;
            position: relative;
        }

        body {
            font-family: 'Roboto', sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            margin: 0;
            transition: background-color 0.3s, color 0.3s;
            display: flex;
            flex-direction: column;
        }
        
        header {
            width: 100%; padding: 4px 0; border-top: 1px solid var(--border-color);
            border-bottom: 1px solid var(--border-color); margin-top: 0;
            background-color: var(--bg-color); transition: background-color 0.3s, border-color 0.3s;
            position: relative; z-index: 100; flex-shrink: 0;
        }
        
        .header-content-wrapper {
            display: flex; justify-content: space-between; align-items: center;
            width: 100%; max-width: 500px; margin: 0 auto;
            padding: 0 8px 0 16px; box-sizing: border-box;
        }
        
        #root {
            width: 100%; flex: 1; overflow: hidden; max-width: 500px;
            display: flex; flex-direction: column; align-items: center;
            margin: 0 auto; padding: 8px 16px 16px; box-sizing: border-box;
            background-color: var(--content-bg-color); transition: background-color 0.3s;
        }

        .header-back-button {
            display: flex;
            align-items: center;
            cursor: pointer;
            color: var(--text-color);
            text-decoration: none;
            margin-right: 45px;
            flex-shrink: 0;
        }
        .header-content-wrapper h1 {
            font-size: 1rem; font-weight: 500; text-align: left; 
            margin: 0; flex-grow: 1; white-space: nowrap;
            overflow: hidden; text-overflow: ellipsis; 
        }
        .header-content-wrapper .icons { display: flex; gap: 8px; align-items: center; flex-shrink: 0; margin-right: 8px; }
        .header-content-wrapper .icons svg { cursor: pointer; color: var(--text-color); }
        #help-btn {width: 26px; height: 26px; background-color: #91D57C; border-radius: 50%; color: #1a1a1a; display: flex; align-items: center; justify-content: center; }

        main { width: 100%; max-width: 500px; flex: 1; display: flex; flex-direction: column; }
        #game-board { display: flex; flex-direction: column; gap: 10px; }
        #game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; transition: all 0.5s ease-in-out; }
        #solved-groups-container { display: grid; grid-template-columns: repeat(1, 1fr); gap: 10px; margin-bottom: 10px; width: 100%; }
       
        .tile.long-word {
    font-size: clamp(0.7rem, 2.8vw, 0.8rem);
}

.tile {
    background-color: var(--tile-bg);
    border-radius: 8px;
    padding: 20px 5px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease-out, background-color 0.3s, box-shadow 0.2s;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
}

.tile:not(.is-solved):active {
    transform: scale(0.95);
    box-shadow: 1px 1px 3px rgba(180, 160, 130, 0.4);
}
.tile.selected {
    background-color: var(--tile-selected-bg);
    border: none;
    color: #ffffff;
    box-shadow: none;
}
.tile.is-solved {
    cursor: default;
    background-color: var(--tile-bg);
    opacity: 0.8;
}
.tile.is-solved .word-text {
    display: none;
}
.tile.is-solved .goodfour-logo {
    display: block;
    width: 90%;
    height: 90%;
    opacity: 0.4;
    color: var(--text-color);
}

/* Add this rule to your CSS */
.tile.long-word {
    font-size: 0.8rem;
}

.goodfour-logo {
    display: none;
}
.tile.shake {
    animation: shake 0.5s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
#result-title, #result-message {
    text-align: center;
}
        .solved-group {
          border-radius: 8px; padding: 15px; color: #1a1a1a; text-align: center; animation: fadeIn 0.5s ease-in-out;
            min-height: 80px; display: flex; flex-direction: column; justify-content: center; align-items: center;
        }
        .solved-group strong { display: block; font-size: 1rem; font-weight: 700; margin-bottom: 5px; text-transform: uppercase; }
        .solved-group span { font-size: 0.85rem; line-height: 1.3; }
        .solved-group.group-1 { background-color: var(--group1-bg); } .solved-group.group-2 { background-color: var(--group2-bg); }
        .solved-group.group-3 { background-color: var(--group3-bg); } .solved-group.group-4 { background-color: var(--group4-bg); }
        @keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

 /* --- FINAL CIRCULAR BUTTON STYLES (AS PER REQUEST) --- */
.actions-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Provides nice spacing between the circular buttons */
    margin-top: 25px;
    margin-bottom: 10px;
}

/* Base style for all three circular "outline" buttons */
.actions-container button {
    width: 55px;
    height: 55px;
    border-radius: 50%; /* Makes the button a perfect circle */
    background-color: transparent; /* This creates the "outline" effect */
    border: 1px solid var(--text-color); /* Uses the theme's main text color for the border */
    color: var(--text-color); /* Uses the theme's main text color for the icon */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    /* This transition is crucial for the submit button to transform smoothly */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

/* --- Makes the middle submit button larger --- */
#submit-btn {
    width: 65px;
    height: 65px;
}

#submit-btn i {
    font-size: 26px; /* Make the icon slightly larger too */
}

/* Styles the icon inside the button */
.actions-container button i {
    font-size: 22px;
}

/* Hover effect for enabled buttons */
.actions-container button:hover:not(:disabled) {
    transform: scale(1.1);
}

/* Style for any disabled button */
.actions-container button:disabled {
    border-color: var(--disabled-color);
    color: var(--disabled-color);
    cursor: not-allowed;
    background-color: transparent; /* Ensure it stays an outline */
}

#submit-btn.active-submit {
    background-color: var(--text-color); /* Becomes a solid black circle */
    color: var(--bg-color);             /* The checkmark icon inside becomes white */
    border-color: var(--text-color);    /* The border matches the fill color */
    transform: scale(1.1);              /* Makes it "pop" slightly */
} 

#category-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6);
            display: none; justify-content: center; align-items: center; z-index: 1002; opacity: 0; transition: opacity 0.3s ease-in-out;
        }
        #category-overlay.show { display: flex; opacity: 1; }
        .category-card {
            color: #1a1a1a; border-radius: 10px; padding: 25px 30px; width: 90%; max-width: 300px; min-height: 300px; text-align: center; animation: fadeIn 0.4s ease-in-out; display: flex; flex-direction: column; justify-content: center; }
        .category-card-header { font-size: 1.5rem; font-weight: 700; margin-bottom: 35px; }
        .category-card-header .fa-thumbs-up { margin-left: 8px; color: #1a1a1a; }
        .category-card.group-1 { background-color: var(--group1-bg); } .category-card.group-2 { background-color: var(--group2-bg); }
        .category-card.group-3 { background-color: var(--group3-bg); } .category-card.group-4 { background-color: var(--group4-bg); }
        .category-card h3 { font-size: 1.4rem; font-weight: 700; text-transform: uppercase; margin: 0 0 10px; }
        .category-card p { font-size: 1.1rem; margin: 0; line-height: 1.5; font-weight: 500; }
        
        #chances-animation-container { position: relative; width: 100%; max-width: 500px; height: 120px; margin-top: 25px; display: flex; flex-direction: column; align-items: center; }   
        .chances-anim-text { font-size: calc(0.9rem + 1px); color: var(--disabled-color); font-weight: 500; margin-bottom: 10px; }
        .chances-anim-text span { font-weight: 700; font-size: 1.6rem; color: var(--text-color); vertical-align: middle; }
      .chances-anim-cylinder {
    position: relative;
    width: 130px;
    height: 32px;
    border-top: 1px solid var(--text-color);
    border-bottom: 1px solid var(--text-color);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out, border-color 0.3s;
}

.chances-anim-cylinder::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -16px;
    width: 16px;
    height: 32px;
    border: 1px solid var(--text-color);
    border-right: 0;
    border-radius: 16px 0 0 16px;
    transition: border-color 0.3s;
}

.chances-anim-cylinder::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -11px;
    height: 32px;
    width: 20px;
    background: var(--content-bg-color);
    border: 1px solid var(--text-color);
    border-radius: 50%;
    z-index: 2;
    transition: background-color 0.3s, border-color 0.3s;
}
        .chances-anim-ball { width: 12px; height: 12px; background-color: var(--text-color); border-radius: 50%; position: absolute; top: 10px; transition: left 0.5s ease-out, background-color 0.3s; z-index: 1; }
        .chances-anim-ball.falling { transition: top 1.5s ease-in; }
        #ball1 { left: 4px; } #ball2 { left: 34px; } #ball3 { left: 64px; } #ball4 { left: 94px; }

        .modal-overlay {
            position: fixed; z-index: 2100; left: 0; top: 0; width: 100%; height: 100%;
            overflow: hidden; background-color: rgba(0, 0, 0, 0.6); display: none;
            justify-content: center; align-items: center;
        }
        .modal-content {
            background-color: var(--bg-color); margin: auto; padding: 20px 30px;
            border-radius: 10px; width: 90%; max-width: 400px;
            max-height: 95vh;
            position: relative; text-align: center; box-sizing: border-box;
            display: flex; flex-direction: column;
        }

        /* --- STYLES FOR FULL-WIDTH RESULTS PAGE --- */
        .result-close-btn {
            position: absolute; top: 15px; right: 20px; color: var(--text-color); text-decoration: none;
            font-size: 32px; line-height: 1; font-weight: 400; cursor: pointer;
        }
        .result-header {
            display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 15px;
        }
        .result-logo {
            width: 60px; height: 60px;
        }
        #result-title { margin-bottom: 5px; font-size: 1.5rem; }
        #result-message { margin-top: 0; margin-bottom: 20px; font-size: 1rem; }

        #moves-history-container {
            display: flex; flex-direction: column; align-items: center;
            gap: 3px; margin-bottom: 25px; width: 100%;
        }
        .move-row { display: flex; gap: 3px; }
        .move-circle { width: 16px; height: 16px; border-radius: 50%;}
        .move-circle.group-1 { background-color: #F1D100; }
        .move-circle.group-2 { background-color: var(--group2-bg); }
        .move-circle.group-3 { background-color: var(--group3-bg); }
        .move-circle.group-4 { background-color: var(--group4-bg); }

        #result-solved-groups { width: 100%; margin: 0 auto 5px auto; max-width: 320px; flex-shrink: 0; }
        #result-solved-groups #solved-groups-container {
            display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%;
        }
        #result-solved-groups .solved-group {
            aspect-ratio: 1 / 1; min-height: unset;
        }
        
        #result-buttons-container {
            width: 100%; max-width: 320px; margin: 30px auto 0 auto;  flex-shrink: 0;
        }
        .result-button {
            width: 100%; padding: 14px; border-radius: 30px; font-size: 1rem;
            font-weight: 700; cursor: pointer; text-align: center;
            transition: background-color 0.2s, color 0.2s, border-color 0.2s;
            display: flex; align-items: center; justify-content: center; box-sizing: border-box;
        }
        .share-button {
            background-color: #1a1a1a; color: #ffffff; border: 2px solid #1a1a1a;
            margin-bottom: 10px;
        }
        .share-button:hover { background-color: #333333; border-color: #333333; }
        body.dark-mode .share-button {
            background-color: #e1e1e1; color: #1a1a1a; border-color: #e1e1e1;
        }
        body.dark-mode .share-button:hover {
            background-color: #cccccc; border-color: #cccccc;
        }
        .next-game-button {
            background-color: transparent; color: var(--text-color);
            border: 2px solid var(--text-color);
        }
        .next-game-button:hover { background-color: rgba(128, 128, 128, 0.1); }
        .next-game-icon {
            width: 22px; height: 22px; margin-right: 10px;
        }
        
    .subtle-button-bg {
    background-color: rgba(0, 0, 0, 0.05); /* Very light grey for light mode */
    border: none; /* We don't need a border for this style */
}
body.dark-mode .subtle-button-bg {
    background-color: rgba(255, 255, 255, 0.1); /* Subtle light grey for dark mode */
}
        /* --- END OF RESULTS STYLES --- */
        
        /* --- GAME OVER & THANKS SCREEN STYLES --- */
        #game-over-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background-color: rgba(0,0,0,0.8);
            display: none; justify-content: center; align-items: center;
            z-index: 3000;
        }
        #game-over-text {
            font-size: 4rem; font-weight: 700; color: white;
            text-align: center; animation: fadeIn 0.5s;
        }
        #thanks-screen {
            text-align: center;
        }
        #thanks-screen #final-solved-groups-container {
             width: 100%; margin: 20px auto; max-width: 400px;
             display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
             gap: 10px;
        }
        #view-results-link {
            display: inline-block;
            margin-top: 25px;
            font-size: 1rem; font-weight: 500;
            color: var(--text-color);
            text-decoration: underline;
            cursor: pointer;
        }
        /* --- END OF GAME OVER STYLES --- */
        
        .toast {
            visibility: hidden; min-width: 120px; background-color: var(--text-color); color: var(--bg-color);
            text-align: center; border-radius: 8px; padding: 16px; position: fixed; z-index: 2200; 
            left: 50%; top: 100px; transform: translateX(-50%); opacity: 0; transition: all 0.3s ease-in-out;
        }
        .toast.show { visibility: visible; opacity: 1; top: 120px; }
        .toast-banner {
            top: auto; bottom: -100px; left: 0; transform: none; width: 100%; border-radius: 0;
            padding: 14px 0; font-weight: 500; transition: bottom 0.4s ease-in-out, background-color 0.3s, color 0.3s;
        }
        .toast-banner.show { bottom: 0; top: auto; }
        
        #help-menu { display: none; position: absolute; top: 50px; right: 10px; background-color: var(--bg-color); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1100; width: 160px; border: 1px solid var(--border-color); }
        #help-menu div { padding: 12px 16px; cursor: pointer; font-weight: 500; border-bottom: 1px solid var(--border-color); }
        #help-menu div:last-child { border-bottom: none; }
        .full-page-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-color); z-index: 2000; display: none; flex-direction: column; align-items: center; overflow-y: auto; }
        .page-container { width: 100%; max-width: 500px; margin: 0 auto; padding: 16px; box-sizing: border-box; display: flex; flex-direction: column; height: 100%; }
        .page-header { display: flex; justify-content: center; align-items: center; position: relative; padding: 10px 0; margin-bottom: 25px; flex-shrink: 0; }
        .page-header h2 { margin: 0; font-weight: 700; font-size: 1.2rem; }
        .close-page-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 32px; line-height: 1; font-weight: 400; color: var(--text-color); cursor: pointer; }
        .page-content { flex-grow: 1; line-height: 1.6; }
        .page-footer { margin-top: auto; padding: 20px 0 2px; text-align: center; color: #4B4B4B; font-size: 16px; flex-shrink: 0; }
        body.dark-mode .page-footer { color: #ccc; }
        .faq-list { display: flex; flex-direction: column; } .faq-item { border-bottom: 1px solid var(--border-color); }
        .faq-question { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; cursor: pointer; font-weight: 500; font-size: 1rem; }
        .faq-question .arrow { transition: transform 0.3s ease; flex-shrink: 0; margin-left: 10px; color: var(--text-color); }
        .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; color: #555; font-weight: 400; }
        .faq-answer p { margin-top: 0; margin-bottom: 20px; padding-right: 30px; }
        .faq-item.active .faq-question .arrow { transform: rotate(180deg); } .faq-item.active .faq-answer { max-height: 200px; } body.dark-mode .faq-answer { color: #bbb; }
        .settings-list { display: flex; flex-direction: column; gap: 25px; } .setting-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 25px; }
        .setting-info { flex-grow: 1; margin-right: 15px; } .setting-title { font-weight: 500; font-size: 1rem; margin-bottom: 4px; }
        .setting-description { font-size: 0.9rem; color: var(--disabled-color); transition: color 0.3s; }
        .toggle-switch { position: relative; display: inline-block; width: 70px; height: 34px; flex-shrink: 0; } .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #A6A6A6; transition: .4s; border-radius: 34px; }
        .slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
        input:checked + .slider { background-color: #3DBA50; } input:checked + .slider:before { transform: translateX(36px); }
        .slider:after { display: block; position: absolute; transform: translate(-50%, -50%); top: 50%; left: 50%; font-size: 12px; font-family: 'Roboto', sans-serif; font-weight: 700; color: white; }
        .slider:after { content: 'OFF'; left: 75%; } input:checked + .slider:after { content: 'ON'; left: 25%; }
        .setting-title-container { display: flex; align-items: center; gap: 6px; position: relative; }
        #hard-mode-info-icon { cursor: pointer; color: var(--text-color); flex-shrink: 0; transform: translateY(-2px); }
        
        .info-card {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; /* Align to the left of the container */
    transform: translateX(0); /* Remove the centering adjustment */
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 220px;
    z-index: 2100;
    text-align: center;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 8px;
    cursor: default;
}
        
        
        .info-card.show { display: block; } .info-card h4 { margin: 0 0 5px 0; font-weight: 700; font-size: 1rem; } .info-card p { margin: 0; line-height: 1.4; } body.dark-mode .info-card { background-color: #333; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
        .how-to-play-content ul { padding-left: 20px; } .how-to-play-content li { margin-bottom: 10px; }
     

.glossary-list { 
    padding: 0; 
    margin: 0; 
} 
.glossary-term { /* <-- THIS IS THE RULE YOU ARE REPLACING */
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.glossary-term i {
    color: var(--disabled-color);
    margin-right: 12px;
    width: 25px;
    height: 25px;
    border: 1px solid var(--disabled-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.glossary-definition { 
    margin-left: 0; 
    margin-bottom: 10px; 
    color: #555; 
} 
body.dark-mode .glossary-definition { 
    color: #bbb; 
}

.glossary-submit-icon {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

    
    #how-to-play-video-container {
    width: 100%;
    max-width: 280px;
    margin: 30px auto 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.how-to-play-video {
    width: 100%;
    height: auto;
    display: block;
}

#dark-mode-video {
    display: none;
}

body.dark-mode #dark-mode-video {
    display: block;
}

body.dark-mode #light-mode-video {
    display: none;
}
   
   
    .reaction-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    padding: 5px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    width: 70px;
}
.reaction-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
body.dark-mode .reaction-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.reaction-item .emoji {
    font-size: 2rem;
}
.reaction-item .label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--disabled-color);
}

#reactions-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

#feedback-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2500;
    display: none;
    justify-content: center;
    align-items: center;
}

#feedback-modal-card {
    position: relative;
    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 12px;
    padding: 20px 25px;
    width: 90%;
    max-width: 340px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

.feedback-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: var(--disabled-color);
}

#feedback-modal-card h4 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
}

#feedback-modal-card #reactions-container {
    padding-bottom: 15px;
}

#feedback-modal-card .reaction-item.selected {
    background-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode #feedback-modal-card .reaction-item.selected {
    background-color: rgba(255, 255, 255, 0.15);
}

#feedback_comment {
    width: 100%;
    height: 80px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 20px;
}

#submit-feedback-btn {
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    border: none;
    background-color: var(--text-color);
    color: var(--bg-color);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

#submit-feedback-btn:disabled {
    background-color: var(--disabled-color);
    cursor: not-allowed;
}

#modal-feedback-thanks h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 20px 0;
}

#ego-boost-message-container {
    display: none;
    max-width: 360px;
    margin: 20px auto 35px;
    padding: 8px;
    border: 1px dotted var(--disabled-color);
    border-radius: 12px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode #ego-boost-message-container {
    background-color: rgba(255, 255, 255, 0.1);
}

#ego-boost-message-container .boost-text {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-color);
    margin: 0 auto;
    max-width: 25ch;

}

#stats-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 5px; /* Horizontal gap */
    row-gap: 15px;    /* NEW: Vertical gap between header and stats */
    width: 100%;
    padding: 10px 0;
    margin: 20px 0 30px;
    border: 1px solid var(--border-color);
   
}

.stat-item {
    text-align: center;
}
.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}
.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--disabled-color);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#thanks-screen .app-icon-container {
    width: 120px;
    height: 120px;
    margin: -15px auto 0 auto; 
}
#thanks-screen-icon {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

#thanks-screen-gametitle {
    margin-top: -15px;
}

#see-you-tomorrow {
    font-weight: 600 !important;
    font-size: 2rem !important;
    margin-bottom: 10px;
}
.icon-outline-frame {
    fill: #1a1a1a;
    stroke: none;
}

.icon-text {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 12px;
    fill: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tile-grid-group {
    transform: translate(12px, 12px) scale(0.75);
}

.icon-tile-white {
    fill: #ffffff;
    stroke: #1a1a1a;
    stroke-width: 0.8;
}

.icon-tile-black {
    fill: #44AD24;
    stroke: none;
}

/* Add this new rule to fix the button font size */
#play-next-game-btn span {
    font-size: 1rem;
}

#waitlist-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

#waitlist-modal-card {
    position: relative;
    background-color: #91D57C;
    color: var(--text-color);
    border-radius: 12px;
    padding: 25px 30px;
    width: 90%;
    max-width: 340px;
    min-height: 280px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.waitlist-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: black;
}

#waitlist-modal-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

#waitlist-modal-card p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 20px 0;
    color: var(--text-color);
}

#waitlist_email {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background-color: #F0F0F0; 
    color: #1a1a1a;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 15px;
}

#waitlist_email::placeholder {
    color: #666;
}

#submit-waitlist-btn {
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    border: none;
    background-color: var(--text-color);
    color: var(--bg-color);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#submit-waitlist-btn:hover {
    background-color: #333;
}

body.dark-mode #submit-waitlist-btn:hover {
    background-color: #ccc;
}

#waitlist-thanks strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

#waitlist-thanks p {
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
    opacity: 0.9;
}

body.dark-mode #waitlist-modal-card {
    background-color: #ffffff;
    color: #121212; 
}

body.dark-mode #waitlist-modal-card h2,
body.dark-mode #waitlist-modal-card p {
    color: #121212;
}

body.dark-mode #waitlist_email {
    background-color: #f0f0f0;
    color: #121212;
    border: 1px solid #cccccc;
}

body.dark-mode #waitlist-form button {
    background-color: #121212;
    color: #ffffff;
}

body.dark-mode #waitlist-thanks h4 {
    color: #121212;
}

/* --- REPORT ISSUE MODAL STYLES --- */
#issue-modal-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}
#issue-modal-card p {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--disabled-color);
}
#issue-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.issue-category-btn {
    width: 100%;
    padding: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s, border-color 0.2s;
}
.issue-category-btn.selected {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}
#issue-comment {
    width: 100%;
    height: 60px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 15px;
}
.diagnostic-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    font-size: 0.8rem;
    text-align: left;
    color: var(--disabled-color);
}
.diagnostic-consent input {
    flex-shrink: 0;
}
#submit-issue-btn:disabled {
    background-color: var(--disabled-color);
    border-color: var(--disabled-color);
    cursor: not-allowed;
}

#help-coach-mark {
    display: none; /* Hidden by default */
    position: absolute;
    top: 55px; /* Adjust as needed */
    right: 15px; /* Adjust as needed */
    width: 220px;
    background-color: #2c2c2c;
    color: #ffffff;
    border-radius: 8px;
    padding: 20px 15px;
    z-index: 1500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease-out;
}
.coach-mark-pointer {
    position: absolute;
    top: -8px;
    right: 40px; /* Aligns with the help icon's position */
    width: 16px;
    height: 16px;
    background-color: #2c2c2c;
    transform: rotate(45deg);
}
#help-coach-mark strong {
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}
#help-coach-mark p {
    margin: 0;
    line-height: 1.4;
}
.coach-mark-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #91D57C;
    color: #1a1a1a;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}
.coach-mark-close {
    position: absolute;
    top: 5px;
    right: 12px;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.7;
}
body.dark-mode #help-coach-mark {
    background-color: #f0f0f0;
    color: #1a1a1a;
}
body.dark-mode .coach-mark-pointer {
    background-color: #f0f0f0;
}

#splash-screen {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #91D57C;
    color: #000000;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    padding: 8vh 20px 10vh;
    box-sizing: border-box;
}

.splash-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.splash-header {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    width: calc(100% - 40px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#splash-back-btn, #splash-help-btn {
    cursor: pointer;
}

#splash-back-btn {
    width: 28px;
    height: 28px;
}

.splash-logo {
    width: 180px;
    height: 180px;
    margin-bottom: 0;
}

.splash-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
}

.splash-logo + .splash-title {
    margin-top: -20px;
}

.splash-subtitle {
    font-size: 1.3rem;
    margin-top: 5px;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.4;
}

#play-game-btn {
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 15px 70px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 20px;
}

.splash-info {
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 50px;
    font-size: 1.1rem; /* FONT SIZE INCREASED */
}

.splash-info p:nth-child(2) {
    color: #555555; /* COLOR LIGHTENED */
    font-weight: 400;
}

.splash-info p {
    margin: 0;
}

.splash-demo-release {
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    line-height: 1.5;
    color: #333;
    font-size: 1rem; /* FONT SIZE INCREASED */
}

.splash-demo-release p {
    margin: 0;
}

body.splash-active header,
body.splash-active #root {
    display: none;
}

.more-games-section {
    width: 100%;
    max-width: 340px;
    margin: 35px auto;
}

.more-games-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.more-games-list {
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

body.dark-mode .more-games-list {
    background-color: rgba(255, 255, 255, 0.05);
}

.game-list-item {
    display: flex;
    align-items: center;
    padding: 25px 20px;
}

.game-list-item:not(:first-child) {
    border-top: 1px solid var(--border-color);
}

.game-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.game-item-details {
    flex-grow: 1;
    margin-left: 15px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.game-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color);
}

.game-hash {
    color: var(--text-color);
    font-weight: 400;
}

.play-btn {
    border: none;
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 8px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.play-btn:hover {
    opacity: 0.85;
} 

.next-game-icon {
    width: 70px;
    height: 70px;
    /* Vertical alignment fix */
    margin-top: -20px;
    margin-bottom: -20px;
    /* Horizontal alignment fix */
    margin-left: -15px;
    margin-right: -5px;
}

#play-next-game-btn > svg {
    width: 30px;
    height: 30px;
}

/* --- START: ARCHIVE PAGE UPDATES --- */

/* New Header Layout */

#archive-page-overlay .page-header {
    display: grid;
    grid-template-columns: auto 1fr auto; 
    align-items: center;
    padding: 15px 16px;
    gap: 12px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
}

#archive-back-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


#archive-header-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    justify-self: center; 
}

#archive-view-toggle {
    justify-self: end;
    display: flex;
    align-items: center;
    background-color: var(--tile-bg);
    border-radius: 20px;
    cursor: pointer;
    padding: 4px;
    gap: 0;
    border: 1px solid transparent;
    transition: background-color 0.2s;
}

#archive-view-toggle i {
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--disabled-color);
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#archive-view-toggle i.active {
    background-color: var(--bg-color);
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
body.dark-mode #archive-view-toggle i.active {
    background-color: #444;
}


/* Calendar View Updates */
#calendar-header {
    display: grid; /* Switched to grid for precise alignment */
    grid-template-columns: 40px 1fr 40px; /* Arrow | Title | Arrow */
    align-items: center;
    margin-bottom: 20px;
    padding: 0;
}
#month-year-header {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
}
#month-year-header .arrow {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}
.month-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--tile-bg);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.month-nav-btn:hover:not(:disabled) {
    background-color: #d0d0d0;
}
body.dark-mode .month-nav-btn:hover:not(:disabled) {
    background-color: #404040;
}
.month-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: var(--tile-bg);
}

#archive-calendar-view {
    padding: 0 20px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
    color: var(--disabled-color);
    font-weight: 500;
}
#calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.calendar-day {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column; /* Changed to column */
    align-items: center;
    justify-content: flex-start; /* Align content to the top */
    position: relative;
    border-radius: 12px; /* More rounded */
    cursor: default;
}
.calendar-day.has-data {
    cursor: pointer;
}

.calendar-day.missed-day:hover:not(.future-day) {
    background-color: rgba(0,0,0,0.05);
}
body.dark-mode .calendar-day.missed-day:hover:not(.future-day) {
     background-color: rgba(255,255,255,0.08);
}

/* Styling for the status icon/square */
.calendar-day-status-icon {
    width: 100%;
    height: 100%;
    position: absolute; /* Positioned behind the number */
    top: 0;
    left: 0;
    background-size: 90%; /* Icon is slightly smaller than the cell */
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Styling for the day number */
.day-number {
    position: absolute; /* Force positioning */
    bottom: -15px;      /* 4px from the bottom edge */
    left: 0;          /* Center it horizontally */
    right: 0;         /* Center it horizontally */
    text-align: center; /* Center it horizontally */
    z-index: 2;
    font-size: 0.8rem;
    font-weight: 500;
   
    color: var(--text-color);
}
.calendar-day.future-day .day-number {
    margin: auto; /* Centers the number in future days */
    color: var(--disabled-color);
}


/* List View Updates */
#archive-list-view {
    display: none;
    /* border-top removed to prevent double line */
}
.list-item {
    display: flex;
    align-items: center;
    padding: 16px 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.list-item:hover {
    background-color: rgba(0,0,0,0.03);
}
body.dark-mode .list-item:hover {
    background-color: rgba(255,255,255,0.05);
}

.list-item-status-icon-container {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 15px;
    background-color: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-sizing: border-box;
}

/* ADD THIS NEW RULE */
.list-item.missed-day .list-item-status-icon {
    background-color: #91D57C; 
    width: 65%;
    height: 65%;
    border-radius: 50%;
}

/* (Optional) Add this for dark mode consistency */
body.dark-mode .list-item.missed-day .list-item-status-icon {
    background-color: #91D57C;
    width: 65%;
    height: 65%;
    border-radius: 50%;
}

.list-item-status-icon {
    width: 100%; /* Icon is slightly smaller than container */
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
}

.list-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.list-item-details .date {
    font-weight: 700;
    font-size: 1rem;
}
.list-item-details .game-number {
    font-size: 0.85rem;
    color: var(--disabled-color);
}
.list-item-arrow {
    margin-left: auto;
    color: var(--text-color);
    font-size: 1.2rem;
    margin-right: 20px;
   
   
}

/* Month/Year Picker Modal Styles */
#month-year-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2100;
    display: none;
    justify-content: center;
    align-items: center;
}
#month-year-picker-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 340px;
}
#picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
#picker-year-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 1.1rem;
}
#picker-year-controls button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.1rem;
}
#close-picker-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}
#picker-months-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.picker-month {
    padding: 12px 5px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}
.picker-month:hover {
    background-color: var(--tile-bg);
}
.picker-month.disabled {
    color: var(--disabled-color);
    cursor: not-allowed;
    background-color: transparent;
}
.picker-month.selected {
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* --- END: ARCHIVE PAGE UPDATES --- */

/* --- HINT SYSTEM STYLES --- */
.modal-overlay { /* Using a generic class for all modals */
    position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    overflow: hidden; background-color: rgba(0, 0, 0, 0.6); display: none;
    justify-content: center; align-items: center;
}
.modal-content { /* Using a generic class for all modal cards */
    background-color: var(--bg-color); margin: auto; padding: 45px 30px 35px;
    border-radius: 10px; width: 90%; max-width: 400px;
    position: relative; text-align: center; box-sizing: border-box;
}
.modal-close-btn {
    position: absolute; top: 10px; right: 20px; font-size: 32px;
    cursor: pointer; font-weight: 300; color: var(--text-color);
    opacity: 0.7;
}

#hint-modal-card h3 {
    margin: 0;
    font-size: 1.3rem;
}
.hint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    padding-top: 5px; 
    margin-bottom: 20px;
    text-align: left;
}
#hint-points-display {
    font-weight: 700;
    font-size: 1rem;
    background-color: var(--tile-bg);
    padding: 6px 12px;
    border-radius: 20px;
}
.hint-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
.hint-btn {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--text-color);
    background-color: transparent;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}
.hint-btn:hover:not(:disabled) {
    background-color: rgba(128, 128, 128, 0.1);
}
.hint-btn:disabled {
    border-color: var(--disabled-color);
    color: var(--disabled-color);
    cursor: not-allowed;
    background-color: transparent;
}
#revealed-hints-container p {
    background-color: var(--tile-bg);
    padding: 12px;
    border-radius: 8px;
    margin: 0 0 10px 0;
    text-align: left;
    font-weight: 500;
}

/* --- HINT MODAL UI IMPROVEMENTS --- */

#hint-modal-card .modal-close-btn {
    top: 4px;
    right: 15px;
}

.hint-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
#hint-info-icon {
    cursor: pointer;
}
#hint-points-remaining-text {
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

/* --- HARD MODE MODAL STYLING --- */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}
.modal-button-primary, .modal-button-secondary {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid var(--text-color);
}
.modal-button-primary {
    background-color: var(--text-color);
    color: var(--bg-color);
}
.modal-button-secondary {
    background-color: transparent;
    color: var(--text-color);
}

/* --- DISABLED HINT ICON STYLING --- */
#hint-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- FIX FOR HARD MODE MODAL Z-INDEX --- */
#hard-mode-confirm-overlay {
    z-index: 2500; /* Ensures it appears on top of the settings page */
}
#hard-mode-confirm-card {
    padding-top: 25px;
    padding-bottom: 25px;
}

#hard-mode-confirm-card p {
    line-height: 1.5;
    margin-bottom: 25px;
}

#hard-mode-confirm-card .modal-actions {
    margin-top: 0;
}

#tooltip-click-shield {
    background-color: transparent;
    z-index: 2090;
}

#hint-modal-overlay {
    z-index: 2100;
}

/* --- HINT COACH MARK STYLES --- */
#hint-coach-mark {
    display: none; 
    position: absolute;
    top: 55px;
    right: 45px; /* Adjusted position to align with hint icon */
    width: 220px;
    background-color: #2c2c2c;
    color: #ffffff;
    border-radius: 8px;
    padding: 20px 15px;
    z-index: 1500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease-out;
}

#hint-coach-mark .coach-mark-pointer {
    position: absolute;
    top: -8px;
    right: 40px; /* Adjusted pointer position */
    width: 16px;
    height: 16px;
    background-color: #2c2c2c;
    transform: rotate(45deg);
}

#hint-coach-mark strong {
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

#hint-coach-mark p {
    margin: 0;
    line-height: 1.4;
}

.coach-mark-icon-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px; /* Make emoji icon slightly larger */
}

#hint-coach-mark .coach-mark-close {
    position: absolute;
    top: 5px;
    right: 12px;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.7;
}

body.dark-mode #hint-coach-mark {
    background-color: #f0f0f0;
    color: #1a1a1a;
}
body.dark-mode #hint-coach-mark .coach-mark-pointer {
    background-color: #f0f0f0;
}

/* --- START: RESPONSIVENESS FOR SMALL & SHORT SCREENS --- */

/* Rule for phones with SHORTER heights (e.g., iPhone SE) */
@media (max-height: 700px) {
    #game-grid {
        margin-bottom: 10px; /* Reduces space below the grid */
    }
    .actions-container {
        margin-top: 15px; /* Reduces space above the buttons */
    }
    #chances-animation-container {
        margin-top: 15px; /* Reduces space above the chances cylinder */
        height: 100px; /* Makes the chances container shorter */
    }
}

/* Rules for phones with NARROWER widths (320px, 360px) */
@media (max-width: 360px) {
    /* Make the solved group cards that flash up smaller */
    .category-card {
        padding: 20px;
        min-height: 250px;
    }
    .category-card-header {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }
    .category-card h3 {
        font-size: 1.2rem;
    }
    .category-card p {
        font-size: 1rem;
    }

    /* Make the game tiles slightly smaller */
    .tile {
        height: 45px;
        padding: 15px 5px;
        font-size: 0.85rem;
    }
    .tile.long-word {
        font-size: 0.7rem;
    }
    #game-grid {
        gap: 6px; /* Reduce gap between tiles */
    }

    /* Make the archive/calendar view more compact */
    #calendar-days-grid {
        gap: 5px;
    }
    .day-number {
        font-size: 0.7rem;
        bottom: -12px;
    }
    .month-nav-btn {
        width: 35px;
        height: 35px;
    }
    .list-item-status-icon-container {
        width: 60px;
        height: 60px;
    }
    .list-item-details .date {
        font-size: 0.9rem;
    }
}

/* --- END: RESPONSIVENESS FOR SMALL & SHORT SCREENS --- */

/* --- START: DESKTOP SIDE-BY-SIDE LAYOUT --- */

@media (min-width: 992px) {
    /* Widen the main container on desktop */
    #root {
        max-width: 850px;
    }

    /* Change the main layout to a two-column grid */
    main {
        display: grid;
        grid-template-columns: 1fr 280px; /* Game board on left, controls on right */
        gap: 40px;
        align-items: center;
    }
    
    /* The game board will now take the first column */
    #game-board {
        height: 100%;
    }

    /* The new controls wrapper takes the second column */
    .game-controls {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        gap: 30px;
    }

    /* Reset margins for elements inside the new layout */
    .actions-container, #chances-animation-container {
        margin-top: 0;
        margin-bottom: 0;
    }
}
