* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}



/* 主容器：flex 列，自动占满剩余高度，但内部内容正常滚动 */
.app-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    /* 撑开剩余高度（当 body 用 min-height 时有效） */
}



.site-logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #c0d4f0, #8ab3d7);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

/* 返回按钮样式 (箭头区域) */
.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(70, 90, 110, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 500;
    color: #bdd4ff;
    transition: all 0.2s;
    border: 1px solid #2e3a48;
}

.back-button:hover {
    background: #2d3e54;
    color: white;
    border-color: #5f7f9e;
}

.back-arrow {
    font-size: 1.4rem;
    line-height: 1;
}

.left-group {
    margin-left: 1rem;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.articles-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #2c3e50;
    color: #e0edff;
    padding: 0.4rem 0.9rem;
    border-radius: 1rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #3a5068;
    justify-content: start;
}

.articles-btn svg {
    width: 20px;
    height: 20px;
}

.articles-btn:hover {
    background: #3e6a8c;
    color: white;
    border-color: #6c9ebf;
}

/* 公告横幅基类 */
.announcement-banner {
    background: linear-gradient(95deg, #1e2a3a 0%, #16212b 100%);
    border-left: 4px solid #6c9ebf;
    border-radius: 1rem;
    margin: 0.5rem 0 1.5rem 0;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    overflow: hidden;

    /* 动画过渡属性 */
    transition: opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    /* 足够容纳内容，用于平滑收缩 */
    margin-bottom: 1.5rem;
}

/* 隐藏状态 */
.announcement-banner.hide-banner {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
    /* 隐藏时不可点击关闭按钮 */
}

/* 显示状态（用于强制显示，若有过渡冲突） */
.announcement-banner.show-banner {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    pointer-events: auto;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #e0edff;
    flex: 1;
}

.banner-icon {
    font-size: 1.2rem;
}

#announcementText {
    word-break: break-word;
    line-height: 1.4;
}

.banner-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #c0d4f0;
    font-size: 1.1rem;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.banner-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* 横幅隐藏时的样式 */
.announcement-banner.hidden-banner {
    display: none;
}

/* 视图通用过渡 */
/* 两个视图都设置为 flex 子项，可伸缩 */
.view {
    min-height: 60%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    width: 100%;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    /* 允许内部滚动 */
}

.view.view-hidden {
    opacity: 0;
    transform: translateX(30px) scale(0.96);
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    margin-top: 5.5rem;
}

.hidden {
    display: none;
}

/* 卡片列表区域 (Grid) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 0.5rem;
}

/* 卡片网格区域在内容少时也能撑开父容器高度 */
.cards-grid {
    flex: 1;
    align-content: flex-start;
    /* 卡片从上开始排列，但占满高度时不会拉伸卡片 */
}

/* 作业卡片 */
.assignment-card {
    background: #161c26;
    border-radius: 1rem;
    padding: 1.2rem 1.2rem 1.2rem 1.2rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #2a3140;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(2px);
}

.assignment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.5);
    border-color: #4b6a88;
    background: #19212c;
}

/* 新作业角标 (边角显示) */
.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e2584b;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.7rem;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
    backdrop-filter: blur(2px);
    z-index: 1;
}

.assignment-card.important-card {
    border: 1px solid #e2584b;
    box-shadow: 0 0 12px rgba(226, 88, 75, 0.3);
    background: linear-gradient(145deg, #1c202b, #161a24);
}

/* 重要标识徽章（左上角） */
.important-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e2584b;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1;
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
    animation: pulse 1.2s infinite;
    /* 脉冲动画，更引人注意 */
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
        background-color: #ff6b5c;
        box-shadow: 0 0 0 2px rgba(226, 88, 75, 0.5);
    }

    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

/* 调整 NEW 角标位置，避免与重要标识重叠 */
.new-badge,
.important-badge {
    top: 12px;
    right: 12px;
    left: auto;
    /* 确保在右上角 */
}

/* 已提交卡片样式 */
.assignment-card.submitted-card {
    border: 1px solid #4caf50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
    background: linear-gradient(145deg, #1a2820, #16201a);
}

/* 已提交徽章（右下角） */
.submitted-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #4caf50;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.7rem;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}



.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-right: 3rem;
    color: #f0f3fc;
}

