/* instructions.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(15, 23, 224, 0.15);
    padding: 40px;
    max-width: 800px;
    margin: 20px auto;
    border: 1px solid #e6e6e6;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: #0f17e0;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0f17e0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(15, 23, 224, 0.3);
}

h1 {
    color: #0f17e0;
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.subtitle::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #0f17e0;
    border-radius: 3px;
}

.instructions-content {
    text-align: left;
}

.instruction-category {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(15, 23, 224, 0.1);
    position: relative;
    border: 1px solid #e6e6e6;
}

.instruction-category::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: #0f17e0;
}

.category-title {
    color: #0f17e0;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.category-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #0f17e0;
    border-radius: 3px;
}

.note {
    background: #f8f9ff;
    border-left: 4px solid #0f17e0;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    color: #4a5568;
    font-style: italic;
    font-size: 1rem;
}

.instructions-button:first-child {
    margin-bottom: 15px;
}

.instructions-button:last-child {
    background: #0f17e0;
}

/* 图片容器样式 */
.image-container {
    margin: 20px 0;
    background: #f8f9ff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(15, 23, 224, 0.1);
    border: 1px solid #e6e6e6;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.instruction-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 4/7;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e6e6e6;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
}

.instruction-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.image-caption {
    margin-top: 12px;
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
    text-align: center;
    line-height: 1.5;
}

/* 步骤说明样式优化 */
.instruction-steps {
    padding-left: 0;
}

.step-method {
    font-weight: bold;
    color: #0f17e0;
    margin: 15px 0 8px;
    font-size: 1.05rem;
    padding: 8px 12px;
    background: rgba(15, 23, 224, 0.05);
    border-radius: 6px;
    display: inline-block;
}

.step-detail {
    color: #4a5568;
    margin: 8px 0 8px 15px;
    line-height: 1.7;
    font-size: 1rem;
    padding: 8px 12px;
    background: #fff;
    border-left: 3px solid #0f17e0;
    border-radius: 0 4px 4px 0;
}

.step-single {
    color: #4a5568;
    line-height: 1.7;
    margin: 15px 0;
    font-size: 1rem;
    padding: 12px 15px;
    background: #fff;
    border-left: 3px solid #0f17e0;
    border-radius: 0 4px 4px 0;
}

/* 说明项样式 */
.instruction-item {
    margin: 25px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #0f17e0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.instruction-item:hover {
    box-shadow: 0 5px 15px rgba(15, 23, 224, 0.2);
}

.instruction-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.instruction-header:hover {
    background-color: #f8f9fa;
}

.instruction-heading {
    color: #0f17e0;
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.instruction-heading::before {
    content: "🔹";
    font-size: 1.2rem;
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.instruction-details {
    padding: 0 20px 20px;
    transition: all 0.3s ease;
}

.note-section {
    background: #f8f9ff;
    border-left: 3px solid #0f17e0;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 5px;
    color: #4a5568;
    font-style: italic;
    font-size: 0.9rem;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #718096;
}

/* 修改容器样式，使其在移动端全宽显示 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .instruction-header {
        padding: 15px;
    }
    
    .instruction-details {
        padding: 0 16px 15px;
    }
    
    .instruction-heading {
        font-size: 1.1rem;
    }
    
    .step-method {
        font-size: 1rem;
        padding: 6px 10px;
    }
    
    .step-detail,
    .step-single {
        font-size: 0.95rem;
        padding: 8px 12px;
    }
    
    .image-caption {
        font-size: 0.9rem;
    }
    
    /* 移动端调整图片尺寸 */
    .instruction-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 4/7;
    }
    
    .image-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    /* 幻灯片容器移动端适配 */
    .slider-container {
        margin: 15px 0;
    }
    
    .slide .image-container {
        padding: 15px;
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 25px 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .instruction-item {
        margin: 20px 0;
    }
    
    .step-detail,
    .step-single {
        margin: 8px 0;
    }
    
    .instruction-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 4/7;
    }
    
    .image-container {
        padding: 12px;
        margin: 12px 0;
    }
    
    .image-caption {
        font-size: 0.9rem;
    }
    
    /* 幻灯片容器移动端适配 */
    .slider-container {
        margin: 12px 0;
    }
    
    .slide .image-container {
        padding: 12px;
        margin: 12px 0;
    }
}

/* 图片加载失败时的占位符样式 */
.instruction-image:not([src]) {
    background: #e2e8f0;
    min-height: 4cm;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
}

.instruction-image:not([src])::before {
    content: "图片加载中...";
}

/* 幻灯片容器 */
.slider-container {
    position: relative;
    margin: 20px 0;
    width: 100%;
}

.slider-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
}

.slider-content {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.slide {
    min-width: 100%;
    flex-shrink: 0;
    width: 100%;
}

.slide .image-container {
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 指示器 */
.indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: #0f17e0;
    transform: scale(1.2);
}

.indicator:hover {
    background-color: #764ba2;
}

/* 导航按钮 */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 224, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
    box-sizing: border-box;
}

.nav-button:hover {
    background: rgba(15, 23, 224, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.nav-button.prev {
    left: 10px;
}

.nav-button.next {
    right: 10px;
}

/* 步骤指示器 */
.step-indicator {
    text-align: center;
    font-weight: bold;
    color: #0f17e0;
    margin: 10px 0;
    font-size: 1.1rem;
}

/* 响应式处理 */
@media (max-width: 768px) {
    .nav-button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .nav-button.prev {
        left: 5px;
    }

    .nav-button.next {
        right: 5px;
    }

    .step-indicator {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-button {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .nav-button.prev {
        left: 3px;
    }

    .nav-button.next {
        right: 3px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .step-indicator {
        font-size: 0.9rem;
    }
}

/* 图片放大模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(255, 255, 255, 0.95);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    object-fit: contain;
    background: white;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 50px;
    right: 35px;
    color: #0f17e0;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #764ba2;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #0f17e0;
    padding: 10px 0;
    height: 150px;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
    
    #caption {
        width: 95%;
        font-size: 1rem;
    }
    
    .close {
        top: 20px;
        right: 20px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
    }
    
    #caption {
        width: 95%;
        font-size: 0.9rem;
        height: 100px;
    }
    
    .close {
        top: 15px;
        right: 15px;
        font-size: 24px;
    }
}