body {
    background-color: #f8f9fa;
    font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

.navbar {
    background: white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0;
}

.navbar-brand {
    font-weight: 900;
    font-size: 2.2rem;
    color: #1b4332;
    text-decoration: none;
    letter-spacing: 1px;
}

.navbar-brand:hover {
    color: #1b4332;
}

.nav-categories {
    background: white;
    width: 100%;
    border-bottom: 3px solid #1b4332;
}

.nav-categories .container {
    display: flex;
    justify-content: flex-start;
    gap: 0;
}

.nav-cat-link {
    color: #333;
    text-decoration: none;
    padding: 18px 28px;
    display: inline-block;
    font-weight: 500;
    font-size: 18px;
    transition: all 0.2s;
    position: relative;
}

.nav-cat-link:first-child {
    padding-left: 0;
}

.nav-cat-link:hover {
    color: #1b4332;
    background: #f8f9fa;
}

.nav-cat-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #ff7b00;
}

.user-avatar-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d6a4f 0%, #1b4332 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.user-dropdown-menu {
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: none;
    padding: 8px 0;
    margin-top: 8px;
}

.exam-list {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.exam-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    border-radius: 8px;
}

.exam-item:last-child {
    border-bottom: none;
}

.exam-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    color: #198754;
}

.exam-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.exam-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #198754 0%, #2d6a4f 100%);
    color: white;
    border-radius: 12px;
    flex-shrink: 0;
}

.exam-details h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.exam-details p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.exam-arrow {
    font-size: 1.5rem;
    color: #198754;
    transition: all 0.2s;
}

.exam-item:hover .exam-arrow {
    transform: translateX(5px);
}

.ad-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 40px auto 60px;
    max-width: 1200px;
    border-radius: 10px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 300px;
}

.ad-content {
    color: #333;
}

.ad-content h2 {
    color: #1b4332;
}

.notice-box {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.notice-box h5 {
    color: #856404;
    font-weight: 700;
    margin-bottom: 10px;
}

.notice-box p {
    color: #856404;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* 手機版 RWD */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem !important;
    }

    /* 分類導航 - 手機版水平捲動 */
    .nav-categories {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-categories::-webkit-scrollbar { display: none; }
    .nav-categories .container {
        padding-left: 12px;
        padding-right: 12px;
        white-space: nowrap;
        flex-wrap: nowrap;
    }

    .nav-cat-link {
        padding: 12px 14px;
        font-size: 15px;
        flex-shrink: 0;
    }

    .ad-section {
        margin: 30px 10px 40px;
        padding: 40px 20px;
        min-height: 200px;
    }

    .exam-list {
        padding: 20px 15px;
    }

    .exam-item {
        padding: 15px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .exam-info {
        width: 100%;
        gap: 15px;
    }

    .exam-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .exam-details h4 {
        font-size: 1.1rem;
    }

    .exam-arrow {
        align-self: center;
    }
}
