/* 基础样式重置 */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 确保WordPress容器不影响布局 */
body > * {
    box-sizing: border-box;
}

/* 主容器样式 */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* 统一容器样式 - 自适应屏幕 */
.ardata-unified-container {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.ardata-viewer-container {
    width: 100%;
    height: 100vh; /* 设置为视口高度，实际高度会在JS中调整 */
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    box-sizing: border-box;
}

.ardata-canvas-container {
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

/* 左上角内容按钮容器样式 - 完全简化，只保留必要的定位 */
#content-button-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: block;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* 控制按钮组样式 - 嵌入到3D窗口左下角 */
#new-qr-button-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

/* 文章内容面板样式 - 悬浮在3D场景上方 */
.ardata-embedded-content {
    position: absolute;
    top: 70px;
    left: 20px;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 30;
    overflow-y: auto;
    max-height: calc(100% - 120px);
    transition: all 0.3s ease;
}

.ardata-embedded-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.ardata-embedded-meta {
    margin-bottom: 15px;
    color: #666;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ardata-embedded-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.ardata-embedded-text p {
    margin-bottom: 15px;
}

/* 3D窗口按钮 */
.ardata-btn {
    display: inline-block;
    padding: 8px 15px;
    margin-left: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    color: #ffffff;
    transition: all 0.1s ease;
    min-width: 20px;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

/* 文章显示按钮样式 - 去除边缘发光，只保留图标自发光效果 */
#toggle-content-button {
    width: 20px;
    height: 20px;
    border-radius: 16px;
    background-color: transparent;
    color: #333;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    transition: all 0.2s ease;
    font-size: 20px;
    margin-left: 0;
    background-image: none;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* 文章按钮图标蓝色边缘发光效果 */
#toggle-content-button i {
    filter: drop-shadow(0 0 4px rgba(52, 152, 219, 0.7));
}

#toggle-content-button:hover {
    background-color: transparent;
    transform: none;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

#toggle-content-button:active {
    transform: none;
    background-color: transparent;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* 文章按钮悬停时增强图标发光效果 */
#toggle-content-button:hover i {
    filter: drop-shadow(0 0 6px rgba(52, 152, 219, 0.8));
}

/* 文章按钮点击时增强图标发光效果 */
#toggle-content-button:active i {
    filter: drop-shadow(0 0 4px rgba(52, 152, 219, 0.9));
}

/* 分享模式下的文章按钮样式 */
#toggle-content-button.share-mode {
    background-color: transparent;
    box-shadow: 0 0 10px 2px rgba(52, 152, 219, 0.7);
    color: #333;
    transition: all 0.2s ease;
    -webkit-box-shadow: 0 0 10px 2px rgba(52, 152, 219, 0.7);
    -moz-box-shadow: 0 0 10px 2px rgba(52, 152, 219, 0.7);
}

/* 分享模式下文章按钮图标蓝色边缘发光效果 */
#toggle-content-button.share-mode i {
    filter: drop-shadow(0 0 4px rgba(52, 152, 219, 0.7));
}

#toggle-content-button.share-mode:hover {
    background-color: transparent;
    transform: none;
    box-shadow: 0 0 15px 3px rgba(52, 152, 219, 0.8);
    -webkit-box-shadow: 0 0 15px 3px rgba(52, 152, 219, 0.8);
    -moz-box-shadow: 0 0 15px 3px rgba(52, 152, 219, 0.8);
}

/* 分享模式下文章按钮悬停时增强图标发光效果 */
#toggle-content-button.share-mode:hover i {
    filter: drop-shadow(0 0 6px rgba(52, 152, 219, 0.8));
}

#toggle-content-button.share-mode:active {
    transform: none;
    background-color: transparent;
    box-shadow: 0 0 8px 1px rgba(52, 152, 219, 0.9);
    -webkit-box-shadow: 0 0 8px 1px rgba(52, 152, 219, 0.9);
    -moz-box-shadow: 0 0 8px 1px rgba(52, 152, 219, 0.9);
}

