* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f7f7f7;
    color: #333;
    line-height: 1.6;
}

.app-container {
    min-height: 100vh;
    position: relative;
}

/* 语言切换按钮 */
.language-switcher {
    position: absolute;
    top: 40px;
    right: 24px;
    z-index: 10;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.lang-btn:hover {
    background-color: rgba(79, 142, 247, 0.1);
}

/* 主内容区 */
.main-content {
    padding: 24px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.title {
    font-size: 28px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    color: #4CAF50;
    text-shadow: 0 1px 2px rgba(238, 238, 238, 0.5);
}

.description {
    font-size: 16px;
    margin-bottom: 12px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.tip {
    font-size: 12px;
    font-weight: bold;
    color: #d84315;
    margin-bottom: 32px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-direction: column;
}

.action-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.action-btn.primary {
    background-color: #4CAF50;
    color: white;
}

.action-btn.secondary {
    background-color: #2196F3;
    color: white;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.action-btn:active {
    transform: translateY(0);
}

/* 图片预览 */
.image-preview {
    margin-bottom: 20px;
}

.image-preview img {
    width: 260px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: transform 0.2s;
}

.image-preview img:hover {
    transform: scale(1.02);
}

/* 加载状态 */
.loading {
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 结果展示 */
.result-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: left;
}

.result-box h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
}

.result-box p {
    font-size: 16px;
    color: #444;
    margin-bottom: 8px;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 12px 0;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 24px;
    min-width: 220px;
    text-align: center;
}

.lang-option {
    display: block;
    width: 120px;
    padding: 10px;
    margin: 5px auto;
    border: none;
    border-radius: 6px;
    background-color: #eee;
    color: #222;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-option.active {
    background-color: #4F8EF7;
    color: white;
}

.lang-option:hover {
    background-color: #4F8EF7;
    color: white;
}

/* 全屏图片 */
.full-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 80%;
    border-radius: 12px;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #222;
        color: #fff;
    }
    
    .title {
        color: #b9ffb2;
        text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    }
    
    .tip {
        color: #ffb300;
    }
    
    .result-box {
        background-color: #333;
        color: #fff;
    }
    
    .modal-content {
        background-color: #333;
        color: #fff;
    }
}

/* PC端适配 */
@media (min-width: 768px) {
    .main-content {
        padding: 40px;
    }
    
    .button-group {
        flex-direction: row;
        justify-content: center;
    }
    
    .action-btn {
        flex: 1;
        max-width: 200px;
    }
    
    .image-preview img {
        width: 400px;
        height: 300px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .action-btn {
        min-height: 48px;
    }
    
    .lang-btn {
        min-width: 44px;
        min-height: 44px;
    }
}