/* CSS Document */
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

p {
    margin-bottom: 1rem;
}

ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* 导航栏样式 */
.navbar {
    background-color: #3498db;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-title {
    color: white;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #2980b9;
    border-radius: 4px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* 章节封面 */
.cover {
    height: 100vh;
    background: linear-gradient(135deg, #3498db, #8e44ad);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 60px;
}

.cover-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.cover-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.start-btn {
    padding: 12px 30px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.start-btn:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

/* 章节内容区域 */
.section {
    padding: 80px 0;
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background-color: #3498db;
    margin: 10px auto;
    border-radius: 2px;
}

/* 卡片布局 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.card h3 {
    color: #3498db;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.example {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.example h4 {
    color: #e74c3c;
    margin-bottom: 10px;
}

.example-img {
    height: 200px;
    background-color: #eee;
    border-radius: 5px;
    margin: 15px 0;
    cursor: pointer;
    transition: transform 0.3s;
    overflow: hidden;
}

.example-img:hover {
    transform: scale(1.03);
}

.example-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 构图技巧网格 */
.composition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.comp-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.comp-card:hover {
    transform: scale(1.03);
}

/* 景别样式 */
.shot-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.shot-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.shot-example {
    height: 150px;
    background-color: #eee;
    border-radius: 5px;
    margin: 15px 0;
    cursor: pointer;
    transition: transform 0.3s;
    overflow: hidden;
}

.shot-example:hover {
    transform: scale(1.05);
}

.shot-example img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shot-tip {
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 运镜样式 */
.movement-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.move-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.move-demo {
    height: 150px;
    background-color: #eee;
    border-radius: 5px;
    margin: 15px 0;
    cursor: pointer;
    transition: transform 0.3s;
    overflow: hidden;
}

.move-demo:hover {
    transform: scale(1.05);
}

.move-demo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 转场样式 */
.transition-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.trans-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.trans-card:hover {
    transform: translateY(-5px);
}

/* 测试题样式 */
.quiz-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.quiz-intro {
    text-align: center;
}

.quiz-btn {
    padding: 10px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.quiz-btn:hover {
    background-color: #2980b9;
}

.options {
    margin: 20px 0;
}

.option {
    display: block;
    padding: 10px 15px;
    margin: 10px 0;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.option:hover {
    background-color: #e9ecef;
}

.option.selected {
    background-color: #3498db;
    color: white;
}

.result-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
}

.correct {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.incorrect {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.quiz-complete {
    text-align: center;
}

/* 图片模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 70%;
    margin-top: 2%;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
}

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

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

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

.image-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 10px;
}

.image-controls input {
    padding: 8px;
    width: 60%;
    max-width: 400px;
    border: none;
    border-radius: 4px;
    margin-right: 10px;
}

.image-controls button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.image-controls button:hover {
    background-color: #2980b9;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes zoomIn {
    from {transform: scale(0.8);}
    to {transform: scale(1);}
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #3498db;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hamburger {
        display: flex;
    }
    
    .cover-content h1 {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .content-grid, .composition-grid, .shot-types, 
    .movement-types, .transition-types {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 60%;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .image-controls {
        bottom: 10px;
    }
    
    .image-controls input {
        width: 50%;
    }
}
