body {
    font-family: Arial, sans-serif;
    padding: 20px;
    transition: background-color 0.5s, color 0.5s;
}

body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

body.light-mode {
    background-color: #f0f0f0;
    color: #333;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header nav a {
    margin: 0 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

header nav a:hover {
    text-decoration: underline;
    transform: scale(1.1);
    background-color: #f0f0f0;
}

body.dark-mode header nav a:hover {
    background-color: #555;
}

/* Mode Switcher Styles */
.mode-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
}

.mode-switcher span {
    color: #ccc;
}

.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: gray;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

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

th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
}

body.dark-mode th, body.dark-mode td {
    border-color: #333;
}

body.light-mode th, body.light-mode td {
    border-color: #ccc;
}

th {
    background-color: #f9f9f9;
}

body.dark-mode th {
    background-color: #333;
}

#currentMajor {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.25em;
}

.course-cell {
    cursor: pointer;
    position: relative;
    background-color: inherit;
    animation: fadeIn 0.4s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-cell:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .course-cell:hover {
    background-color: #555;
    transform: scale(1.10);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

#popupContent {
    animation: fadeIn 0.35s ease-in-out;
}

.course-code {
    display: block;
    font-weight: bold;
}

.course-name {
    display: block;
    font-size: 0.8em;
    opacity: 0.7;
}

/* Highlighting styles */
.highlight-prerequisite {
    background-color: #ffcdd2;
}

body.dark-mode .highlight-prerequisite {
    background-color: #f06292;
}

.highlight-corequisite {
    background-color: #fff9c4;
}

body.dark-mode .highlight-corequisite {
    background-color: #ffcc80;
}

.highlight-postrequisite {
    background-color: #c8e6c9;
}

body.dark-mode .highlight-postrequisite {
    background-color: #a5d6a7;
}

.prerequisite {
    background-color: #ffcdd2;
}

body.dark-mode .prerequisite {
    background-color: #f06292;
}

.corequisite {
    background-color: #fff9c4;
}

body.dark-mode .corequisite {
    background-color: #ffcc80;
}

.postrequisite {
    background-color: #c8e6c9;
}

body.dark-mode .postrequisite {
    background-color: #a5d6a7;
}

/* Color key styles */
#colorKey {
    margin-top: 20px;
}

#colorKey h2 {
    margin-bottom: 10px;
}

#colorKey ul {
    list-style: none;
    padding: 0;
}

#colorKey li {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.key-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

footer {
    text-align: center;
    margin-top: 20px;
}

footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

#coursePopup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    padding-top: 60px;
}

#popupContent {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

body.dark-mode #popupContent {
    background-color: #222;
}

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

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

body.dark-mode .close-btn:hover,
body.dark-mode .close-btn:focus {
    color: #fff;
}

/* New Styles for Search Bar */
#searchContainer {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#searchBox {
    width: 300px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    border-radius: 4px;
    margin-right: 10px;
}

body.dark-mode #searchBox {
    border-color: #555;
    background-color: #222;
    color: #fff;
}

#searchButton {
    padding: 10px 20px;
    border: none;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

#searchButton:hover {
    background-color: #555;
}

#backButton {
    padding: 10px 20px;
    border: none;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

#backButton:hover {
    background-color: #555;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}

.dropbtn:hover, .dropbtn:focus {
    background-color: #555;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

body.dark-mode .dropdown-content {
    background-color: #333;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

body.dark-mode .dropdown-content a {
    color: #fff;
}

.dropdown-content a:hover {
    background-color: #f0f0f0;
}

body.dark-mode .dropdown-content a:hover {
    background-color: #555;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mini Logo */
#miniLogo {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

/* Center Table */
#courseTable {
    margin: 0 auto;
    max-width: 80%;
}

/* New Styles for Search Bar */
#searchContainer {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#searchBox {
    width: 300px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    border-radius: 4px;
    margin-right: 10px;
}

body.dark-mode #searchBox {
    border-color: #555;
    background-color: #222;
    color: #fff;
}

