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

body {
    font-family: 
        "PingFang SC", "Microsoft YaHei",  /* 中文（Mac / Windows） */
        "Helvetica Neue", Helvetica, /* 通用西文字体 */
        "Apple Color Emoji",               /* macOS / iOS Emoji */
        "Segoe UI Emoji", "Segoe UI Symbol",/* Windows Emoji */
        "Noto Color Emoji",                /* Android / Linux Emoji */
        sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 15px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    text-align: center;
    margin-bottom: 15px;
    flex-shrink: 0;
    height: auto;
}

h1 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.schedule-info {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 10px 20px;
    display: inline-block;
}

.schedule-info span {
    color: white;
    font-weight: 600;
    margin: 0 10px;
}

/* 基础卡片样式 */
.training-card, .summary-card {
    background: white;
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* 训练卡片 - 占屏幕约70%高度 */
.training-card {
    padding: 20px 20px 25px 20px;
    margin-bottom: 10px;
    height: 70vh;
    max-height: 70vh;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: visible;
}

/* 首页选择卡片 - 稍小一些 */
.training-card.home-card {
    height: 60vh;
    max-height: 60vh;
    min-height: 350px;
    justify-content: center;
}

/* 休息状态的训练卡片样式 */
.training-card.rest-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    border: 2px solid #4CAF50;
}

.training-card.rest-state .exercise-icon {
    animation: restPulse 2s ease-in-out infinite;
}

@keyframes restPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 总结卡片 - 占屏幕约75%高度 */
.summary-card {
    padding: 25px;
    height: 75vh;
    max-height: 75vh;
    min-height: 450px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
}

.phase-indicator {
    text-align: center;
    margin-bottom: 20px;
}

#current-phase {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 5px;
}

#round-info {
    display: block;
    color: #666;
    font-size: 0.9rem;
    line-height: 1;
    margin-top: 5px;
}

.exercise-content {
    text-align: center;
    margin: 25px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.exercise-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: none; /* 隐藏图标 */
}

#exercise-name {
    font-size: 3.4rem; /* 从1.6rem增大到2.4rem */
    margin-bottom: 12px;
    color: #2c3e50;
    font-weight: bold; /* 增加字体粗细 */
}

.exercise-details {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#exercise-count {
    display: inline-block;
    font-size: 3.0rem; /* 从2.2rem增大到3.0rem */
    font-weight: bold;
    color: #e74c3c;
    margin: 0;
}

#exercise-description {
    color: #7f8c8d;
    font-size: 1.2rem; /* 从1rem增大到1.2rem */
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0 0 0;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
}

.plan-selection {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.plan-btn {
    padding: 10px 22px;
    border: none;
    border-radius: 999px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    background: linear-gradient(45deg, #f5f7fa, #e4ecff);
    color: #34495e;
    box-shadow: 0 4px 12px rgba(52, 73, 94, 0.15);
}

.plan-btn:hover,
.plan-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(118, 75, 162, 0.25);
}

.plan-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(118, 75, 162, 0.35);
}

.session-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.complete-btn, .session-btn, .back-home-btn {
    padding: 50px;
    border: none;
    border-radius: 50%;
    font-size: 2.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    min-height: 200px;
    max-height: 200px;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.complete-btn {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.complete-btn:hover, .complete-btn:active {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(46, 204, 113, 0.4);
}

.session-btn {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    color: white;
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
}

.session-btn--morning {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.session-btn--evening {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
}

.session-btn--campus {
    background: linear-gradient(45deg, #1abc9c, #16a085);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.3);
}

.session-btn:hover,
.session-btn:active {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(142, 68, 173, 0.4);
}

.session-btn--morning:hover,
.session-btn--morning:active {
    box-shadow: 0 15px 30px rgba(243, 156, 18, 0.4);
}

.session-btn--campus:hover,
.session-btn--campus:active {
    box-shadow: 0 15px 30px rgba(26, 188, 156, 0.4);
}

.session-btn.completed {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
    cursor: default;
    opacity: 0.8;
    transform: none;
}

.session-btn.completed:hover,
.session-btn.completed:active {
    transform: none;
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

.back-home-btn {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
    flex-shrink: 0;
    margin-top: 20px;
    flex: none;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    align-self: center;
    /* 确保完美圆形 */
    min-width: 200px;
    min-height: 200px;
    max-width: 200px;
    max-height: 200px;
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    font-weight: bold;
    line-height: 1;
}

.back-home-btn:hover, .back-home-btn:active {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(46, 204, 113, 0.4);
}

.progress-info {
    margin-top: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

#progress-text {
    display: block;
    text-align: center;
    color: #7f8c8d;
    font-weight: bold;
    line-height: 1.2;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.summary-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2rem;
    flex-shrink: 0;
}

.summary-content p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.summary-content {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 15px 0;
    flex-shrink: 0;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #e74c3c;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    header {
        margin-bottom: 15px;
    }
    
    .training-card {
        padding: 15px 15px 20px 15px;
        margin-bottom: 8px;
        height: 75vh;
        max-height: 75vh;
        min-height: 350px;
    }
    
    .training-card.home-card {
        height: 65vh;
        max-height: 65vh;
        min-height: 300px;
    }
    
    .summary-card {
        padding: 20px;
        height: 80vh;
        max-height: 80vh;
        min-height: 400px;
    }
    
    .exercise-content {
        margin: 15px 0;
    }
    
    .exercise-icon {
        font-size: 3rem;
        margin-bottom: 10px;
        display: none; /* 隐藏图标 */
    }
    
    #exercise-name {
        font-size: 3.0rem; /* 从1.3rem增大到2.0rem */
        margin-bottom: 8px;
        font-weight: bold; /* 增加字体粗细 */
    }
    
    .exercise-details {
        margin-bottom: 10px;
        flex-direction: column;
        gap: 5px;
    }
    
    #exercise-count {
        font-size: 2.4rem; /* 从1.8rem增大到2.4rem */
    }
    
    .complete-btn, .session-btn {
        font-size: 2.4rem;
        padding: 45px;
        min-height: 180px;
        max-height: 180px;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        flex-shrink: 0;
    }
    
    .back-home-btn {
        height: 180px;
        width: 180px;
        font-size: 2.4rem;
        padding: 0;
        border-radius: 50%;
        /* 确保完美圆形 */
        min-width: 180px;
        min-height: 180px;
        max-width: 180px;
        max-height: 180px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
    .action-buttons {
        gap: 15px;
        margin: 15px 0 5px 0;
        justify-content: center;
    }
    
    .progress-info {
        margin-top: 15px;
        margin-bottom: 10px;
        padding-bottom: 5px;
    }
    
    #progress-text {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    
    .summary-stats {
        gap: 15px;
    }
    
    .schedule-info {
        padding: 8px 15px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.training-card, .summary-card {
    animation: fadeIn 0.5s ease;
}

/* 按钮点击反馈 */
.complete-btn:active, .session-btn:active, .back-home-btn:active {
    transform: scale(0.95);
}

/* 确保触摸友好 */
button {
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

/* 防止长按菜单 */
.training-card, .summary-card {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 刷新按钮（悬浮于右上角，仅在独立模式显示） */
.refresh-btn {
    position: fixed;
    right: 16px;
    top: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: none; /* 默认隐藏，通过脚本控制显示 */
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: #fff;
    box-shadow: 0 8px 20px rgba(41, 128, 185, 0.35);
    z-index: 1000;
    cursor: pointer;
}

.refresh-btn:active {
    transform: scale(0.96);
}

.refresh-btn.show {
    display: flex;
}
