#results .card {
    transition: transform 0.2s ease-in-out;
}

#results .card:hover {
    transform: scale(1.03);
}

.card {
    font-size: 0.9rem;
    /* 縮小字體 */
    border-radius: 8px;
    /* 圓角更小 */
}

.card-body {
    padding: 8px;
    /* 減少內邊距 */
}

.card-title {
    font-size: 1rem;
    /* 縮小標題字體 */
}

.card-text {
    font-size: 0.85rem;
    /* 縮小內文字體 */
}

.loading-container {
    display: none;
    /* 預設隱藏 */
    text-align: center;
    margin: 20px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-container p {
    font-size: 16px;
    color: #007bff;
    margin-top: 10px;
}

.timetable-container {
    width: 100%;
    overflow-x: auto; /* 手機啟用橫向滾動 */
    padding: 0 10px;
}

.timetable-wrapper {
    width: 100%;
    min-width: 800px; /* 保證課表不會太窄 */
    max-width: 100%;
    margin: auto;
}

@media (max-width: 768px) {
    .timetable-wrapper {
        min-width: unset;
        width: 100%; /* 讓內容自適應手機寬度 */
        font-size: 12px; /* 調整字體大小來適配 */
    }

    .timetable-wrapper table {
        font-size: 12px;
    }

    .timetable-wrapper .small {
        font-size: 10px;
    }
}
