/* 学校广播站音乐投稿系统 - 样式表 (清爽校园版) */

/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* 使用苹果/系统默认字体，保持清晰 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    /* 背景改为纯白 */
    background-color: #ffffff;
    min-height: 100vh;
    padding: 40px 20px;
    color: #4a4a4a; /* 字体颜色稍微调浅一点的黑，不那么生硬 */
    line-height: 1.5;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    /* 去掉原来的重阴影，改用细腻的边框和极淡的阴影 */
    border: 1px solid #eaeaea;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

/* ===== Header (改动重点) ===== */
.header {
    /* 头部改为淡绿色背景 */
    background-color: #e8f5e9; 
    /* 配合深绿色文字，增加可读性 */
    color: #2e7d32;
    text-align: center;
    padding: 40px 30px;
    border-bottom: 1px solid #dcedc8;
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

/* ===== Intro ===== */
.intro {
    padding: 25px 35px;
    text-align: center;
    background: #ffffff;
    /* 移除之前的灰色背景，保持干净 */
}

.intro p {
    font-size: 15px;
    color: #757575;
    margin: 8px 0;
}

.intro .hint {
    /* 提示文字改为珊瑚色，比原来的亮黄色更温和 */
    color: #ff7043;
    font-size: 13px;
    font-weight: 500;
    background: #fff3e0;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

/* ===== Search Source Switch ===== */
.search-source-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 12px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.source-option {
    appearance: none;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.source-option + .source-option {
    border-left: 1px solid #dcdcdc;
}

.source-option:hover {
    background: #ececec;
    color: #333;
}

.source-option.active {
    background: #ffffff;
    color: #1f1f1f;
}

.source-option:focus-visible {
    outline: 2px solid #66bb6a;
    outline-offset: -2px;
}

/* ===== Search Section ===== */
.search-section {
    padding: 10px 30px 30px;
}

.search-box {
    display: flex;
    gap: 12px;
}

#searchInput {
    flex: 1;
    padding: 14px 18px;
    background-color: #f9f9f9; /* 输入框给一点极淡的灰 */
    border: 2px solid #eee;
    border-radius: 8px; /* 圆角改小一点，显得更干练 */
    font-size: 16px;
    color: #333;
    outline: none;
    transition: all 0.2s ease;
}

#searchInput:focus {
    background-color: #fff;
    border-color: #66bb6a; /* 聚焦时变为清新的绿色 */
}

.btn-primary {
    padding: 0 28px;
    /* 按钮改为纯色，去掉那种廉价的渐变 */
    background-color: #43a047;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #2e7d32; /* 悬停加深 */
    transform: none; /* 去掉位移，更稳重 */
    box-shadow: none;
}

.btn-primary:active {
    background-color: #1b5e20;
}

.btn-primary:disabled {
    background-color: #bdbdbd;
    cursor: not-allowed;
}

/* ===== Loading ===== */
.loading {
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 35px;
    height: 35px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #66bb6a; /* 绿色加载条 */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== Result Section ===== */
.result-section {
    padding: 0 30px 30px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 18px;
    padding-left: 10px;
    border-left: 4px solid #66bb6a; /* 左侧绿色装饰条 */
}

.result-list {
    max-height: 400px;
    overflow-y: auto;
    /* 自定义滚动条样式，使其不突兀 */
    scrollbar-width: thin;
    scrollbar-color: #dcedc8 #fff;
}

/* Song Item */
.song-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #f0f0f0; /* 极细边框 */
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.song-item:hover {
    border-color: #a5d6a7;
    background-color: #f1f8e9; /* 悬停变为极淡的薄荷绿 */
}

.song-item.selected {
    border-color: #43a047;
    background-color: #e8f5e9;
    box-shadow: 0 0 0 1px #43a047 inset; /* 内描边强调选中 */
}

.song-icon {
    width: 44px;
    height: 44px;
    /* 图标背景改为柔和的暖色，与主色调形成对比 */
    background-color: #ffccbc;
    color: inherit;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 22px;
}

.song-info {
    flex: 1;
}

.song-info .song-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
}

.song-info .song-artist {
    font-size: 13px;
    color: #888;
}

.platform-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: #eceff1;
    color: #546e7a;
    border-radius: 4px; /* 方形圆角 */
    margin-left: auto;
    font-weight: 500;
}

