:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #f5f7fa;
    --dark-bg: #34495e;
    --text-color: #333;
    --light-text: #fff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
    text-align: center;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.summary {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background-color: var(--dark-bg);
    padding: 15px;
    border-radius: var(--border-radius);
    color: var(--light-text);
}

.summary-item {
    text-align: center;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    flex: 1;
    min-width: 120px;
}

.summary-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.tools {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button.danger {
    background-color: var(--accent-color);
}

button.danger:hover {
    background-color: #c0392b;
}

.accordion {
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.accordion-header {
    background-color: var(--secondary-color);
    padding: 15px;
    color: var(--light-text);
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-content {
    background-color: white;
    padding: 15px;
    display: none;
}

.accordion-content.active {
    display: block;
}

.semester-summary {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: var(--primary-color);
    color: var(--light-text);
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.course-code {
    color: var(--secondary-color);
    font-weight: bold;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: var(--border-radius);
}

/* Adjusted styles for the footer link */
.footer a {
    color: var(--secondary-color);
    /* Match the secondary theme color */
    text-decoration: none;
    /* Remove underline for a cleaner look */
    font-weight: bold;
    /* Make the link text bold */
}

.footer a:hover {
    text-decoration: underline;
    /* Add underline on hover for emphasis */
}

@media (max-width: 768px) {
    .tools {
        flex-direction: column;
    }

    .summary-item {
        flex: none;
        width: 100%;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    button {
        width: 100%;
        margin-bottom: 10px;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    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: 700px;
    border-radius: var(--border-radius);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#importData {
    width: 100%;
    height: 200px;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

#yearSelect,
#semesterSelect {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    margin-right: 10px;
    font-size: 1rem;
}

.select-container {
    display: flex;
    margin-bottom: 20px;
    align-items: center;
    /* Vertically align items */
}