/* Reset some default styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    touch-action: manipulation;
}


body {
    font-family: "Lora", serif;
    background-color: #dee9e9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow-y: auto; /* Enables vertical scrolling */
    /*touch-action: manipulation; /* Prevents scrolling on touch devices */
}

#app {
    max-width: 500px;
    width: 100%;
    padding: 20px;
    text-align: center;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: #3c3c3c;
}

header h1 {
    font-size: 2em;
    font-weight: bold;
}

header h2 {
    font-size: 1.2em;
    font-weight: normal;
    color: #6c6c6c;
    margin-top: 5px;
}

.icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Graph container styling */
#graph-container {
    border: 2px solid #3c3c3c;
    padding: 10px;
    margin-bottom: 20px;
    background-color: #ffffff;
    width: 100%;  /* 🔹 Explicit width */
    height: 250px; /* 🔹 Explicit height */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto; /* 🔹 Center it horizontally */
}

/* Ensure the canvas takes up full size */
#frequencyGraph {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Keyboard styling */
#keyboard {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 500px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 5px;
}

button {
    font-size: 1.3em;
    width: 45px;
    height: 50px;
    background-color: #3c3c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background-color: #555;
}

.shift, .delete {
    width: 60px;
}

/* styling for toggle-mode button */
#toggle-mode {
    background-color: #76a392;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    padding: 5px 5px;
    margin-top: 10px;
    /* increase width of button */
    width: 100px;
}

#category-display {
    font-size: 1.2em;
    font-weight: bold;
    color: #3c3c3c;
    margin-bottom: 15px;
    /* make text uppercase */
    text-transform: uppercase;
}

.popup {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    font-size: 1.1em;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.popup-content hr {
    border: none;
    height: 1px;
    background: #ffffff; /* Light gray line */
    margin: 5px 0; /* Adjust spacing above and below the line */
}

.popup-content h2 {
    margin-top: 0;
}

#close-popup {
    background: #969696; /* Green button */
    color: white;
    border: none;
    font-size: 0.9em;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 15px;
    width: 80px;
    height: 40px;  
}

#close-popup:hover {
    background: #d5d5d5;
}


#word-display {
    display: flex; 
    justify-content: center;
    align-items: center;
    height: 50px; /* Ensures space is reserved */
    font-size: 3em; /* Make letters big */
    font-weight: bold;
    color: #4c3c2b; /* Adjust color as needed */
    text-transform: uppercase;
    margin-bottom: 20px;
    margin-top: 10px;
}

#word-category-hint {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

#submit-guess {
    padding: 0px 0px;
    font-size: 0.8em;
    background-color: #3c3c3c76;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 60px;
}

#submit-guess:hover {
    background-color: #555;
}


#guess-circles-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.guess-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.guess-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 0px solid black; /* Outline for visibility */
}

.guess-label {
    margin-top: 5px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    /* make text uppercase */
    text-transform: uppercase;
}

.result-popup {
    position: absolute;
    bottom: 100px; /* Adjust position above the keyboard */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid black;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    color: black;
    text-align: center;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 300px;
    width: auto;
    position: relative; /* Needed for absolute positioning of close button */
}

/* Small grey close button */
.popup-close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: grey;
}

.popup-close-button:hover {
    color: black;
}

/* 🔹 Style for "Today's word was..." */
.popup-word {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

/* Position the tooltip container */
.info-container {
    position: relative;
    display: inline-block;
}

/* Initially hide tooltip */
.tooltip {
    visibility: hidden;
    width: 220px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: left;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    position: absolute;
    top: 120%; /* Position BELOW the icon */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: normal;
    z-index: 100;
}

/* Show tooltip when hovering over the help icon */
.info-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Style for the info icon */
.info-icon {
    cursor: pointer;
}

.win-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid black;
    padding: 20px;
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.popup-close-button {
    position: absolute;
    top: 5px;
    right: 10px;
    border: none;
    background: none;
    font-size: 16px;
    cursor: pointer;
}

/* Hint Pop-up */
.hint-popup {
    position: absolute;
    background-color: white;
    color: black;
    border: 1px solid #888;
    padding: 10px 10px;
    border-radius: 5px;
    font-size: 18px;
    white-space: nowrap;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}




/* Close Button Styling */
.hint-close {
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    color: #888;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: auto; /* Push "X" to the right */
}

.hint-close:hover {
    color: red;
}


.footer {
    position: relative;
    font-size: 8px;
    bottom: 0;
    left: 0%;
    z-index: 10;
}



