/* ===========================
   계시록 암기 앱 튜토리얼 스타일
   ========================== */

/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 라이트 모드 색상 */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
    
    /* 강조 색상 */
    --accent-primary: #4A90E2;
    --accent-success: #50C878;
    --accent-warning: #F39C12;
    --accent-danger: #E74C3C;
    --accent-purple: #9B59B6;
    
    /* 애니메이션 */
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    /* 다크 모드 색상 */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --border-color: #495057;
    --shadow: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 
                 'Malgun Gothic', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

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

/* ===========================
   헤더
   ========================== */
.tutorial-header {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    color: white;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow);
}

.tutorial-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    animation: fadeInDown 0.6s ease;
}

.tutorial-header .subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.header-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.4s both;
}

/* ===========================
   버튼 스타일
   ========================== */
.btn-primary, .btn-secondary, .btn-next, .btn-prev, .btn-inline {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: var(--accent-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-primary.large {
    padding: 18px 40px;
    font-size: 1.2rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--accent-primary);
}

.btn-next, .btn-prev {
    background: var(--accent-primary);
    color: white;
    margin: 10px 5px;
}

.btn-next:hover, .btn-prev:hover {
    background: #357ABD;
    transform: translateY(-2px);
}

.btn-prev {
    background: var(--text-secondary);
}

.btn-inline {
    padding: 6px 15px;
    font-size: 0.9rem;
    background: var(--accent-success);
    color: white;
    margin: 0 5px;
}

/* ===========================
   진행 바
   ========================== */
.progress-bar {
    position: sticky;
    top: 0;
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-success), var(--accent-primary));
    width: 0%;
    transition: width 0.5s ease;
}

/* ===========================
   소개 섹션
   ========================== */
.intro-section {
    margin: 40px 0;
}

.intro-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px var(--shadow);
    animation: fadeIn 0.6s ease;
}

.intro-card .card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.intro-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 12px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-list li:hover {
    padding-left: 10px;
    color: var(--accent-primary);
}

.feature-list li:last-child {
    border-bottom: none;
}

/* ===========================
   튜토리얼 단계 카드
   ========================== */
.tutorial-steps {
    margin: 40px 0;
}

.step-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px var(--shadow);
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
    display: none;
}

.step-card.active {
    display: block;
    animation: fadeInUp 0.6s ease forwards;
}

.step-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.step-card h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-primary);
}

.step-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

/* 데모 박스 */
.demo-box {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px var(--shadow);
}

.demo-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 설명 박스 */
.instruction-box {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--accent-primary);
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
}

.instruction-box h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-primary);
}

.instruction-box ol, .instruction-box ul {
    margin-left: 25px;
}

.instruction-box li {
    margin: 10px 0;
    line-height: 1.8;
}

/* kbd 스타일 */
kbd {
    display: inline-block;
    padding: 4px 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 2px 4px var(--shadow);
    margin: 0 3px;
}

/* Tips 박스 */
.tips-box {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(155, 89, 182, 0.1));
    border-left: 4px solid var(--accent-warning);
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
}

.tips-box h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--accent-warning);
}

.tips-box ul {
    list-style: none;
    padding: 0;
}

.tips-box li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.tips-box li::before {
    content: "💡";
    position: absolute;
    left: 0;
}

/* 학습 모드 그리드 */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mode-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow);
    border-color: var(--accent-primary);
}

.mode-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

/* 단축키 그리드 */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.shortcut-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.shortcut-item:hover {
    border-color: var(--accent-success);
    transform: translateX(5px);
}

.shortcut-item kbd {
    flex-shrink: 0;
}

.shortcut-item span {
    font-size: 0.95rem;
}

/* 완료 박스 */
.completion-box {
    background: linear-gradient(135deg, var(--accent-success), var(--accent-primary));
    color: white;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 8px 24px var(--shadow);
}

.completion-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.completion-box h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.completion-box p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* 빠른 시작 박스 */
.quick-start-box {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--accent-success);
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
}

.quick-start-box h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--accent-success);
}

.quick-start-box ol {
    margin-left: 25px;
}

.quick-start-box li {
    margin: 12px 0;
    line-height: 1.8;
    font-size: 1.05rem;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* ===========================
   퀵 링크 섹션
   ========================== */
.quick-links-section {
    margin: 60px 0;
}

.quick-links-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--accent-primary);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.quick-link-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--shadow);
}

.quick-link-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow);
    border-color: var(--accent-primary);
}

.quick-link-card .card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.quick-link-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

.quick-link-card p {
    color: var(--text-secondary);
}

/* ===========================
   푸터
   ========================== */
.tutorial-footer {
    background: var(--bg-secondary);
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.tutorial-footer p {
    margin: 5px 0;
    color: var(--text-secondary);
}

.tutorial-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

.tutorial-footer a:hover {
    text-decoration: underline;
}

/* ===========================
   애니메이션
   ========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ===========================
   반응형
   ========================== */
@media (max-width: 768px) {
    .tutorial-header h1 {
        font-size: 1.8rem;
    }

    .tutorial-header .subtitle {
        font-size: 1rem;
    }

    .step-card {
        padding: 25px;
    }

    .step-card h2 {
        font-size: 1.5rem;
    }

    .intro-card {
        padding: 25px;
    }

    .mode-grid, .shortcuts-grid, .quick-links-grid {
        grid-template-columns: 1fr;
    }

    .header-actions {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary, .btn-next, .btn-prev {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .tutorial-header {
        padding: 40px 15px;
    }

    .step-card {
        padding: 20px;
    }

    .completion-box {
        padding: 30px 20px;
    }

    .completion-icon {
        font-size: 3rem;
    }
}

/* ===========================
   프린트 스타일
   ========================== */
@media print {
    .tutorial-header,
    .progress-bar,
    .header-actions,
    .btn-next,
    .btn-prev,
    .action-buttons,
    .tutorial-footer {
        display: none;
    }

    .step-card {
        page-break-after: always;
        box-shadow: none;
    }

    body {
        background: white;
        color: black;
    }
}