/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #e8ecf8 0%, #dfe6ff 100%);
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 30px;
    background: rgba(240, 242, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tab-content {
    padding: 20px;
    background: rgba(240, 242, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.upload-box {
    border: 2px dashed rgba(26, 115, 232, 0.6);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(248, 250, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.result-area {
    margin-top: 40px;
    padding: 25px;
    border-radius: 16px;
    background: rgba(245, 247, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

h1 {
    text-align: center;
    color: #1a73e8;
    margin-bottom: 15px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.description {
    text-align: center;
    color: #5f6368;
    margin-bottom: 40px;
    font-size: 16px;
    font-weight: 500;
}

/* 选项卡样式 */
.tabs {
    margin-bottom: 40px;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    padding: 0 10px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #5f6368;
    position: relative;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    color: #1a73e8;
    background: rgba(26, 115, 232, 0.05);
    border-radius: 8px 8px 0 0;
}

.tab-btn.active {
    color: #1a73e8;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1a73e8;
    border-radius: 2px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 上传区域样式 */
.upload-area {
    margin-bottom: 30px;
}

.upload-box:hover {
    background: rgba(240, 245, 255, 0.7);
    border-color: #1a73e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.15);
}

.upload-box p {
    margin-bottom: 20px;
    color: #5f6368;
    font-weight: 500;
}

.file-select-btn {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.2);
}

.file-select-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

/* 密码输入区域 */
.password-input {
    margin-bottom: 30px;
}

.password-input label {
    display: block;
    margin-bottom: 10px;
    color: #5f6368;
    font-weight: 500;
}

.password-input input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(240, 242, 255, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.password-input input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

/* 检测按钮 */
.check-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #34a853 0%, #28873f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 168, 83, 0.2);
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 168, 83, 0.3);
}

/* 结果区域 */
.permissions-section {
    margin-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
}

.permissions-preview {
    color: #5f6368;
    font-weight: 500;
}

.permissions-count {
    color: #5f6368;
    margin-left: 8px;
    font-weight: 500;
}

.show-all-permissions {
    background: rgba(240, 245, 255, 0.9);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: 6px;
    padding: 4px 12px;
    margin-left: 12px;
    cursor: pointer;
    font-size: 13px;
    color: #1a73e8;
    transition: all 0.3s ease;
}

.show-all-permissions:hover {
    background: rgba(26, 115, 232, 0.1);
}

.permissions-full {
    margin-top: 15px;
    padding: 15px;
    background: rgba(240, 242, 255, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 8px;
}

.permission-item {
    padding: 8px 0;
    color: #5f6368;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.permission-item:last-child {
    border-bottom: none;
}

/* 设备列表样式 */
.devices-section {
    margin: 20px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.device-count-box {
    display: inline-block;
    background: rgba(26, 115, 232, 0.1);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: 6px;
    padding: 4px 12px;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
}

.show-all-devices {
    background: rgba(240, 245, 255, 0.9);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: 6px;
    padding: 4px 12px;
    margin-left: 12px;
    cursor: pointer;
    font-size: 13px;
    color: #1a73e8;
    transition: all 0.3s ease;
}

.show-all-devices:hover {
    background: rgba(26, 115, 232, 0.1);
}

.devices-full {
    margin-top: 15px;
    padding: 15px;
    background: rgba(240, 242, 255, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 8px;
}

.device-item {
    padding: 8px 12px;
    color: #5f6368;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    font-family: monospace;
    background: rgba(240, 242, 255, 0.85);
    border-radius: 4px;
    margin: 4px 0;
}

.device-item:last-child {
    border-bottom: none;
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 40px;
    color: #5f6368;
    font-size: 14px;
    font-weight: 500;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 15px;
        padding: 20px;
        background: rgba(240, 242, 255, 0.7);
    }
    
    .upload-box {
        padding: 30px 15px;
        background: rgba(248, 250, 255, 0.6);
    }
    
    .result-area {
        padding: 20px;
    }

    .tab-content {
        backdrop-filter: blur(12px);
    }
}

@media (max-width: 480px) {
    .tab-header {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .tab-btn.active::after {
        display: none;
    }
    
    .tab-btn.active {
        background: rgba(26, 115, 232, 0.1);
    }
}