/* ==================== 首页全局样式 ==================== */
#home {
    max-width: 80%; /* 永远占浏览器宽度的80% */
    margin: 0 auto; /* 水平居中 */
    padding: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-sizing: border-box;
    min-height: calc(100vh - 64px); /* 减去上下内边距，保证垂直居中 */
    justify-content: center; /* 垂直居中 */
}

/* ==================== 通用卡片样式 ==================== */
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    width: 100%;
    box-sizing: border-box;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 28px 0;
    color: #111827;
}

/* ==================== 手柄状态卡片 ==================== */
.gamepad-status-container {
    position: relative;
    text-align: center;
    padding: 40px 40px;
    background: #ffffff;
    border-radius: 8px;
    box-sizing: border-box;
    max-height: 60vh; /* ✅ 核心：最多占视口高度的60% */
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-name-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    background: #f3f4f6;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 500;
    color: #374151;
}

.gamepad-large-preview {
    width: auto;
    height: auto;
    max-width: 90%; /* 左右各留5%边距 */
    max-height: calc(60vh - 80px); /* ✅ 核心：不超过容器高度减去内边距 */
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* ==================== 信息卡片网格 ==================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
}

/* ==================== 单个信息卡片 ==================== */
.info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-sizing: border-box;
}

.info-card-header {
  display: flex;
    justify-content: space-between; /* 让“电量”和“手柄电量状态”左右分布 */
    align-items: center;
    gap: 12px;
    padding-bottom: 16px; /* 给分割线留出空间 */
    border-bottom: 1px solid #e5e7eb; /* ✅ 加一条底部分割线 */
}

.info-card-label {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.info-card-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.info-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

.info-card-value {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}

.info-card-icon {
    width: 100px;
    height: 80px;
    opacity: 0.12;
    flex-shrink: 0;
     filter: brightness(0) saturate(100%); /* 强制变成纯黑色 */
  
}

/* ==================== 下拉框样式 ==================== */
.select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    background: #f2f2f2;
    cursor: pointer;
    color: #000000;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    box-sizing: border-box;
}

.select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1200px) {
    #home {
        max-width: 90%;
    }
}

@media (max-width: 1024px) {
    #home {
        max-width: 95%;
        padding: 24px 0;
        min-height: calc(100vh - 48px);
    }
    
    .gamepad-status-container {
        max-height: 50vh;
    }
    
    .gamepad-large-preview {
        max-height: calc(50vh - 80px);
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}