/* 分享模式下文章按钮点击时增强图标发光效果 */
#toggle-content-button.share-mode:active i {
    filter: drop-shadow(0 0 4px rgba(52, 152, 219, 0.9));
}

.ardata-btn:hover {
    background-color: #45a049;
}

/* 大屏幕自适应 */
@media (max-width: 1024px) {
    .ardata-btn {
        padding: 9px 18px;
        font-size: 13px;
    }
}

/* 平板设备自适应 */
@media (max-width: 768px) {
    .ardata-btn {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 70px;
    }
    
    .ardata-embedded-content {
        max-width: 300px;
    }
}

/* 移动端自适应 */
@media (max-width: 480px) {
    .ardata-btn {
        padding: 7px 12px;
        margin-left: 5px;
        margin-bottom: 5px;
        font-size: 11px;
        min-width: 60px;
        border-radius: 4px;
    }
    
    /* 移动端按钮组布局调整 */
    .ardata-btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .ardata-embedded-content {
        max-width: calc(100% - 40px);
        max-height: 50vh;
    }
    
    /* 移动端文章按钮样式 - 保留图标和蓝色边缘发光 */
    #toggle-content-button {
        width: 20px;
        height: 20px;
        background-color: transparent;
        box-shadow: 0 0 10px 2px rgba(52, 152, 219, 0.7);
        -webkit-box-shadow: 0 0 10px 2px rgba(52, 152, 219, 0.7);
        -moz-box-shadow: 0 0 10px 2px rgba(52, 152, 219, 0.7);
        border-radius: 10px;
        font-size: 18px;
    }

    /* 移动端文章按钮图标蓝色边缘发光效果 */
    #toggle-content-button i {
        filter: drop-shadow(0 0 4px rgba(52, 152, 219, 0.7));
    }

    #toggle-content-button:hover {
        background-color: transparent;
        transform: none;
        box-shadow: 0 0 15px 3px rgba(52, 152, 219, 0.8);
        -webkit-box-shadow: 0 0 15px 3px rgba(52, 152, 219, 0.8);
        -moz-box-shadow: 0 0 15px 3px rgba(52, 152, 219, 0.8);
    }

    #toggle-content-button:active {
        transform: none;
        background-color: transparent;
        box-shadow: 0 0 8px 1px rgba(52, 152, 219, 0.9);
        -webkit-box-shadow: 0 0 8px 1px rgba(52, 152, 219, 0.9);
        -moz-box-shadow: 0 0 8px 1px rgba(52, 152, 219, 0.9);
    }
}

/* 加载指示器样式 */
.model-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    z-index: 40;
    padding: 80px 0 10px 0;
}

.loading-progress-bar-container {
    width: 60%;
    max-width: 600px;
    height: 20px;
    background-color: #f3f3f3;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #3498db;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    animation: progress-animation 1s linear infinite;
    transition: width 0.3s ease;
}

.loading-percentage {
    font-size: 16px;
    color: #666;
    font-weight: bold;
}

@keyframes progress-animation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

/* 控制按钮组样式 - 嵌入到3D窗口左下角 */
#new-qr-button-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

/* 悬浮二维码容器 - 漂浮在按钮上方 */
#new-qr-float-container {
    position: absolute;
    bottom: 70px; /* 漂浮在按钮上方 */
    left: 20px;
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 101; /* 确保在按钮之上 */
}

.qr-tip {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

.qr-arrow {
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

/* 悬浮分享链接容器样式 */
#share-link-container {
    position: absolute;
    bottom: 70px; /* 漂浮在按钮上方 */
    left: 20px;
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 101; /* 确保在按钮之上 */
}

.share-link-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 250px;
}

.share-link-content label {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

#share-link-input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background-color: #f9f9f9;
    color: #333;
}

.share-arrow {
    position: absolute;
    bottom: -8px;
    left: 240px; /* 调整位置使其指向分享按钮 */
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #f8f9fa;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 点击反馈动画 */
@keyframes clickFeedback {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}