.due-date {
    font-size: 0.85rem;
    color: #8faccf;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    border-left: 3px solid #9f4a3b;
    padding-left: 0.6rem;
}

/* 提交进度区域 */
.progress-area {
    margin-top: 0.8rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #b9cef0;
    margin-bottom: 0.3rem;
}

.progress-bar-bg {
    background: #2a2f3c;
    border-radius: 20px;
    height: 6px;
    overflow: hidden;
}

.progress-fill {
    background: #5d8bb8;
    width: 0%;
    height: 100%;
    border-radius: 20px;
    transition: width 0.2s;
}



/* 提交页面布局 */
.submit-header {
    margin-bottom: 1.5rem;
}


.submit-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #d9e6ff, #9bc0df);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.submit-meta {
    color: #8aa9cc;
    border-left: 3px solid #5282ae;
    padding-left: 0.8rem;
    margin-top: 0.25rem;
}

/* 文件收集卡片组 */
.collection-group {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin: 2rem 0 2rem 0;
}

.collect-card {
    background: #11171f;
    border-radius: 1rem;
    padding: 1.2rem 1.4rem;
    border: 1px solid #2a3442;
    transition: all 0.2s;
}

.collect-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    flex-wrap: wrap;

}

.collect-title>span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-info {
    margin-left: 0.5rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    background: #70352a;
    color: #e6c9c4;
    border-radius: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 压缩区域样式 */
.compression-area {
    margin: 0.5rem 0 0.8rem 0;
    display: none;
    align-items: center;
}

.compression-warning {
    background: #5a2a2a;
    color: #ffb4a2;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 1rem;
    display: inline-block;
    margin-right: 0.5rem;
    
}

.compression-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.btn-compress {
    background: #e2584b;
    border: none;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-compress:hover {
    background: #ff6b5c;
    transform: scale(1.02);
}

.btn-compress:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #11171f;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
}

.progress-wrapper progress {
    width: 120px;
    height: 6px;
    border-radius: 6px;
    overflow: hidden;
}

.progress-wrapper progress::-webkit-progress-bar {
    background-color: #2a2f3c;
    border-radius: 6px;
}

.progress-wrapper progress::-webkit-progress-value {
    background-color: #4caf50;
    border-radius: 6px;
}

.progress-percent {
    font-size: 0.7rem;
    color: #aac8e0;
}

/* .collect-title:before {
	content: "📄";
	font-size: 1.1rem;
} */

.collect-hint {
    font-size: 0.85rem;
    color: #92abca;
    margin-bottom: 1rem;
    background: #0c1119;
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.upload-area {
    border: 1.5px dashed #3e5a74;
    border-radius: 1rem;
    background: #0e141e;
    padding: 1rem;
    text-align: center;
    transition: 0.2s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #6f9bc2;
    background: #121b27;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #bbd4ff;
}

.upload-icon {
    font-size: 1.8rem;
}

input[type="file"] {
    display: none;
}

.upload-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.upload-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* 垃圾桶图标样式 */
.delete-file-icon {
    cursor: pointer;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
}

.delete-file-icon:hover svg {
    stroke: #ff5c5c;
    transform: scale(1.05);
}

.delete-file-icon svg {
    width: 20px;
    height: 20px;
    stroke: #a0b9d6;
    stroke-width: 1.5;
    transition: all 0.2s;
}

.file-name-placeholder {
    font-size: 0.75rem;
    color: #6c8aad;
}

.submit-btn {
    background: #2c4f6e;
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    width: 100%;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: #3e6a8c;
    transform: translateY(-2px);
}

/* 提交按钮禁用样式 */
.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
    /* 禁止点击 */
}



/* 辅助间距 */
.section-caption {
    margin: 0.5rem 0 1rem 0;
    font-size: 0.9rem;
    color: #8da3c2;
}

hr {
    border-color: #2a3442;
    margin: 1rem 0;
}

/* 主题色强调低调深色 */
::selection {
    background: #3e6a8c;
    color: white;
}

@media (max-width: 680px) {
    body {
        padding: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .collect-title {
        font-size: 1.1rem;
    }
}