.no-results {
    text-align: center;
    color: #bdbdbd;
    font-size: 14px;
    padding: 40px 0;
}

/* ===== Submit Section ===== */
.submit-section {
    padding: 25px 30px 35px;
    background: #fafafa; /* 底部稍微深一点点的灰 */
    border-top: 1px solid #eee;
}

.selected-song {
    background: #fff;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    /* 选中歌曲框改为左侧绿色边框 */
    border-left: 5px solid #66bb6a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.selected-song h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 8px;
}

.selected-actions {
    margin-top: 14px;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
    background: #f1f8e9;
    color: #2e7d32;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-share:hover {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #1b5e20;
}

.selected-info .song-name {
    font-size: 17px;
    font-weight: 700;
    color: #333;
}

.selected-info .song-artist {
    font-size: 14px;
    color: #666;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    /* 提交按钮使用深色，稳重 */
    background-color: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    background-color: #1a252f;
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background-color: #cfd8dc;
    cursor: not-allowed;
    transform: none;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 30px;
    border-radius: 50px; /* 胶囊形状 */
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideDown 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.toast.success {
    background-color: #43a047;
}

.toast.error {
    background-color: #e53935;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.hidden {
    display: none !important;
}

/* ===== 响应式设计 ===== */
@media (max-width: 640px) {
    body {
        padding: 0;
        background: #f9f9f9; /* 移动端背景稍微给点灰，区分卡片 */
    }

    .container {
        border-radius: 0;
        border: none;
        box-shadow: none;
        min-height: 100vh;
    }

    .header {
        padding: 30px 20px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .btn-primary {
        width: 100%;
        padding: 14px;
    }
}
/* ===== Footer (ICP) ===== */
.icp-footer {
    text-align: center;
    margin-top: 30px; /* 与卡片保持距离 */
    padding-bottom: 20px;
    font-size: 12px;
}

.icp-footer a {
    color: #e0e0e0; /* 默认显示非常淡的灰色，不抢视觉重心 */
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: -apple-system, sans-serif;
}

.icp-footer a:hover {
    color: #9e9e9e; /* 悬停时稍微加深，确保可读性 */
}

/* 适配移动端，避免贴底太紧 */
@media (max-width: 640px) {
    .icp-footer {
        margin-top: 20px;
        padding-bottom: 30px;
    }
}

/* ===== Quota Hint ===== */
.quota-section {
    padding: 0 35px 10px;
    text-align: center;
}

.quota-hint {
    font-size: 13px;
    color: #607d8b;
    background: #eef7ff;
    border: 1px solid #d9ecff;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
}

@media (max-width: 640px) {
    .quota-section {
        padding: 0 20px 10px;
    }
}

/* ===== Modal (Announcement) ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal {
    width: min(560px, 100%);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #e8f5e9;
    border-bottom: 1px solid #dcedc8;
}

.modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #2e7d32;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: rgba(46, 125, 50, 0.12);
    color: #2e7d32;
    font-size: 18px;
    line-height: 32px;
}

.modal-close:hover {
    background: rgba(46, 125, 50, 0.18);
}

.modal-body {
    padding: 16px;
    color: #4a4a4a;
    font-size: 14px;
    line-height: 1.7;
    max-height: min(60vh, 520px);
    overflow: auto;
}

.modal-body a {
    color: #2e7d32;
}

.modal-actions {
    padding: 12px 16px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-actions .btn-primary {
    padding: 10px 18px;
}
