/* live2d.css - Live2D wrapper, canvas, effects, help modal */

/* Live2D Wrapper */
.live2d-wrapper {
    position: relative;
    width: 300px;
    margin: 0 auto var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.live2d-wrapper:empty,
.live2d-wrapper.hidden {
    display: none;
}

/* Live2D Container */
.live2d-container {
    width: 300px;
    height: 400px;
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    touch-action: none;
}

.live2d-container canvas {
    display: block;
    border-radius: var(--radius-xl);
}

/* Zoom Toggle Button */
.live2d-zoom-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    font-size: 16px;
    color: var(--accent-purple);
    cursor: pointer;
    box-shadow: var(--glass-shadow);
    transition: all 0.2s ease;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live2d-zoom-btn:hover {
    background: var(--accent-purple);
    color: white;
    transform: scale(1.1);
}

.live2d-zoom-btn:active {
    transform: scale(0.95);
}

/* Help Info Button */
.live2d-help-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-purple);
    cursor: pointer;
    box-shadow: var(--glass-shadow);
    transition: all 0.2s ease;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live2d-help-btn:hover {
    background: var(--accent-purple);
    color: white;
    transform: scale(1.15);
}

.live2d-help-btn:active {
    transform: scale(0.95);
}

/* Help Modal */
.live2d-help-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: var(--spacing-lg);
}

.live2d-help-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.live2d-help-content {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.live2d-help-modal.show .live2d-help-content {
    transform: scale(1);
}

.live2d-help-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live2d-help-close:hover {
    background: #c41e3a;
    color: white;
    border-color: #c41e3a;
    transform: rotate(90deg);
}

.live2d-help-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.live2d-help-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.live2d-help-list li {
    position: relative;
    padding-left: 24px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.live2d-help-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--accent-purple);
    font-size: 18px;
    font-weight: 700;
}

/* Model Name Label */
.live2d-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
    text-align: center;
}

/* Chat Bubble */
.chat-bubble {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 240px;
    text-align: center;
    z-index: 10;
}

.chat-bubble.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.chat-bubble.hidden {
    display: none;
}

/* Sakura Petals Container */
.sakura-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* Sakura Petal */
.sakura-petal {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ffb3d9, #ffcce6);
    border-radius: 50% 0 50% 0;
    opacity: 0.7;
    animation: sakura-fall linear infinite;
    pointer-events: none;
}

html[data-theme="dark"] .sakura-petal {
    background: linear-gradient(135deg, #ff6fb3, #ff99cc);
    opacity: 0.5;
}

/* Desktop Responsive */
@media (min-width: 768px) {
    .live2d-wrapper {
        width: 350px;
        height: 450px;
    }
    
    .live2d-container {
        width: 350px;
        height: 450px;
    }
    
    .live2d-container canvas {
        width: 350px !important;
        height: 450px !important;
    }
    
    .chat-bubble {
        max-width: 280px;
        font-size: 15px;
    }
}
