body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    overflow-x: hidden;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.question {
    width: 100%;
    max-width: 600px;
    margin: 20px 0;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.question h3 {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.options {
    list-style: none;
    padding: 0;
}

.options li {
    background: #e4e4e4;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.options li:hover {
    background: #d1d1d1;
    transform: scale(1.05);
}

.options li.correct {
    background: #4CAF50 !important;
    color: #fff;
}

.options li.incorrect {
    background: #F44336 !important;
    color: #fff;
}

.options li.show-correct {
    background: #FFA500 !important;
    color: #fff;
}

.sidebar {
    width: 220px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(100%);
}

.sidebar h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.sidebar ul li {
    width: 45px;
    height: 45px;
    margin: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
}

.sidebar ul li.not-visited {
    background: #e4e4e4;
}

.sidebar ul li.visited {
    background: #FFA500;
    color: #fff;
}

.sidebar ul li.correct {
    background: #4CAF50;
    color: #fff;
}

.sidebar ul li.incorrect {
    background: #F44336;
    color: #fff;
}

.sidebar ul li:hover {
    transform: scale(1.05);
}

.finish-btn {
    margin-top: 20px;
    padding: 15px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
    text-align: center;
}

.finish-btn:hover {
    background: #45a049;
}

.timer {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    animation: glitter 1s infinite;
}

@keyframes glitter {
    0% { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #f0f, 0 0 20px #f0f, 0 0 25px #f0f, 0 0 30px #f0f, 0 0 35px #f0f; }
    50% { text-shadow: 0 0 5px #fff, 0 0 10px #f0f, 0 0 15px #f0f, 0 0 20px #fff, 0 0 25px #fff, 0 0 30px #fff, 0 0 35px #fff; }
    100% { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #f0f, 0 0 25px #f0f, 0 0 30px #f0f, 0 0 35px #f0f; }
}

.timer.warning {
    animation: shake 0.5s infinite, glow 0.5s infinite;
    color: #f44336;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes glow {
    0% { text-shadow: 0 0 10px red; }
    100% { text-shadow: 0 0 20px red, 0 0 30px red; }
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.profile img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.profile span {
    font-size: 1.2em;
    font-weight: bold;
}

/* Handle for the sidebar toggle button */
.toggle-btn {
    position: absolute;
    right: -40px; /* Adjust as needed */
    top: 20px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    transition: background 0.3s ease;
}

.toggle-btn:hover {
    background: #45a049;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        display: none; /* Hidden by default on mobile */
    }

    .sidebar.collapsed {
        display: block;
        transform: translateX(0);
    }

    .toggle-btn {
        display: block;
    }
}
/* Add these styles to your existing styles.css */

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    text-align: center;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#username {
    width: 80%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.2em;
}



/* Add these styles to your existing styles.css */

/* Add these styles to your existing styles.css */

.result-container {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(to right, #ff7e5f, #feb47b);
    height: 170vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.result-container h1 {
    font-size: 2.5em;
    color: #fff;
    margin-bottom: 20px;
}

.result-card {
    background-color: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 80%;
    max-width: 500px;
    margin-bottom: 20px;
}

.result-card p {
    font-size: 1.5em;
    margin: 10px 0;
}

.user-name {
    font-weight: bold;
    color: #ff7e5f;
}

.user-score {
    font-weight: bold;
    color: #4CAF50;
}

.result-container button {
    padding: 15px 30px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.result-container button:hover {
    background-color: #45a049;
}

canvas {
    max-width: 100%;
    margin: 20px 0;
}

#qr-code {
    margin: 20px 0;
}

/* Floating Button for Mobile */
.floating-btn {
    display: none; /* Initially hidden */
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 1.5em;
    animation: floatingblink 1s infinite, floatingshake 0.5s infinite;
    z-index: 1000;
}

@keyframes floatingblink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes floatingshake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@media (max-width: 768px) {
    .floating-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

