/* 学员中心 / — 移动端 */
:root {
    --ddu-bg: #f4f6f9;
    --ddu-primary: #3b8cff;
    --ddu-primary-dark: #2a6fd6;
    --ddu-teal: #2ec4b6;
    --ddu-orange: #ff9f43;
    --ddu-text: #1a2233;
    --ddu-muted: #6b7280;
    --ddu-card: #ffffff;
    --ddu-radius: 14px;
    --ddu-shadow: 0 4px 18px rgba(30, 60, 120, 0.08);
    --ddu-nav-h: 58px;
    --ddu-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.ddu-body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--ddu-bg);
    color: var(--ddu-text);
    min-height: 100vh;
    line-height: 1.5;
}

.ddu-app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: calc(var(--ddu-nav-h) + var(--ddu-safe-bottom) + 12px);
}

/* 顶栏 */
.ddu-topbar {
    text-align: center;
    padding: 14px 16px 0;
    background: linear-gradient(180deg, #e8f2ff 0%, #f4f8ff 100%);
}

.ddu-school-name {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
    letter-spacing: 0.02em;
}

.ddu-school-sub {
    font-size: 12px;
    color: var(--ddu-muted);
    margin-top: 4px;
}

/* 欢迎横幅 */
.ddu-hero {
    margin: 12px 14px 0;
    padding: 18px 16px 20px;
    border-radius: var(--ddu-radius);
    background: linear-gradient(135deg, #d4e8ff 0%, #b8d4f8 45%, #a8c8f0 100%);
}

.ddu-hero h2 {
    font-size: 16px;
    font-weight: 700;
    color: #1a3d6b;
    margin-bottom: 10px;
    line-height: 1.5;
}

.ddu-hero p {
    font-size: 13px;
    color: #3d5a80;
    line-height: 1.7;
}

/* 公告 */
.ddu-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 14px;
    padding: 10px 12px;
    background: var(--ddu-card);
    border-radius: 10px;
    box-shadow: var(--ddu-shadow);
    text-decoration: none;
    color: inherit;
}

.ddu-notice-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8f2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ddu-primary);
}

.ddu-notice-marquee {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ddu-notice-text {
    display: inline-block;
    min-width: 100%;
    padding-left: 100%;
    font-size: 13px;
    color: var(--ddu-text);
    white-space: nowrap;
    animation: dduNoticeMarquee 14s linear infinite;
}

.ddu-notice:hover .ddu-notice-text {
    animation-play-state: paused;
}

@keyframes dduNoticeMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.ddu-notice-arrow {
    color: #c0c8d4;
    font-size: 18px;
}

/* 卡片区块 */
.ddu-section {
    margin: 0 14px 14px;
    background: var(--ddu-card);
    border-radius: var(--ddu-radius);
    box-shadow: var(--ddu-shadow);
    padding: 14px 12px 16px;
}

.ddu-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ddu-text);
}

.ddu-section-head .ddu-sec-icon {
    width: 22px;
    height: 22px;
    color: var(--ddu-primary);
}

.ddu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
}

.ddu-grid-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    text-decoration: none;
    color: var(--ddu-text);
    border-radius: 10px;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.ddu-grid-item:active {
    background: #f0f4fa;
}

.ddu-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ddu-item-icon svg {
    width: 20px;
    height: 20px;
}

.ddu-item-icon--blue {
    background: #e8f2ff;
    color: var(--ddu-primary);
}

.ddu-item-icon--teal {
    background: #e0f7f4;
    color: var(--ddu-teal);
}

.ddu-item-icon--orange {
    background: #fff3e6;
    color: var(--ddu-orange);
}

.ddu-item-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.ddu-item-label--emphasis {
    font-weight: 700;
    color: #dc2626;
}

.ddu-guide-pulse {
    display: inline-block;
    transform-origin: left center;
    animation: dduGuidePulse 2.7s ease-in-out infinite;
}

@keyframes dduGuidePulse {
    0% {
        transform: scale(1);
    }
    17% {
        transform: scale(1.045);
    }
    31% {
        transform: scale(0.985);
    }
    48% {
        transform: scale(1.025);
    }
    63% {
        transform: scale(1.065);
    }
    79% {
        transform: scale(0.995);
    }
    100% {
        transform: scale(1);
    }
}

.ddu-item-arrow {
    color: #d1d5db;
    font-size: 14px;
}

/* CTA */
.ddu-cta {
    margin: 4px 14px 20px;
    text-align: center;
}

.ddu-cta-tip {
    font-size: 13px;
    color: var(--ddu-muted);
    margin-bottom: 12px;
}

.ddu-cta-btns {
    display: flex;
    gap: 12px;
}

