/**
 * D&D AI RPG - Tutorial System Styles
 * Onboarding and contextual help UI
 */

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    animation: tutorialFadeIn 0.3s ease;
}

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

/* Spotlight effect */
.tutorial-spotlight {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    border: 3px solid #3498db;
    border-radius: 8px;
    animation: tutorialPulse 2s infinite;
    pointer-events: none;
}

@keyframes tutorialPulse {
    0%, 100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75), 0 0 15px rgba(52, 152, 219, 0.5); }
    50% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75), 0 0 25px rgba(52, 152, 219, 0.8); }
}

/* Tutorial Tooltip */
.tutorial-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 0;
    width: 350px;
    max-width: 90vw;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    animation: tooltipSlideIn 0.3s ease;
    z-index: 10000;
}

.tutorial-tooltip.tutorial-center {
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%);
}

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

.tutorial-tooltip.tutorial-center {
    animation: tooltipCenterIn 0.3s ease;
}

@keyframes tooltipCenterIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Tooltip Arrow */
.tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.tutorial-tooltip.tutorial-top::before {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #3498db;
}

.tutorial-tooltip.tutorial-bottom::before {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #3498db;
}

.tutorial-tooltip.tutorial-left::before {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #3498db;
}

.tutorial-tooltip.tutorial-right::before {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #3498db;
}

/* Tooltip Header */
.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(52, 152, 219, 0.2);
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 10px 10px 0 0;
}

.tutorial-progress {
    font-size: 12px;
    color: #3498db;
    font-weight: bold;
}

.tutorial-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #95a5a6;
    font-size: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.tutorial-close:hover {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

/* Tooltip Content */
.tutorial-title {
    margin: 15px 15px 10px;
    color: #3498db;
    font-size: 18px;
}

.tutorial-content {
    margin: 0 15px 15px;
    color: #ecf0f1;
    font-size: 14px;
    line-height: 1.6;
}

/* Tooltip Actions */
.tutorial-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 0 10px 10px;
}

.tutorial-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.tutorial-prev {
    background: rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
}

.tutorial-prev:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
}

.tutorial-next {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.tutorial-next:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
    transform: translateY(-1px);
}

/* Contextual Hints */
.tutorial-hint {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.95) 0%, rgba(243, 156, 18, 0.95) 100%);
    border: 2px solid #f1c40f;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a1a2e;
    z-index: 8000;
    animation: hintSlideIn 0.3s ease;
    box-shadow: 0 8px 30px rgba(241, 196, 15, 0.3);
    max-width: 350px;
}

@keyframes hintSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.tutorial-hint.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.5s ease;
}

.hint-icon {
    font-size: 20px;
}

.hint-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.hint-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: #1a1a2e;
    font-size: 14px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.hint-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* First Time Welcome Banner */
.welcome-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 15px 20px;
    z-index: 7000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: bannerSlideDown 0.5s ease;
}

@keyframes bannerSlideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.welcome-banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-banner-icon {
    font-size: 24px;
}

.welcome-banner-text h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
}

.welcome-banner-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.welcome-banner-actions {
    display: flex;
    gap: 10px;
}

.banner-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.banner-btn-primary {
    background: white;
    color: #2980b9;
}

.banner-btn-primary:hover {
    background: #ecf0f1;
}

.banner-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.banner-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Tutorial Settings in Difficulty Panel */
.tutorial-settings {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.tutorial-settings h4 {
    color: #3498db;
    margin: 0 0 12px 0;
    font-size: 14px;
}

.tutorial-reset-btn {
    padding: 8px 16px;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    border-radius: 6px;
    color: #e74c3c;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.tutorial-reset-btn:hover {
    background: rgba(231, 76, 60, 0.3);
}

/* Responsive */
@media (max-width: 600px) {
    .tutorial-tooltip {
        width: calc(100vw - 40px);
        left: 20px !important;
        right: 20px;
    }

    .tutorial-tooltip.tutorial-center {
        left: 20px !important;
        transform: translateY(-50%);
    }

    .tutorial-tooltip::before {
        display: none;
    }

    .tutorial-hint {
        left: 20px !important;
        right: 20px;
        transform: none !important;
        max-width: none;
    }

    .welcome-banner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .welcome-banner-actions {
        width: 100%;
        justify-content: center;
    }
}
