/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 加载层样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(20, 20, 30, 0.95));
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-container {
    text-align: center;
    color: #fff;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    border: 3px solid transparent;
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
    width: 80px;
    height: 80px;
    animation-delay: 0s;
    border-top-color: #667eea;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    animation-delay: -0.5s;
    border-top-color: #764ba2;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    animation-delay: -1s;
    border-top-color: #f093fb;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-subtitle {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 30px;
}

.loading-progress {
    width: 250px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    opacity: 0.7;
}

/* 隐藏主应用 */
.app-hidden {
    opacity: 0;
    visibility: hidden;
}

.app-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--content-bg-color, rgba(10, 10, 10, 1));
    color: #fff;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding-bottom: 120px; /* 为底部按钮留出空间 */
}

/* 图片画廊 */
.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.image-item {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.02);
}

/* 底部操作栏 */
.footer-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px;
    z-index: 100;
}

.action-buttons {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.action-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    text-align: center;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.action-btn.primary {
    background: linear-gradient(135deg, rgb(22, 120, 255), rgb(0, 100, 235));
    color: white;
}

.action-btn.secondary {
    background: linear-gradient(135deg, rgb(255, 170, 9), rgb(255, 140, 0));
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

.btn-bubble {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1.2;
    margin-bottom: 4px;
}

.btn-text {
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

/* 固定工具 */
.fixed-tools {
    position: fixed;
    right: 20px;
    bottom: 140px;
    z-index: 99;
}

.tool-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.tool-item:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

.tool-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-actions {
        padding: 12px;
    }
    
    .action-buttons {
        gap: 8px;
    }
    
    .action-btn {
        min-height: 55px;
        padding: 10px 12px;
        border-radius: 8px;
    }
    
    .btn-bubble {
        font-size: 10px;
    }
    
    .btn-text {
        font-size: 14px;
    }
    
    .fixed-tools {
        right: 15px;
        bottom: 120px;
    }
    
    .tool-item {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding-bottom: 100px;
    }
    
    .action-btn {
        min-height: 50px;
        padding: 8px 10px;
    }
    
    .btn-bubble {
        font-size: 9px;
    }
    
    .btn-text {
        font-size: 13px;
    }
}

/* 加载动画 */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
