/* 虚拟参拜系统样式 */

/* 主布局 */
.worship-main {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

/* 侧边栏样式 */
.worship-sidebar {
    width: 300px;
    background-color: white;
    border-right: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* 用户信息区域 */
.worship-user {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
    color: var(--primary-color);
}

.user-info {
    flex-grow: 1;
}

.user-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.user-level {
    font-size: 14px;
    color: #666;
}

/* 菜单样式 */
.worship-menu {
    padding: 10px;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 20px;
}

.menu-section h3 {
    margin: 10px 0;
    padding: 0 10px;
    font-size: 16px;
    color: #666;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.menu-item.active {
    background-color: rgba(30, 86, 49, 0.1);
    border-left: 4px solid var(--primary-color);
}

.menu-item i {
    margin-right: 15px;
    font-size: 18px;
    color: var(--primary-color);
}

/* 参拜记录 */
.worship-history {
    margin: 0 15px;
}

.history-item {
    padding: 8px 10px;
    border-radius: 6px;
    background-color: white;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.history-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 3px;
}

.history-place {
    font-size: 14px;
    color: #333;
}

/* 内容区域样式 */
.worship-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 场景容器 */
.scene-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.scene-view {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

#main-hall {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><rect width="800" height="600" fill="%23000" /><polygon points="400,100 650,300 550,500 250,500 150,300" fill="%231e563140" stroke="%231e5631" stroke-width="2" /><rect x="300" y="300" width="200" height="200" fill="%231e563130" stroke="%231e5631" stroke-width="2" /><circle cx="400" cy="230" r="50" fill="%23d4af3730" stroke="%23d4af37" stroke-width="2" /></svg>');
}

#sanqing-hall {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><rect width="800" height="600" fill="%23000" /><polygon points="400,50 700,200 600,500 200,500 100,200" fill="%231e563140" stroke="%231e5631" stroke-width="2" /><polygon points="400,100 500,200 450,400 350,400 300,200" fill="%23d4af3730" stroke="%23d4af37" stroke-width="2" /></svg>');
}

#yuxu-pavilion {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><rect width="800" height="600" fill="%23000" /><rect x="200" y="150" width="400" height="300" fill="%231e563140" stroke="%231e5631" stroke-width="2" /><rect x="300" y="200" width="200" height="250" fill="%23d4af3730" stroke="%23d4af37" stroke-width="2" /><circle cx="400" cy="100" r="40" fill="%23d4af3740" stroke="%23d4af37" stroke-width="2" /></svg>');
}

#founder-temple {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600"><rect width="800" height="600" fill="%23000" /><rect x="250" y="150" width="300" height="300" fill="%231e563140" stroke="%231e5631" stroke-width="2" /><circle cx="400" cy="300" r="100" fill="%23d4af3730" stroke="%23d4af37" stroke-width="2" /><line x1="250" y1="250" x2="550" y2="250" stroke="%23d4af37" stroke-width="2" /></svg>');
}

/* 场景覆盖层 */
.scene-overlay {
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
    color: white;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
    width: 100%;
}

.scene-title {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 5px;
}

.scene-description {
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.8;
    max-width: 60%;
}

/* 场景控制 */
.scene-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.control-indicators {
    display: flex;
    margin: 0 15px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 5px;
}

.indicator.active {
    background-color: white;
}

/* 热点标记 */
.interaction-points {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.hotspot-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    position: relative;
    animation: pulse 2s infinite;
    cursor: pointer;
}

.hotspot-label {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.hotspot:hover .hotspot-label {
    opacity: 1;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* 参拜界面 */
.worship-interface {
    background-color: white;
    border-top: 1px solid #eaeaea;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

/* 参拜动作 */
.worship-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background-color: #f9f9f9;
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.action-btn span {
    font-size: 14px;
}

/* 参拜状态 */
.worship-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.status-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
}

.status-label {
    font-size: 14px;
    margin-bottom: 10px;
    color: #666;
}

.status-progress {
    display: flex;
    flex-direction: column;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    text-align: right;
    color: #666;
}

.status-meter {
    width: 100%;
    height: 18px;
    background-color: #e0e0e0;
    border-radius: 9px;
    position: relative;
    overflow: hidden;
}

.meter-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s;
}

.meter-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
}

