body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 10px;
            background-color: #f0f0f0;
            color: #333;
        }

        .container {
            max-width: 900px;
            margin: 10px auto;
            padding: 15px;
            background-color: white;
            border: 1px solid #ccc;
            border-radius: 8px;
        }

        .main-title {
            font-size: 1.5em;
            margin-bottom: 15px;
            border-bottom: 2px solid #333;
            padding-bottom: 5px;
        }

        /* --- Table/Planner Specific CSS --- */
        .planner-section {
            overflow-x: auto;
        }

        .planner-table {
            table-layout: fixed;
            border-collapse: collapse;
            width: 100%;
            text-align: center;
            border: 1px solid #333;
        }

        .planner-table thead th {
            padding: 8px;
            border: 1px solid #333;
            background-color: #ddd;
            text-align: center;
        }

        .planner-table tr,
        .planner-table td,
        .planner-table th {
            border: 1px solid #333;
        }

        .planner-table tr.year-spacer-row td {
            height: 40px;
            border: none;
            border-top: 5px solid #333;
            background-color: #f0f0f0;
            padding: 0;
        }

        .planner-table tr.add-controls-row td {
            border: none;
            padding: 10px 0;
            background-color: #f9f9f9;
            border-bottom: 1px dashed #666;
            border-top: 1px dashed #666;
        }

        .add-new-sem-btn {
            font-weight: bold;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .year-header,
        .semester-header {
            width: 30px;
            vertical-align: middle;
            position: relative;
            padding: 0;
            height: 100px;
        }

        .year-header span,
        .semester-header span {
            display: block;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-90deg);
            white-space: nowrap;
            font-weight: bold;
        }

        .delete-semester-btn {
            position: absolute;
            top: 5px;
            right: 0px;
            transform: rotate(90deg);
            border: none;
            background: none;
            color: #cc0000;
            cursor: pointer;
            font-size: 1.2em;
            padding: 0;
            line-height: 1;
            z-index: 10;
        }

        .course-shelf {
            min-height: 100px;
            vertical-align: top;
            padding: 5px;
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            align-items: flex-start;
            justify-content: flex-start;
        }

        .course-tile {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 5px;
            min-width: 120px;
            background-color: #e6f0ff;
            border: 1px solid #888;
            border-radius: 4px;
            cursor: grab;
            position: relative;
            font-size: 0.8em;
            line-height: 1.2;
            text-align: center;
        }

        .course-name {
            font-size: 0.9em;
            font-weight: normal;
        }

        .course-code {
            font-weight: bold;
            font-size: 1em;
        }

        .course-units {
            font-size: 0.8em;
            margin-top: 3px;
        }

        .course-list-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 15px;
            padding: 10px;
            border: 1px dashed #666;
            min-height: 50px;
            border-radius: 4px;
        }

        .remove-btn {
            position: absolute;
            top: -2px;
            right: 0px;
            background: none;
            border: none;
            font-size: 1.1em;
            cursor: pointer;
            padding: 0 4px;
            color: red;
            line-height: 1;
        }

        .unit-counter {
            width: 80px;
            font-weight: bold;
            vertical-align: middle;
            font-size: 0.9em;
        }

        .over-capacity {
            color: red;
            font-weight: bold;
        }

        .input-section {
            padding: 10px;
            border: 1px solid #ccc;
            background-color: #eee;
            margin-bottom: 15px;
            border-radius: 4px;
        }

        .input-section h2 {
            font-size: 1.1em;
            margin-bottom: 10px;
        }

        .form-group {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: flex-end;
        }

        .form-group>div {
            flex-grow: 1;
            flex-shrink: 1;
            flex-basis: 150px;
            position: relative; /* Needed for dropdown positioning */
        }

        .form-group>div:nth-child(3) {
            max-width: 80px;
        }

        label {
            display: block;
            font-size: 0.9em;
            margin-bottom: 3px;
        }

        input[type="text"],
        input[type="number"] {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box; /* Ensures padding doesn't affect final width */
        }

        #addCourseBtn, #fetchTEST {
            padding: 8px 15px;
            border: 1px solid #333;
            background-color: #333;
            color: white;
            border-radius: 4px;
            cursor: pointer;
            height: 35px; /* Match input height */
        }

        #fetchTEST {
            background-color: #1a73e8;
            border-color: #1a73e8;
            margin-bottom: 10px;
        }

        #courseTrashBin {
            margin-top: 10px;
            padding: 10px;
            border: 2px dashed red;
            background-color: #ffe6e6;
            text-align: center;
            color: red;
            font-weight: bold;
            border-radius: 4px;
        }

        #courseTrashBin.drag-over {
            background-color: #ffcccc;
        }

        .summary-section {
            text-align: right;
            margin-top: 10px;
        }

        .summary-section p {
            font-size: 1.1em;
            font-weight: bold;
            padding-top: 5px;
            border-top: 2px solid #ccc;
        }

        /* --- Search Bar and Dropdown CSS --- */
        .dropdown {
    display: none; /* Hidden initially */
    position: absolute; /* Position below the input */
    background-color: white; /* Background color for dropdown */
    border: 1px solid #ccc; /* Border for dropdown */
    z-index: 1; /* Ensure dropdown appears above other elements */
    width: 100%; /* Match input width */
    max-height: 150px; /* Limit height */
    overflow-y: auto; /* Enable scrolling */
}

        #myCourseList {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }
        
        #myCourseList li {
            padding: 8px 12px;
            cursor: pointer;
        }

        #myCourseList li:hover {
            background-color: #eee;
        }