/* 儿童新闻 - 移动优先样式 */

:root {
    /* 温暖柔和的儿童色调 */
    --primary-orange: #FF9F43;
    --soft-orange: #FFE4C4;
    --primary-yellow: #FFD93D;
    --soft-yellow: #FFF8E7;
    --primary-blue: #74B9FF;
    --soft-blue: #E8F4FD;
    --primary-green: #6BCB77;
    --soft-green: #E8F5E9;
    --primary-pink: #FF85A2;
    --soft-pink: #FFEEF2;

    --text-dark: #2D3436;
    --text-gray: #636E72;
    --bg-light: #FFF9F0;
    --card-shadow: 0 4px 15px rgba(255, 159, 67, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--soft-yellow) 0%, var(--soft-orange) 50%, var(--soft-pink) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    padding: 20px 16px;
    text-align: center;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 20px rgba(255, 159, 67, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10%);
    background-size: 30px 30px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.header h1 {
    font-size: 28px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.header .subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.header-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}

.back-btn {
    background: rgba(255,255,255,0.9);
    color: var(--primary-orange);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    position: relative;
    z-index: 10;
}

.back-btn:hover {
    transform: scale(1.05);
}

.back-btn:active {
    transform: scale(0.95);
}

/* Main */
.main {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 80px;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-yellow), var(--primary-green));
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-yellow);
    box-shadow: 0 8px 25px rgba(255, 159, 67, 0.25);
}

.news-card:active {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-date {
    background: var(--soft-blue);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.title-text {
    flex: 1;
    word-break: break-word;
}

.play-btn-inline {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 159, 67, 0.4);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.play-btn-inline:hover {
    transform: scale(1.1);
}

.play-btn-inline:active {
    transform: scale(0.95);
}

.play-btn-inline span {
    font-size: 16px;
}

.news-detail .play-btn-inline {
    width: 44px;
    height: 44px;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.4);
}

.news-detail .play-btn-inline span {
    font-size: 20px;
}

.card-excerpt {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.play-btn {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.4);
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.1);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn span {
    font-size: 20px;
}

/* Detail Page */
.main-detail {
    padding-top: 8px;
}

.news-detail {
    background: #fff;
    border-radius: 24px;
    padding: 24px 20px;
    box-shadow: var(--card-shadow);
}

.news-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.news-date {
    color: var(--primary-blue);
    font-size: 14px;
    margin-bottom: 20px;
}

.news-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 24px;
    white-space: pre-wrap;
}

.news-content p {
    margin-bottom: 12px;
}

.play-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 159, 67, 0.4);
    transition: all 0.3s ease;
}

.play-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 159, 67, 0.5);
}

.play-btn-large:active {
    transform: translateY(0);
}

.play-icon {
    font-size: 24px;
}

/* Audio Player */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    border-radius: 20px 20px 0 0;
}

.audio-player audio {
    flex: 1;
    height: 40px;
}

.close-player {
    background: var(--soft-pink);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: var(--primary-pink);
    display: flex;
    align-items: center;
    justify-content: center;
}

#playing-title {
    font-size: 12px;
    color: var(--text-gray);
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.page-btn {
    background: #fff;
    border: 2px solid var(--primary-orange);
    color: var(--primary-orange);
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-orange);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-gray);
    font-size: 14px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
}

.loading-spinner {
    font-size: 40px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Responsive */
@media (min-width: 768px) {
    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 36px;
    }

    .main {
        padding: 24px;
    }

    .news-card {
        padding: 24px;
    }

    .card-title {
        font-size: 20px;
    }

    .news-detail {
        padding: 32px;
    }

    .news-title {
        font-size: 26px;
    }
}