#searchButton {
    padding: 10px 20px;
    border: none;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

#searchButton:hover {
    background-color: #555;
}

#backButton {
    padding: 10px 20px;
    border: none;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

#backButton:hover {
    background-color: #555;
}

.about-page {
    background-image: url('./assets/UtdBG2.jpeg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
}

/* Style for the content container with a semi-transparent background */
.content-container {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 30px;
    border-radius: 10px;
}

.highlight-prerequisite-sequence {
    background-color: lightblue !important;
}

.highlight-prerequisite {
    background-color: red !important;
}

.highlight-corequisite {
    background-color: yellow !important;
}

.highlight-postrequisite {
    background-color: green !important;
}

.highlight-postrequisite-sequence {
    background-color: lightgreen !important;
}

.highlight-prerequisite-sequence {
    background-color: lightblue !important;
}

.highlight-prerequisite {
    background-color: red !important;
}

.highlight-corequisite {
    background-color: yellow !important;
}

.highlight-postrequisite-sequence {
    background-color: lightgreen !important;
}

.highlight-postrequisite {
    background-color: green !important;
}

.key-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}


/* Styles for the animated button */
.animated-button {
    display: inline-block;
    padding: 15px 25px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    background-color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
}

.animated-button:hover {
    background-color: #555;
    transform: scale(1.1);
}

.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.8);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    text-align: center;
}

body.dark-mode .modal-content {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content p {
    margin-bottom: 20px;
}

.modal-content label {
    display: block;
    margin-bottom: 20px;
}

.modal-content button {
    background-color: #cccccc;
    color: #fff;
    padding: 10px 20px;
    border: none;
    cursor: not-allowed;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.modal-content button:enabled {
    background-color: #007BFF;
    cursor: pointer;
}

.modal-content button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

body.dark-mode .modal-content button {
    color: #fff;
}

body.dark-mode .modal-content button:disabled {
    background-color: #777;
}

body.dark-mode .modal-content button:enabled {
    background-color: #007BFF;
}

/* Additional styles for comments page */

.comments-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100vh;
    overflow: hidden;
    background-color: #f0f0f0;
}

body.dark-mode .comments-container {
    background-color: #121212;
}

.comment {
    position: absolute;
    width: 90%;
    max-width: 800px;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

body.dark-mode .comment {
    background-color: #333;
}

.comment-text {
    font-size: 1.2em;
    line-height: 1.6;
    color: #333;
    text-align: center;
    position: relative;
}

body.dark-mode .comment-text {
    color: #fff;
}

.comment-visible {
    opacity: 1;
    transform: translateY(0);
}

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/parallax-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    z-index: -1;
    transform: translateZ(-1px) scale(2);
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
    float: left;
}

.comment-actions {
    margin-top: 10px;
    text-align: center;
}

.comment-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    font-size: 1em;
    color: #333;
}

.comment-actions button:hover {
    color: #555;
}

body.dark-mode .comment-actions button {
    color: #fff;
}

body.dark-mode .comment-actions button:hover {
    color: #aaa;
}

/* 3D Transformations and Parallax Effects */
.comment {
    perspective: 1000px;
}

.comment-visible {
    opacity: 1;
    transform: translateY(0) rotateY(0);
    transition: opacity 1s ease, transform 1s ease;
}

.comment-hidden {
    opacity: 0;
    transform: translateY(50px) rotateY(90deg);
}

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/parallax-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    z-index: -1;
    transform: translateZ(-1px) scale(2);
}

/* SVG Animations */
@keyframes draw {
    0% {
        stroke-dasharray: 0, 100;
    }
    100% {
        stroke-dasharray: 100, 0;
    }
}

.comment svg {
    width: 100px;
    height: 100px;
    display: block;
    margin: 0 auto;
    animation: draw 4s infinite;
}

.quote-mark {
    fill: none;
    stroke: #333;
    stroke-width: 2;
}

body.dark-mode .quote-mark {
    stroke: #fff;
}
