:root {
    --primary-color: #7B1FA2;
    --primary-dark: #4A148C;
    --secondary-color: #6c757d;
    --border-radius: 12px;
}

.college-news-ticker-bar {
    margin-bottom: 1rem;
}

.container .college-news-ticker-bar {
    max-width: 100%;
    width: 100%;
}

.college-news-modal-dialog {
    width: auto;
    max-width: min(680px, 92vw);
    min-width: 0;
    margin: 1rem auto;
    transition: width 0.15s ease;
}

.college-news-modal-dialog.college-news-modal-compact {
    max-width: min(380px, 92vw);
}

.college-news-modal-dialog.college-news-modal-medium {
    max-width: min(520px, 92vw);
}

.college-news-modal-dialog.college-news-modal-wide {
    max-width: min(680px, 94vw);
}

.college-news-modal-content {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    width: 100%;
    height: auto;
}

.college-news-modal-title-wrap {
    flex: 1;
    min-width: 0;
}

.college-news-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.2);
}

.college-news-type-icon {
    font-size: 13px;
}

.college-news-modal-header {
    color: white;
    border-bottom: none;
    padding: 18px 20px;
}

.college-news-modal-header .modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.college-news-modal-date {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
}

.college-news-modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.college-news-modal-body {
    padding: 24px 28px;
    font-size: 16px;
    line-height: 2;
    color: #333;
    text-align: justify;
    text-justify: inter-ideograph;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-height: none;
    overflow-y: visible;
    -webkit-font-smoothing: antialiased;
}

.college-news-modal-body.is-scrollable {
    overflow-y: auto;
}

.college-news-modal-body p {
    margin: 0 0 1em;
    text-indent: 2em;
}

.college-news-modal-body p:last-child {
    margin-bottom: 0;
}

.college-news-modal-body .college-news-detail-list {
    margin: 0 0 1em;
    padding-left: 1.6em;
    list-style-type: disc;
}

.college-news-modal-body .college-news-detail-list li {
    margin-bottom: 0.65em;
    line-height: 1.95;
    text-align: justify;
    text-justify: inter-ideograph;
}

.college-news-modal-body .college-news-detail-list li:last-child {
    margin-bottom: 0;
}

.college-news-modal-body .college-news-empty-text {
    margin: 0;
    text-indent: 0;
    text-align: center;
    color: var(--secondary-color);
}

.college-news-modal-body .college-news-image-paragraph {
    text-indent: 0 !important;
    text-align: center;
    margin: 0.65em 0 0.85em;
    line-height: 1.5;
}

