/* SQLMap 進階教材樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
    height: 100vh;
}

/* 導航控制 */
.navigation {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 25px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.nav-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: scale(1);
    box-shadow: none;
}

.slide-counter {
    font-weight: 600;
    color: #333;
    min-width: 70px;
    text-align: center;
    font-size: 14px;
}

/* 投影片容器 */
.presentation-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.slide {
    display: none;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 60px;
    animation: slideIn 0.6s ease-out;
    overflow-y: auto;
}

.slide.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 標題頁樣式 */
.title-slide {
    text-align: center;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    padding: 80px 60px;
}

.title-header {
    margin-bottom: 50px;
}

.title-icon {
    font-size: 100px;
    color: #ffd700;
    margin-bottom: 30px;
    display: block;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.title-slide h1 {
    font-size: 4em;
    font-weight: 700;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.title-slide h2 {
    font-size: 2em;
    font-weight: 400;
    margin-bottom: 40px;
    opacity: 0.9;
}

.title-info {
    margin-bottom: 50px;
}

.course-info {
    font-size: 1.4em;
    font-weight: 500;
    opacity: 0.9;
}

.date-info {
    font-size: 1.1em;
    opacity: 0.8;
    margin-top: 10px;
}

.warning-info {
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 20px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    border: 2px solid #ffd700;
    backdrop-filter: blur(10px);
}

.title-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    display: block;
    font-size: 3em;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    display: block;
    font-size: 1em;
    margin-top: 8px;
    opacity: 0.9;
}

/* 一般投影片樣式 */
.slide h1 {
    font-size: 2.8em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 40px;
    border-bottom: 4px solid #007bff;
    padding-bottom: 20px;
    position: relative;
}

.slide h1:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100px;
    height: 4px;
    background: #ffd700;
}

.slide h1 i {
    color: #007bff;
    margin-right: 20px;
}

/* 大綱頁面樣式 */
.outline-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.outline-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 20px;
    border-left: 6px solid #007bff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.outline-section:hover {
    transform: translateY(-5px);
}

.outline-section h3 {
    font-size: 1.4em;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.outline-section h3 i {
    color: #007bff;
    margin-right: 12px;
    font-size: 1.2em;
}

.outline-section ul {
    list-style: none;
}

.outline-section li {
    padding: 10px 0;
    color: #555;
    position: relative;
    padding-left: 30px;
    transition: color 0.3s ease;
}

.outline-section li:hover {
    color: #007bff;
}

.outline-section li:before {
    content: "▸";
    color: #007bff;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

.ethics-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 3px solid #ffc107;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.ethics-warning i {
    color: #856404;
    font-size: 1.5em;
    margin-right: 12px;
}

/* 程式碼區塊樣式 */
.code-block {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #e2e8f0;
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    font-family: 'Courier New', 'Consolas', monospace;
    overflow-x: auto;
    border-left: 5px solid #007bff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.code-block:before {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: #ff5f56;
    border-radius: 50%;
    box-shadow: 20px 0 #ffbd2e, 40px 0 #27ca3f;
}

.code-block.primary {
    border-left: 5px solid #ffd700;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.code-block.small {
    padding: 15px;
    font-size: 0.9em;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.6;
}

.code-block code {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.95em;
}

/* 工作流程樣式 */
.workflow-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

.workflow-step {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.workflow-step:hover {
    transform: translateY(-5px);
    border-color: #007bff;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
}

.step-icon {
    font-size: 2.5em;
    color: #007bff;
    margin-bottom: 15px;
}

.workflow-step h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.workflow-step p {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
}

.workflow-arrow {
    font-size: 2em;
    color: #007bff;
    font-weight: bold;
}

/* 模組樣式 */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.module-item {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.module-item:hover {
    transform: translateY(-5px);
    border-color: #007bff;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
}

.module-item i {
    font-size: 3em;
    color: #007bff;
    margin-bottom: 20px;
    display: block;
}

.module-item h4 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1.3em;
}

.module-item p {
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.5;
}

/* 參數網格樣式 */
.param-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.param-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.param-item:hover {
    border-color: #007bff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.15);
}

.param-item code {
    background: linear-gradient(135deg, #f1f3f4 0%, #e9ecef 100%);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #d63384;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
    border: 1px solid #dee2e6;
}

.param-item span {
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.4;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .slide {
        width: 98%;
        padding: 40px;
        height: 95vh;
    }
    
    .title-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .outline-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .slide {
        padding: 30px;
        font-size: 14px;
    }
    
    .title-slide h1 {
        font-size: 2.5em;
    }
    
    .slide h1 {
        font-size: 2.2em;
    }
    
    .workflow-steps {
        flex-direction: column;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .param-grid {
        grid-template-columns: 1fr;
    }
    
    .title-stats {
        grid-template-columns: 1fr;
    }
}