* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --nav-bg: #f8f9fa;
    --sidebar-bg: #ffffff;
    --selected-item: #0f0f0f;
    --selected-item2: #f8b705;
    --selected-text: #5f5f5f;
    --selected-text2: #0f0f0f;
    --correct-item-bg: #98FB98;
    --border-color: #dee2e6;
    --hover-color: #007bff;
    --secondary-bg-color: #f5f5f5;
    --correct-item-bg: #4CAF50;
    --correct-item-hover: #45a049;
    --button-text: #0a0c0a;
    --button-text-hover: #ffffff;
}

body.dark-mode {
    --bg-color: #333333;
    --text-color: #ffffff;
    --nav-bg: #222222;
    --sidebar-bg: #2c2c2c;
    --selected-item: #b1a3a3;
    --selected-item2: #f8b705;
    --selected-text: #0f0f0f;
    --selected-text2: #0f0f0f;
    --border-color: #444444;
    --hover-color: #66b0ff;
    --secondary-bg-color: #444444;
    --correct-item-bg: #4CAF50;
    --correct-item-hover: #45a049;
    --button-text: #0a0c0a;
    --button-text-hover: #ffffff;
}

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.site-header {
    font-style: bold;
}

hr {
    border: 1px solid var(--border-color);
}

.sub-heading {
    font-style: italic;
    font-weight: bold;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--nav-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.left-section {
    display: flex;
    align-items: center;
    gap: 10px;
}


.right-section {
    display: flex;
    align-items: center;
    gap: 10px;
}


.burger-menu {
    cursor: pointer;
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger-bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

.help-menu,
.settings-menu {
    cursor: pointer;
    width: 30px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-menu i,
.settings-menu i {
    font-size: 24px;
    color: var(--text-color);
}

.title-container {
    font-size: 1.5rem;
    font-weight: bold;
    width: 50%;
    text-align: center;
    text-wrap: wrap;
    color: var(--text-color);

}

.title {
    font-size: 1.5rem;
    font-weight: bold;
    width: 50%;
    text-align: center;
    text-wrap: wrap;
    color: var(--text-color);
}

.title:hover {
    color: var(--text-color);
}

.options-container {
    text-align: center;
    vertical-align: middle;
}

.sidebar {
    position: fixed;
    top: 0;
    height: 100vh;
    width: 250px;
    background-color: var(--sidebar-bg);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    z-index: 1000;
    padding: 1rem;
    color: var(--text-color);
    overflow: auto;
}

.left-sidebar {
    left: -250px;
}

.help-sidebar {
    left: -300px;
    width: 300px;
}

.right-sidebar {
    right: -250px;
}

.left-sidebar.active,
.help-sidebar.active {
    left: 0;
}

.right-sidebar.active {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}

.overlay.active {
    display: block;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
}

.menu-items {
    list-style: none;
}

.menu-items li {
    padding: 0.5rem 0;
    cursor: pointer;
}

.menu-items li:hover {
    color: var(--hover-color);
}

.content {
    flex: 1;
    padding-left: 2rem;
    padding-right: 2rem;
    background-color: var(--bg-color);
}

.footer {
    background-color: var(--nav-bg);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Toggle Switch Styles */
.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 0.5rem;
    border-radius: 5px;
}

.toggle-container2 {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin: 0 auto;
    padding: 0.5rem;
    border-radius: 5px;
    vertical-align: middle;

    border: 1px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    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: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.help-content {
    padding: 1rem;
    line-height: 1.6;
}

.grid-container {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    touch-action: none;
}

.grid-row {
    border: 1px solid #dee2e6;
    margin-bottom: 0px;
    padding: 1px;
    background-color: var(--bg-color);
    min-height: 44px;
    transition: background-color 0.3s;
    position: relative;
    display: flex;
}

.grid-item {
    border: 1px solid #dee2e6;
    padding: 12px;
    margin: 1%;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    font-size: 24px;
    font-weight: bold;
    transition: background-color 0.3s;
    flex: 0 0 23%;
    touch-action: none;
}

.grid-item-3-3 {
    flex: 0 0 31%;
}

.grid-item-4-4 {
    flex: 0 0 23%;
}


.grid-item.correct {
    background-color: var(--correct-item-bg);
    color: var(--button-text);
}

.grid-item.selected {
    background-color: var(--selected-item);
    color: var(--selected-text);
}

.grid-item.selected2 {
    background-color: var(--selected-item2);
    color: var(--selected-text2);
}

.grid-item.disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.button-container {
    display: flex;
    vertical-align: middle;
    justify-content: center;
    height: 50px;
    width: auto;
}

.custom-button {
    width: 100%;
    font-size: 24px;
    font-weight: bold;

}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 400px;
    z-index: 1001;
    background-color: var(--sidebar-bg);
}

.modal-header {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--correct-item-bg);
}

.modal-stats {
    margin: 15px 0;
    padding: 10px;
    border-radius: 5px;
}

.countdown {
    font-size: 18px;
    margin: 15px 0;
    color: var(--text-color);
    min-width: 50%;
    text-align: right;
    border-right: 1px #0a0a0a;
    font-weight: bold;
}

.model-row {
    display: flex;
    width: 100%;
}

.share-button {
    background-color: var(--correct-item-bg);
    color: var(--button-text);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.reshare-button {
    width: 40%;
    font-size: 24px;
    font-weight: bold;
    background-color: var(--correct-item-bg);
    color: var(--button-text);
    border: none;
    padding: 5px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.reshare-button:hover {
    background-color: var(--correct-item-hover, #45a049);
    color: var(--hover-color-hover);
}

.share-button:hover {
    background-color: var(--correct-item-hover, #45a049);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
}

h1 {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 10px;
}

#statistics {
    display: flex;
}

.statistic-container {
    flex: 1;
}

.statistic-container .statistic {
    font-size: 36px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 0.05em;
}


.statistic-container .label {
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}