/* share.css - 分享页面样式 */

/* ========== 变量定义 ========== */
:root {
    --primary-color: #4FACFE;
    --primary-dark: #3A8FD9;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-color: #F5F5F5;
    --card-bg: #FFFFFF;
    --border-color: #E0E0E0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    padding-bottom: 120px; /* 为底部按钮留空间 */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== Loading ========== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========== Error ========== */
.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
    text-align: center;
    gap: 16px;
}

.error-icon {
    font-size: 64px;
}

.error h2 {
    font-size: 20px;
    color: var(--text-primary);
}

.error p {
    font-size: 14px;
    color: var(--text-secondary);
}

.error button {
    margin-top: 16px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    cursor: pointer;
}

.error button:hover {
    background: var(--primary-dark);
}

/* ========== Header ========== */
.header {
    background: white;
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== Content ========== */
.content {
    max-width: 800px;
    margin: 0 auto;
}

/* ========== 讲道详情 ========== */
.sermon-detail {
    background: white;
}

.cover-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: var(--border-color);
}

.info-section {
    padding: 20px;
}

.title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
    line-height: 1.4;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.scripture {
    background: #F0F8FF;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    color: var(--primary-color);
    margin-top: 12px;
}

/* ========== 音频播放器 ========== */
.audio-player-container {
    padding: 20px;
    background: #F9F9F9;
}

.audio-player {
    background: white;
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.player-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

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

.audio-title {
    font-weight: 500;
    font-size: 14px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: white;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    padding: 0;
}

.play-btn .play-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

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

.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.time {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 40px;
    flex-shrink: 0;
}

.progress-bar {
    flex: 1;
    height: 40px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    min-width: 0;
}

.progress-bg {
    position: absolute;
    width: 100%;
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
}

.progress-fill {
    position: absolute;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.1s;
}

.progress-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.speed-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: white;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.speed-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.no-audio,
.audio-error {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========== 摘要 ========== */
.summary-section {
    padding: 20px;
}

.summary-section h2 {
    font-size: 18px;
    margin-bottom: 12px;
}

.summary-section p {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ========== 标签 ========== */
.tags-section {
    padding: 0 20px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background: #F0F0F0;
    border-radius: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== 讲员详情 ========== */
.speaker-detail {
    background: white;
}

.speaker-header {
    padding: 32px 20px;
    text-align: center;
    background: linear-gradient(180deg, #F9F9F9 0%, #FFFFFF 100%);
}

.speaker-header .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

.speaker-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.speaker-header .church {
    font-size: 14px;
    color: var(--text-secondary);
}

.bio-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.bio-section p {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ========== 主题详情 ========== */
.topic-detail {
    background: white;
}

.topic-header {
    position: relative;
}

.topic-header .cover {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--border-color);
}

.topic-header h1 {
    padding: 20px;
    font-size: 24px;
}

.description-section {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.description-section p {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ========== 讲道列表 ========== */
.sermons-section {
    padding: 20px 0;
}

.sermons-section h2 {
    padding: 0 20px 16px;
    font-size: 18px;
}

.sermon-list {
    background: white;
}

.sermon-card {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.sermon-card:hover {
    background: #F9F9F9;
}

.sermon-card:active {
    background: #F5F5F5;
}

.sermon-card .cover {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--border-color);
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-content h3 {
    font-size: 16px;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-content .speaker {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.card-content .meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    gap: 12px;
}

.more-hint {
    padding: 16px 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

.no-data {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========== 底部按钮 ========== */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 16px 20px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 12px;
    z-index: 100;
}

.btn-primary {
    flex: 1;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    flex: 1;
    padding: 14px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* ========== 响应式 ========== */
@media (max-width: 600px) {
    .bottom-bar {
        flex-direction: column;
    }
    
    .cover-image {
        height: 200px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .player-controls {
        flex-wrap: wrap;
    }
    
    .progress-container {
        order: 3;
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 400px) {
    .meta {
        gap: 12px;
    }
    
    .sermon-card .cover {
        width: 60px;
        height: 60px;
    }
    
    .card-content h3 {
        font-size: 14px;
    }
}