.college-news-modal-body img,
.college-news-modal-body .college-news-content-image,
.college-news-modal-body .college-news-image-paragraph img {
    max-width: min(85%, 280px) !important;
    max-height: 200px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    margin: 0.35em auto 0.5em;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.college-news-modal-dialog.college-news-modal-compact .college-news-modal-body img,
.college-news-modal-dialog.college-news-modal-compact .college-news-modal-body .college-news-content-image,
.college-news-modal-dialog.college-news-modal-compact .college-news-modal-body .college-news-image-paragraph img {
    max-width: min(82%, 240px) !important;
    max-height: 170px !important;
}

.college-news-modal-dialog.college-news-modal-wide .college-news-modal-body img,
.college-news-modal-dialog.college-news-modal-wide .college-news-modal-body .college-news-content-image,
.college-news-modal-dialog.college-news-modal-wide .college-news-modal-body .college-news-image-paragraph img {
    max-width: min(88%, 320px) !important;
    max-height: 220px !important;
}

.college-news-modal-body p img:only-child {
    margin: 0 auto;
}

.college-news-modal-footer {
    border-top: 1px solid #eee;
    padding: 12px 20px;
}

/* 表彰类 - 金色荣耀风格 */
.college-news-modal-content.news-type-commendation .college-news-modal-header {
    background: linear-gradient(135deg, #FFB300 0%, #F57C00 100%);
}

.college-news-modal-content.news-type-commendation .college-news-modal-body {
    background: linear-gradient(180deg, #FFF8E1 0%, #FFFFFF 100%);
    border-top: 3px solid #FFB300;
}

.college-news-modal-content.news-type-commendation .college-news-modal-footer {
    background: #FFF8E1;
    border-top-color: rgba(255, 179, 0, 0.25);
}

.college-news-modal-content.news-type-commendation .college-news-modal-close-btn {
    background-color: #FFB300;
    border-color: #FFB300;
    color: #fff;
}

/* 活动类 - 活力绿色风格 */
.college-news-modal-content.news-type-activity .college-news-modal-header {
    background: linear-gradient(135deg, #66BB6A 0%, #2E7D32 100%);
}

.college-news-modal-content.news-type-activity .college-news-modal-body {
    background: linear-gradient(180deg, #E8F5E9 0%, #FFFFFF 100%);
    border-top: 3px solid #66BB6A;
}

.college-news-modal-content.news-type-activity .college-news-modal-footer {
    background: #E8F5E9;
    border-top-color: rgba(102, 187, 106, 0.25);
}

.college-news-modal-content.news-type-activity .college-news-modal-close-btn {
    background-color: #43A047;
    border-color: #43A047;
    color: #fff;
}

/* 竞赛类 - 激情红色风格 */
.college-news-modal-content.news-type-competition .college-news-modal-header {
    background: linear-gradient(135deg, #EF5350 0%, #C62828 100%);
}

.college-news-modal-content.news-type-competition .college-news-modal-body {
    background: linear-gradient(180deg, #FFEBEE 0%, #FFFFFF 100%);
    border-top: 3px solid #EF5350;
}

.college-news-modal-content.news-type-competition .college-news-modal-footer {
    background: #FFEBEE;
    border-top-color: rgba(239, 83, 80, 0.25);
}

.college-news-modal-content.news-type-competition .college-news-modal-close-btn {
    background-color: #E53935;
    border-color: #E53935;
    color: #fff;
}

/* 会议类 - 沉稳商务风格 */
.college-news-modal-content.news-type-meeting .college-news-modal-header {
    background: linear-gradient(135deg, #607D8B 0%, #37474F 100%);
}

.college-news-modal-content.news-type-meeting .college-news-modal-body {
    background: linear-gradient(180deg, #ECEFF1 0%, #FFFFFF 100%);
    border-top: 3px solid #607D8B;
}

.college-news-modal-content.news-type-meeting .college-news-modal-footer {
    background: #ECEFF1;
    border-top-color: rgba(96, 125, 139, 0.25);
}

.college-news-modal-content.news-type-meeting .college-news-modal-close-btn {
    background-color: #546E7A;
    border-color: #546E7A;
    color: #fff;
}

/* 公告类 - 学院紫色风格 */
.college-news-modal-content.news-type-notice .college-news-modal-header {
    background: linear-gradient(135deg, #7B1FA2 0%, #4A148C 100%);
}

.college-news-modal-content.news-type-notice .college-news-modal-body {
    background: linear-gradient(180deg, #F3E5F5 0%, #FFFFFF 100%);
    border-top: 3px solid #7B1FA2;
}

.college-news-modal-content.news-type-notice .college-news-modal-footer {
    background: #F3E5F5;
    border-top-color: rgba(123, 31, 162, 0.2);
}

.college-news-modal-content.news-type-notice .college-news-modal-close-btn {
    background-color: #7B1FA2;
    border-color: #7B1FA2;
    color: #fff;
}

/* 温馨提醒 + 学院动态滚动 */
.warning-reminder {
    background-color: rgba(123, 31, 162, 0.1);
    color: var(--primary-color);
    padding: 10px 0;
    font-size: 14px;
    border: 1px solid rgba(123, 31, 162, 0.2);
    border-radius: var(--border-radius);
    margin: 4px auto 0 auto;
    margin-bottom: 4px;
    max-width: 800px;
    width: calc(100% - 30px);
    box-shadow: 0 2px 4px rgba(123, 31, 162, 0.1);
    overflow: hidden;
    position: relative;
    min-height: 38px;
}

.warning-marquee-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.warning-content {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: warning-scroll 35s linear infinite;
}

.warning-content.is-static {
    animation: none;
    transform: none;
    display: flex;
    justify-content: center;
    width: 100%;
}

.warning-content.is-static .warning-content-group[aria-hidden="true"] {
    display: none;
}

.warning-content.is-static .warning-content-group {
    padding: 0 12px;
}

.warning-content:hover {
    animation-play-state: paused;
}

.warning-content-group {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.warning-text-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.warning-text-item i {
    font-size: 16px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.warning-separator {
    color: rgba(123, 31, 162, 0.35);
    font-size: 12px;
    flex-shrink: 0;
}

.college-news-ticker-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.college-news-ticker-empty {
    color: var(--secondary-color);
    font-size: 14px;
    flex-shrink: 0;
}

.college-news-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 2px 4px;
    margin: 0;
    color: #1565C0;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    line-height: inherit;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.college-news-ticker-item:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    transform: translateY(-1px);
}

.college-news-ticker-item.news-type-commendation {
    color: #E65100;
}

.college-news-ticker-item.news-type-activity {
    color: #2E7D32;
}

.college-news-ticker-item.news-type-competition {
    color: #C62828;
}

.college-news-ticker-item.news-type-meeting {
    color: #37474F;
}

.college-news-ticker-item.news-type-notice {
    color: #6A1B9A;
}

.college-news-new-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    padding: 1px 7px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, #ff512f, #f09819, #dd2476, #ff512f);
    background-size: 300% 100%;
    animation: new-badge-shine 2.5s linear infinite;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

@keyframes new-badge-shine {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes warning-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 576px) {
    
        .warning-content-group {
            gap: 10px;
            padding: 0 12px;
        }
    
        .college-news-ticker-item {
            font-size: 12px;
        }
    
        .college-news-new-badge {
            font-size: 9px;
            padding: 1px 5px;
        }
}
