html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #121212;
    font-family: Arial, sans-serif;
    overflow: hidden;
    transition: background-color 0.25s ease-in-out;
    /* Even faster transition */
}

/* flash page Styles */
#flash-page {
    display: flex;
}

#flash-page .card-container {
    perspective: 1000px;
}

#flash-page .card {
    position: relative;
    width: 15rem;
    height: 20rem;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

#flash-page .card-side {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-size: 1.35rem;
    backface-visibility: hidden;
    border-radius: 1.2rem;
}

#flash-page .card-side.front {
    color: white;
    background-color: #0056b3;
}

#flash-page .card-side.back {
    color: black;
    /* background-color: #ecdc95; */
    background-color: #8e8d97;
    transform: rotateY(180deg);
}

#flash-page .flipped {
    transform: rotateY(180deg);
}

#flash-page .info {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    font-family: "Roboto", sans-serif;
    font-size: 1.2rem;
}

#flash-page .info * {
    margin-bottom: 2.5vh;
}

#flash-page .buttons-container {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
}

#flash-page .buttons-container button {
    background-color: grey;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 5px;
    font-family: "Roboto", sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

#flash-page .buttons-container button:hover {
    background-color: #c9b569;
}

#flash-page .buttons-container button:active {
    outline: none;
    /* Remove outline to make sure the button doesn't appear focused */
}

#flash-page #hiddenFileInput {
    display: none;
}

/* input page Styles */
#input-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#input-page .input-content {
    color: white;
    background-color: #222222;
    padding: 2px 10px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
}

#input-page .input-content input {
    background-color: #222222;
    width: calc(100% - 20px);
    padding: 10px;
    margin: 0px 0px 10px 0px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-shadow: none;
}

#input-page .input-content input:focus {
    color: white;
    border: 1px solid #ccc;
    box-shadow: none;
    outline: none;
}

#input-page .input-content button {
    width: 80px;
    height: 40px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
}

#input-page .input-content button.cancel {
    background-color: #999;
}

#inbuilt-page {
    background-color: #1e1e1e;
    /* Dark inbuilt-page background */
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    display: none;
    /* Hidden by default */
}

#inbuilt-page .file-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #333;
    /* Darker border */
    border-radius: 8px;
    padding: 10px;
    background-color: #2a2a2a;
    /* Darker background for file list */
    color: #e0e0e0;
    /* Light text */
}

#inbuilt-page .file-list label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    /* Increased margin for better spacing */
    cursor: pointer;
    font-size: 1.2em;
    /* Increased font size */
    transition: background-color 0.2s;
    padding: 8px;
    border-radius: 5px;
}

#inbuilt-page .file-list label:hover {
    background-color: #444;
    /* Highlight on hover */
}

#inbuilt-page .file-list input[type="checkbox"] {
    margin-right: 15px;
    cursor: pointer;
    transform: scale(1.5);
    /* Increased checkbox size */
}

#inbuilt-page .button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px;
    /* Increased padding */
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 1.2em;
    /* Increased button font size */
    transition: background-color 0.3s, transform 0.2s;
    margin-bottom: 10px;
}


#inbuilt-page .button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    /* Lift effect on hover */
}

#inbuilt-page .button:disabled {
    background-color: #555;
    cursor: not-allowed;
}

#menu-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0);
    color: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#menu-page .menu-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#menu-page button,
#menu-page a {
    display: block;
    /* Ensures both have the same layout */
    width: 200px;
    /* Same width for both */
    padding: 15px 20px;
    border: none;
    color: white;
    font-size: 24px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    /* Makes sure padding and border are included in width */
}

#menu-page button:hover,
#menu-page a:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

#menu-page a {
    background-color: #437bb8;
}

#menu-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: white;
}