:root {
    --background-color: #ffffff;
    --text-color: #333333;
    --card-bg-color: #fff;
    --card-border-color: #ddd;
    --table-header-bg-color: #f9f9f9;
    --table-row-bg-color: #f2f2f2;
    --table-hover-bg-color: #e6e6e6;
    --button-bg-color: #f8f8f8;
    --button-hover-bg-color: #e0e0e0;
    --modal-bg-color: #ffffff;
    --modal-border-color: #888;
    --modal-overlay-bg-color: rgba(0, 0, 0, 0.5);
    --close-modal-color: #888;
    --close-modal-hover-color: red;
    --table-border-color: #ddd;
    --input-border-color: #ccc;
    --input-focus-border-color: #4CAF50;
    --select-bg-color: #fff;
}

[data-theme="dark"] {
    --background-color: #121212;
    --text-color: #eaeaea;
    --card-bg-color: #333333;
    --card-border-color: #444;
    --table-header-bg-color: #222;
    --table-row-bg-color: #333333;
    --table-hover-bg-color: #444;
    --button-bg-color: #444;
    --button-hover-bg-color: #555;
    --modal-bg-color: #333;
    --modal-border-color: #666;
    --modal-overlay-bg-color: rgba(0, 0, 0, 0.8);
    --close-modal-color: #ddd;
    --close-modal-hover-color: red;
    --table-border-color: #666;
    --input-border-color: #555;
    --input-focus-border-color: #4CAF50;
    --select-bg-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#marks-container {
    margin: 0 auto;
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 90%;
}

.grade-card {
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    background-color: var(--card-bg-color);
    margin-top: 20px;
    border: 1px solid var(--card-border-color);
}

.grade-card p {
    margin: 5px 0;
    font-size: 14px;
}

.grade-card strong {
    font-weight: bold;
}

.grades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
    margin: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.grades-table th,
.grades-table td {
    border: 1px solid var(--table-border-color);
    padding: 8px;
}

.grades-table th {
    background-color: var(--table-header-bg-color);
    text-align: center;
    font-weight: bold;
}

.grades-table tr:nth-child(even) {
    background-color: var(--table-row-bg-color);
}

.grades-table tr:hover {
    background-color: var(--table-hover-bg-color);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--modal-overlay-bg-color);
}

.modal-content {
    background-color: var(--modal-bg-color);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--modal-border-color);
    width: 50%;
    border-radius: 8px;
}

.close-modal {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--close-modal-color);
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--close-modal-hover-color);
}

.actions-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.actions-container button {
    padding: 10px 15px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: var(--button-bg-color);
    border-radius: 5px;
}

.actions-container button:hover {
    background-color: var(--button-hover-bg-color);
}

#grades-list {
    overflow-y: auto;
    margin-top: 10px;
    scrollbar-width: thin;
    scrollbar-color: #888 #fff;
    width: 100%;
}

.grade-card {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
}

form {
    display: flex;
    flex-direction: column;
}

form label {
    margin-bottom: 5px;
    font-weight: bold;
}

form input, form select {
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    font-size: 1em;
}

form input:focus, form select:focus {
    border-color: var(--input-focus-border-color);
}

#selectors-container {
    margin-bottom: 10px;
}

#selectors-container label {
    font-weight: bold;
    margin-right: 10px;
}

#selectors-container select {
    padding: 5px 10px;
    font-size: 1em;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    max-width: 30%;
    margin-right: 100%;
    background-color: var(--select-bg-color);
}
