/**
 * Joplin Tools Homepage - 全局样式
 * 版本：v0.0.1
 * 配色：马卡龙色系
 */

:root {
    /* 马卡龙色系定义 */
    --mint-green: #B5EAD7;
    --mint-green-dark: #8FD4B8;
    --sky-blue: #C7CEEA;
    --sky-blue-dark: #A3B0E0;
    --cream-yellow: #FFDAC1;
    --cream-yellow-dark: #FFC49B;
    
    /* 通用颜色 */
    --text-dark: #4A4A4A;
    --text-light: #777777;
    --bg-color: #F9F9F9;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.05);
    --shadow-hover: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 60px 20px 40px;
    width: 100%;
    max-width: 1200px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 700;
}

header .subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* 卡片容器 */
.card-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    width: 100%;
    flex-wrap: wrap;
}

/* 卡片基础样式 */
.card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 25px var(--shadow);
    width: 300px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-top: 8px solid transparent;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px var(--shadow-hover);
}

/* 配色主题 */
.card.mint {
    border-top-color: var(--mint-green);
}

.card.cream {
    border-top-color: var(--cream-yellow);
}

.card.sky {
    border-top-color: var(--sky-blue);
}

/* 卡片图标 */
.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--white);
}

.card.mint .card-icon {
    background-color: var(--mint-green);
}

.card.cream .card-icon {
    background-color: var(--cream-yellow);
}

.card.sky .card-icon {
    background-color: var(--sky-blue);
}

/* 卡片标题 */
.card h2 {
    margin: 10px 0;
    font-size: 1.4rem;
    color: var(--text-dark);
}

/* 卡片描述 */
.card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 25px;
}

/* 按钮样式 */
.btn {
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    transition: opacity 0.2s, transform 0.2s;
    display: inline-block;
}

.btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.card.mint .btn {
    background-color: var(--mint-green);
    color: #3a7d6a;
}

.card.cream .btn {
    background-color: var(--cream-yellow);
    color: #8a6d3b;
}

.card.sky .btn {
    background-color: var(--sky-blue);
    color: #4a5c8a;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .card-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 350px;
    }
}

/* 页脚 */
footer {
    margin-top: auto;
    padding: 30px 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== 详情页样式 ===== */
.detail-container {
    max-width: 800px;
    width: 100%;
    padding: 20px;
}

.detail-header {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 25px var(--shadow);
    margin-bottom: 30px;
    border-top: 8px solid transparent;
}

.detail-header.mint {
    border-top-color: var(--mint-green);
}

.detail-header.cream {
    border-top-color: var(--cream-yellow);
}

.detail-header.sky {
    border-top-color: var(--sky-blue);
}

.detail-header .project-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: var(--white);
}

.detail-header.mint .project-icon {
    background-color: var(--mint-green);
}

.detail-header.cream .project-icon {
    background-color: var(--cream-yellow);
}

.detail-header.sky .project-icon {
    background-color: var(--sky-blue);
}

.detail-header .project-name {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.detail-header .project-version {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.detail-header .project-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.detail-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download {
    background-color: var(--mint-green);
    color: #3a7d6a;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-download.mint {
    background-color: var(--mint-green);
    color: #3a7d6a;
}

.btn-download.cream {
    background-color: var(--cream-yellow);
    color: #8a6d3b;
}

.btn-download.sky {
    background-color: var(--sky-blue);
    color: #4a5c8a;
}

.btn-download:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.btn-github {
    background-color: var(--white);
    color: var(--text-dark);
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid var(--text-light);
    transition: all 0.2s;
}

.btn-github:hover {
    border-color: var(--text-dark);
    background-color: var(--bg-color);
}

.detail-section {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px var(--shadow);
    margin-bottom: 20px;
}

.detail-section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
}

.detail-section p,
.detail-section .changelog-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
    white-space: pre-wrap;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .detail-header {
        padding: 30px 20px;
    }

    .detail-header .project-name {
        font-size: 1.5rem;
    }

    .detail-actions {
        flex-direction: column;
    }

    .btn-download,
    .btn-github {
        width: 100%;
        text-align: center;
    }
}

/* ===== 赞助模块样式 ===== */
.donation-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.donations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.donation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-color);
    border-radius: 10px;
    transition: transform 0.2s;
}

.donation-item:hover {
    transform: translateX(5px);
}

.donation-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.donor-name {
    font-weight: 600;
    color: var(--text-dark);
}

.donor-remark {
    font-size: 0.85rem;
    color: var(--text-light);
}

.donation-amount {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--mint-green-dark);
}

@media (max-width: 768px) {
    .donation-stats {
        grid-template-columns: 1fr;
    }
}