.ddu-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 10px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.ddu-btn-primary {
    background: linear-gradient(135deg, #4a9aff, #2a7ae8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 140, 255, 0.35);
}

.ddu-btn-outline {
    background: #fff;
    color: var(--ddu-primary);
    border: 1.5px solid var(--ddu-primary);
}

/* 底部导航 */
.ddu-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 480px;
    margin: 0 auto;
    height: calc(var(--ddu-nav-h) + var(--ddu-safe-bottom));
    padding-bottom: var(--ddu-safe-bottom);
    background: #fff;
    border-top: 1px solid #e8ecf2;
    display: flex;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

.ddu-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #9ca3af;
    font-size: 10px;
    padding-top: 6px;
}

.ddu-tab svg {
    width: 22px;
    height: 22px;
}

.ddu-tab.active {
    color: var(--ddu-primary);
}

/* 占位页 */
.ddu-page-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 12px 14px;
    font-size: 14px;
    color: var(--ddu-primary);
    text-decoration: none;
}

.ddu-placeholder {
    margin: 0 14px 24px;
    padding: 32px 20px;
    background: var(--ddu-card);
    border-radius: var(--ddu-radius);
    box-shadow: var(--ddu-shadow);
    text-align: center;
}

.ddu-placeholder h1 {
    font-size: 18px;
    margin-bottom: 12px;
}

.ddu-placeholder p {
    font-size: 14px;
    color: var(--ddu-muted);
    line-height: 1.7;
}


/* 金门大事件 */
.ddu-article-list {
    margin: 0 14px 18px;
    display: grid;
    gap: 10px;
}

.ddu-article-item {
    display: grid;
    grid-template-columns: 58px 1fr 16px;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    background: var(--ddu-card);
    border-radius: 14px;
    box-shadow: var(--ddu-shadow);
    color: inherit;
    text-decoration: none;
}

.ddu-article-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 12px;
    background: #e8f2ff;
    color: var(--ddu-primary-dark);
}

.ddu-article-date span {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.ddu-article-date small {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.ddu-article-main {
    min-width: 0;
}

.ddu-article-main h2 {
    font-size: 15px;
    color: var(--ddu-text);
    line-height: 1.35;
    margin-bottom: 5px;
    letter-spacing: 0;
}

.ddu-article-main p {
    font-size: 12px;
    color: var(--ddu-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ddu-article-arrow {
    color: #c0c8d4;
    font-size: 20px;
}


/* 文章详情自动排版 */
.ddu-article-content {
    color: #334155;
    font-size: 15px;
    line-height: 1.95;
    word-break: break-word;
}

.ddu-article-content p {
    margin: 0 0 15px;
    text-align: justify;
}

.ddu-article-content h2,
.ddu-article-content h3 {
    margin: 22px 0 10px;
    color: #0f172a;
    line-height: 1.4;
    letter-spacing: 0;
}

.ddu-article-content h2 {
    font-size: 18px;
    padding-left: 10px;
    border-left: 4px solid var(--ddu-primary);
}

.ddu-article-content h3 {
    font-size: 16px;
}

.ddu-article-content ul {
    margin: 0 0 16px 1.2em;
    padding: 0;
}

.ddu-article-content li {
    margin: 6px 0;
}

.ddu-article-content figure {
    margin: 18px 0;
}

.ddu-article-content img {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 12px;
    background: #f1f5f9;
}

.ddu-article-content figcaption {
    margin-top: 7px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}


/* 金门大事件文章详情 */
.ddu-event-article {
    margin: 0 14px 24px;
    padding: 20px 18px 24px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.ddu-event-article-head {
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}

.ddu-event-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f2ff;
    color: var(--ddu-primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.ddu-event-article h1 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.35;
    letter-spacing: 0;
}

.ddu-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.ddu-event-meta span {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f8fafc;
}

.ddu-article-content strong {
    color: #0f172a;
    font-weight: 800;
}


/* 文章安全富文本白名单样式 */
.ddu-article-content .text-red {
    color: #dc2626;
}

.ddu-article-content .text-blue {
    color: #2563eb;
}

.ddu-article-content .text-green {
    color: #16a34a;
}

.ddu-article-content .text-gray {
    color: #64748b;
}

.ddu-article-content .mark-yellow {
    background: #fef3c7;
    color: #92400e;
    padding: 0 3px;
    border-radius: 4px;
}

.ddu-article-content .mark-red {
    background: #fee2e2;
    color: #b91c1c;
    padding: 0 3px;
    border-radius: 4px;
}

.ddu-article-content .center {
    text-align: center;
}

.ddu-article-content .note,
.ddu-article-content .warning {
    margin: 16px 0;
    padding: 12px 13px;
    border-radius: 12px;
    line-height: 1.75;
}

.ddu-article-content .note {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.ddu-article-content .warning {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}
