/* General Styling */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f06, #4a90e2);
    color: #333;
}

.navbar {
    background-color: #333;
    color: #fff;
    padding: 0px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    outline: none;
}

.settings {
    width: 90%;
    max-width: 380px;
    background-color: #f7f7f7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: none;
    border-radius: 8px;
}

.settings-content {
    text-align: left;
}

.container {
    max-width: 100%;
    margin: 60px auto 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px;
    flex-direction: column;
    align-items: center;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    text-align: center;
}

#exam-time-remaining {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 20px;
}

#question-info {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

#current-question {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

h1 {
    margin: 0;
}

h2, h3 {
    margin: 0;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 1rem;
    white-space: nowrap;
    outline: none;
}

button:hover {
    transform: translateY(-3px);
    border: none;
    outline: none;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #fff;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-info {
    background-color: #17a2b8;
    color: #fff;
}

.btn-info:hover {
    background-color: #138496;
}

/* Next Question Button Color Adjustment */
.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Disabled button styling */
.disabled-button-yellow {
    background-color: rgba(255, 193, 7, 0.5);
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.disabled-button-green {
    background-color: rgba(40, 167, 69, 0.5);
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.disabled-button-grey {
    background-color: rgba(169, 169, 169, 0.5);
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.disabled-button-blue-grey {
    background-color: rgba(0, 123, 255, 0.5);
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

input[type="number"], input[type="text"] {
    width: 90%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

/* Tooltip Styling */
button[disabled]:hover::after {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 1000;
}

/* Styling for the log container */
.log-container {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 20px;
    padding: 10px;
    background-color: #f7f9fc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.log-container::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-thumb {
    background-color: #c0c0c0;
    border-radius: 4px;
}

.log-entry {
    background-color: #ffffff;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.log-entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.log-entry:last-child {
    margin-bottom: 0;
}

.log-entry h4 {
    font-size: 1.2em;
    margin: 0;
    font-weight: 600;
    color: #333;
}

.log-entry p {
    font-size: 1em;
    margin: 5px 0 0;
    color: #666;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 380px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons .btn {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Media Query for iPhone 12 and Above */
@media (max-width: 430px) {
    .navbar {
        padding: 5px;
        font-size: 14px;
    }

    .container {
        margin: 20px auto; /* Reduce margin to fit content */
    }

    .card {
        padding: 10px;
        max-width: 90%;
        margin-bottom: 15px; /* Reduce margin between cards */
    }

    #exam-time-remaining {
        font-size: 2.5rem; /* Adjust font size to fit */
    }

    #current-question {
        font-size: 1.25rem; /* Adjust font size */
    }

    button {
        font-size: 0.875rem;
        padding: 8px 10px; /* Adjust padding */
    }

    h1, h2, h3 {
        font-size: 1.4rem;
    }

    .log-container {
        max-height: 140px; /* Adjust max-height */
    }
}