/* 弹出式交互模态框 */
.interaction-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

/* 上香模态框 */
.incense-selection {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.incense-option {
    flex: 1;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.incense-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(30, 86, 49, 0.05);
}

.incense-option.active {
    border-color: var(--primary-color);
    background-color: rgba(30, 86, 49, 0.1);
}

.incense-image {
    height: 100px;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 10px;
}

.incense-image.single {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="100" viewBox="0 0 50 100"><rect x="24" y="20" width="2" height="80" fill="%23d4af37" /><circle cx="25" cy="15" r="5" fill="%23d4af37" /><circle cx="25" cy="15" r="2" fill="%23ff0000" /></svg>');
}

.incense-image.triple {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect x="24" y="20" width="2" height="80" fill="%23d4af37" /><circle cx="25" cy="15" r="5" fill="%23d4af37" /><circle cx="25" cy="15" r="2" fill="%23ff0000" /><rect x="49" y="20" width="2" height="80" fill="%23d4af37" /><circle cx="50" cy="15" r="5" fill="%23d4af37" /><circle cx="50" cy="15" r="2" fill="%23ff0000" /><rect x="74" y="20" width="2" height="80" fill="%23d4af37" /><circle cx="75" cy="15" r="5" fill="%23d4af37" /><circle cx="75" cy="15" r="2" fill="%23ff0000" /></svg>');
}

.incense-image.bundle {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect x="30" y="40" width="40" height="60" fill="%23d4af37" /><path d="M30,40 Q50,10 70,40" fill="%23d4af37" /><circle cx="40" cy="30" r="3" fill="%23ff0000" /><circle cx="50" cy="20" r="3" fill="%23ff0000" /><circle cx="60" cy="30" r="3" fill="%23ff0000" /></svg>');
}

.incense-name {
    font-size: 14px;
}

.incense-meaning {
    margin-top: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.incense-meaning p {
    margin: 0 0 15px;
    font-size: 14px;
}

.incense-controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.incense-controls .control-btn {
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    flex: 1;
    height: auto;
    padding: 8px;
}

.incense-controls .control-btn:hover {
    background-color: #174628;
}

/* 许愿表单 */
.wish-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.wish-select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wish-textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 120px;
    resize: none;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check input {
    margin-right: 10px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.form-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.form-btn:hover {
    background-color: #174628;
}

/* 完成覆盖层 */
.completion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.completion-content {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

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

.completion-header {
    margin-bottom: 20px;
}

.completion-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.completion-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.completion-message {
    margin-bottom: 20px;
}

.completion-message p {
    margin: 5px 0;
}

.blessing {
    font-family: "KaiTi", "STKaiti", serif;
    font-size: 18px;
    color: var(--accent-color);
    margin: 15px 0;
}

.merit-info {
    background-color: rgba(30, 86, 49, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    display: inline-block;
}

.merit-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.merit-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.completion-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 10px;
    width: 40%;
}

.stat-icon {
    font-size: 24px;
    color: var(--accent-color);
    margin-right: 10px;
}

.stat-info {
    text-align: left;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
}

.completion-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.completion-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.completion-btn i {
    margin-right: 8px;
}

.completion-btn:hover {
    background-color: #f5f5f5;
}

.completion-btn.primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.completion-btn.primary:hover {
    background-color: #174628;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .worship-main {
        flex-direction: column;
    }
    
    .worship-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    .worship-user {
        padding: 10px;
    }
    
    .menu-section {
        margin-bottom: 10px;
    }
    
    .worship-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .worship-status {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .incense-selection {
        flex-direction: column;
    }
}
