/* 姿势指南页面样式 */

/* CSS变量定义，与项目保持一致 */
:root {
    --bg: #05030a;
    --panel: rgba(19, 12, 27, 0.92);
    --border: rgba(255, 255, 255, 0.1);
    --accent: #ff6c95;
    --accent-2: #f0d264;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.7);
    --shadow: 0 35px 70px rgba(0, 0, 0, 0.55);
    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: 
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 108, 149, 0.25),
            transparent 48%
        ),
        radial-gradient(
            circle at 80% 0%,
            rgba(125, 211, 252, 0.2),
            transparent 55%
        ),
        var(--bg);
    color: var(--text);
}

/* 页面容器样式，与项目保持一致 */
.page {
    margin: 0 auto;
    min-height: 100vh;
    max-width: 640px;
    padding: clamp(20px, 8vw, 60px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: flex-start;
}

/* 面包屑导航样式，与项目保持一致 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.crumb-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.crumb-link:hover {
    color: #ffffff;
}

.crumb-sep {
    color: rgba(255, 255, 255, 0.4);
}

.crumb-current {
    color: rgba(255, 255, 255, 0.9);
}

/* 页面头部 */
.page-header {
    text-align: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: clamp(1.6rem, 6vw, 2rem);
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 12px;
}

.page-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--muted);
    margin: 0;
    letter-spacing: 0.1em;
}

/* 姿势网格布局 */
.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* 姿势卡片 */
.position-card {
    perspective: 1000px;
}

.position-card-inner {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 36px;
    padding: clamp(18px, 5vw, 32px);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.position-card:hover .position-card-inner {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 108, 149, 0.3);
}

.position-card-content {
    text-align: center;
}

/* 图片容器和图片样式 */
.position-image-container {
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    cursor: pointer;
}

.position-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.position-card:hover .position-image {
    transform: scale(1.05);
}

/* 为没有图片的情况添加占位符 */
.position-image-container::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 108, 149, 0.1), rgba(125, 211, 252, 0.1));
    z-index: 1;
}

.position-image-container img {
    position: relative;
    z-index: 2;
}

/* 图片加载失败时显示占位符文字 */
.position-image-container img[src=""],
.position-image-container img:not([src]) {
    display: none;
}

.position-image-container img[src=""] + .placeholder,
.position-image-container img:not([src]) + .placeholder {
    display: block;
}

.position-image-container .placeholder {
    display: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
    position: absolute;
    z-index: 3;
}

.position-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.position-name-en {
    font-size: 1rem;
    color: rgba(255, 108, 149, 0.8);
    margin: 0 0 16px;
    font-style: italic;
    letter-spacing: 0.1em;
}

.position-preview {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 20px;
    text-align: left;
}

.position-detail-btn {
    width: 100%;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f0f23;
    background: linear-gradient(130deg, #ff81a8, #ffc86f);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.position-detail-btn:hover {
    transform: translateY(-2px);
}

.position-detail-btn:active {
    transform: scale(0.97);
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 8, 0.95);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
}

.modal-content {
    background: rgba(17, 11, 24, 0.96);
    border-radius: 28px;
    border: 1px solid var(--border);
    padding: 16px;
    max-width: 560px;
    width: 100%;
    box-shadow: var(--shadow);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: 0.1em;
}

.modal-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 108, 149, 0.8);
    margin: 0 0 20px;
    font-style: italic;
    letter-spacing: 0.1em;
}

.modal-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-body {
    margin-bottom: 24px;
}

.position-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-align: justify;
}

/* 模态框图片样式 */
.modal-image-container {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.modal-position-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.modal-image-container:hover .modal-position-image {
    transform: scale(1.02);
}

.modal-footer {
    display: flex;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .positions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .position-card-inner {
        padding: 20px;
    }
    
    .modal-content {
        padding: 20px;
        border-radius: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .position-description {
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-subtitle {
        font-size: 0.9rem;
    }
    
    .positions-grid {
        gap: 14px;
    }
    
    .position-card-inner {
        padding: 16px;
        border-radius: 20px;
    }
    
    .position-name {
        font-size: 1.2rem;
    }
    
    .position-name-en {
        font-size: 0.9rem;
    }
    
    .position-preview {
        font-size: 0.9rem;
    }
}