/* 姿势指南页面样式 */

/* CSS变量定义，使用明亮色调 */
:root {
    --bg: #f8f9fa;
    --panel: #ffffff;
    --border: #e0e0e0;
    --accent: #4a90e2;
    --accent-2: #f5a623;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    font-family: 
        "PingFang SC",
        "Microsoft YaHei",
        system-ui,
        -apple-system,
        sans-serif;
}

/* 基础样式重置 */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* 页面容器样式 */
.page {
    margin: 0 auto;
    min-height: 100vh;
    max-width: 1200px;
    padding: clamp(20px, 5vw, 60px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: flex-start;
}

/* 页面头部 */
.page-header {
    text-align: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    color: var(--text);
    margin: 0 0 12px;
    font-weight: 700;
}

.page-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-light);
    margin: 0;
}

/* 姿势网格布局 */
.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* 姿势卡片 */
.position-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.position-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.position-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.position-image-container {
    width: 100%;
    padding-top: 75%; /* 4:3 比例 */
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.position-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.position-card:hover .position-image {
    transform: scale(1.05);
}

.position-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.position-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.position-name:hover {
    color: var(--accent);
}



/* 模态框样式 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--panel);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--text);
    margin: 0;
    font-weight: 700;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-body {
    margin-bottom: 24px;
}

.position-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    margin: 0;
    text-align: justify;
}

/* 模态框图片样式 */
.modal-image-container {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.modal-position-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}



.btn {
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: #3a7bc8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .positions-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .positions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .page {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .modal-content {
        padding: 20px;
        border-radius: 16px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .position-description {
        font-size: 1rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
