/* ========================================
   INTERACTIVE TUTORIAL - SIMONETA
   Enhanced & Neat Design - Centered Modal
   ======================================== */

/* === TUTORIAL OVERLAY === */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.tutorial-overlay.active {
    display: block;
    opacity: 1;
}

/* === TUTORIAL MODAL - CENTERED & NEAT === */
.tutorial-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-panel, #ffffff);
    border-radius: 20px;
    padding: 32px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.3s ease;
}

[data-theme="dark"] .tutorial-modal {
    background: var(--bg-panel, #1f1f3a);
    color: var(--text-primary, #e0e0e0);
    border: 1px solid var(--border-color, #333355);
}

.tutorial-modal.active {
    opacity: 1;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* === MODAL ANIMATION === */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* === TUTORIAL HEADER === */
.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
}

[data-theme="dark"] .tutorial-header {
    border-bottom-color: var(--border-color, #333355);
}

.tutorial-step-indicator {
    font-size: 0.95rem;
    color: #FF9800;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tutorial-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary, #999);
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.tutorial-close:hover {
    color: #EF5350;
    background: rgba(239, 83, 80, 0.1);
}

/* === TUTORIAL CONTENT === */
.tutorial-content {
    margin-bottom: 24px;
}

.tutorial-icon {
    font-size: 4rem;
    text-align: center;
    display: block;
    margin-bottom: 20px;
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.tutorial-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.3;
}

[data-theme="dark"] .tutorial-title {
    color: var(--text-primary, #e0e0e0);
}

.tutorial-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary, #666);
    text-align: left;
}

[data-theme="dark"] .tutorial-description {
    color: var(--text-secondary, #a0a0a0);
}

.tutorial-description p {
    margin-bottom: 12px;
}

.tutorial-description ul {
    text-align: left;
    margin-top: 16px;
    padding-left: 0;
    list-style: none;
}

.tutorial-description li {
    margin-bottom: 12px;
    padding-left: 32px;
    position: relative;
    line-height: 1.6;
}

.tutorial-description li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.2rem;
}

.tutorial-description strong {
    color: var(--text-primary, #333);
    font-weight: 600;
}

[data-theme="dark"] .tutorial-description strong {
    color: var(--text-primary, #e0e0e0);
}

/* === TUTORIAL PROGRESS === */
.tutorial-progress {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0;
}

.tutorial-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color, #e0e0e0);
    transition: all 0.3s ease;
}

[data-theme="dark"] .tutorial-progress-dot {
    background: var(--border-color, #333355);
}

.tutorial-progress-dot.active {
    background: #FF9800;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}

.tutorial-progress-dot.completed {
    background: #4CAF50;
}

/* === TUTORIAL FOOTER === */
.tutorial-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color, #e0e0e0);
}

[data-theme="dark"] .tutorial-footer {
    border-top-color: var(--border-color, #333355);
}

.tutorial-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tutorial-btn:active {
    transform: scale(0.98);
}

.tutorial-btn-skip {
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-secondary, #666);
}

[data-theme="dark"] .tutorial-btn-skip {
    background: var(--bg-secondary, #16213e);
    color: var(--text-secondary, #a0a0a0);
}

.tutorial-btn-skip:hover {
    background: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tutorial-btn-prev {
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-primary, #333);
}

[data-theme="dark"] .tutorial-btn-prev {
    background: var(--bg-secondary, #16213e);
    color: var(--text-primary, #e0e0e0);
}

.tutorial-btn-prev:hover {
    background: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tutorial-btn-next {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: #ffffff;
}

.tutorial-btn-next:hover {
    background: linear-gradient(135deg, #F57C00, #E65100);
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.4);
    transform: translateY(-2px);
}

.tutorial-btn-complete {
    background: linear-gradient(135deg, #4CAF50, #43A047);
    color: #ffffff;
}

.tutorial-btn-complete:hover {
    background: linear-gradient(135deg, #43A047, #388E3C);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

/* === WELCOME & COMPLETION MODAL === */
.tutorial-welcome,
.tutorial-completion {
    text-align: center;
    padding: 8px;
}

.tutorial-welcome h2,
.tutorial-completion h2 {
    color: var(--text-primary, #333);
    margin-bottom: 16px;
    font-size: 1.8rem;
    font-weight: 700;
}

[data-theme="dark"] .tutorial-welcome h2,
[data-theme="dark"] .tutorial-completion h2 {
    color: var(--text-primary, #e0e0e0);
}

.tutorial-welcome p,
.tutorial-completion p {
    color: var(--text-secondary, #666);
    line-height: 1.8;
    margin-bottom: 24px;
    font-size: 1.05rem;
}

[data-theme="dark"] .tutorial-welcome p,
[data-theme="dark"] .tutorial-completion p {
    color: var(--text-secondary, #a0a0a0);
}

.tutorial-features {
    text-align: left;
    background: var(--bg-secondary, #f5f5f5);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 28px;
    border-left: 4px solid #FF9800;
}

[data-theme="dark"] .tutorial-features {
    background: var(--bg-secondary, #16213e);
    border-left-color: #FF9800;
}

.tutorial-features strong {
    display: block;
    margin-bottom: 12px;
    color: var(--text-primary, #333);
    font-size: 1.1rem;
}

[data-theme="dark"] .tutorial-features strong {
    color: var(--text-primary, #e0e0e0);
}

.tutorial-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tutorial-features li {
    margin-bottom: 10px;
    color: var(--text-primary, #333);
    padding-left: 28px;
    position: relative;
    line-height: 1.6;
}

[data-theme="dark"] .tutorial-features li {
    color: var(--text-primary, #e0e0e0);
}

.tutorial-features li::before {
    content: '✨';
    position: absolute;
    left: 0;
}

/* === DOWNLOAD PDF BUTTON === */
.tutorial-download-btn {
    background: linear-gradient(135deg, #4285F4, #3367D6);
    color: #ffffff;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.tutorial-download-btn:hover {
    background: linear-gradient(135deg, #3367D6, #2859B3);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

/* === SCROLLBAR === */
.tutorial-modal::-webkit-scrollbar {
    width: 8px;
}

.tutorial-modal::-webkit-scrollbar-track {
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 10px;
}

[data-theme="dark"] .tutorial-modal::-webkit-scrollbar-track {
    background: var(--bg-secondary, #16213e);
}

.tutorial-modal::-webkit-scrollbar-thumb {
    background: #FF9800;
    border-radius: 10px;
}

.tutorial-modal::-webkit-scrollbar-thumb:hover {
    background: #F57C00;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .tutorial-modal {
        width: 95%;
        max-width: none;
        padding: 24px;
        max-height: 90vh;
    }
    
    .tutorial-icon {
        font-size: 3rem;
    }
    
    .tutorial-title {
        font-size: 1.3rem;
    }
    
    .tutorial-description {
        font-size: 0.95rem;
    }
    
    .tutorial-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .tutorial-btn {
        width: 100%;
    }
    
    .tutorial-features {
        padding: 16px;
    }
}

/* === VERY SMALL SCREENS === */
@media (max-width: 360px) {
    .tutorial-modal {
        width: 98%;
        padding: 20px;
    }
    
    .tutorial-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .tutorial-title {
        font-size: 1.2rem;
    }
    
    .tutorial-icon {
        font-size: 2.5rem;
    }
}

/* === DARK MODE COMPATIBLE === */
[data-theme="dark"] .tutorial-welcome h2,
[data-theme="dark"] .tutorial-completion h2 {
    color: var(--text-primary, #e0e0e0);
}

[data-theme="dark"] .tutorial-welcome p,
[data-theme="dark"] .tutorial-completion p {
    color: var(--text-secondary, #a0a0a0);
}