/* ==================================== */
/* 基础样式和响应式设置 */
/* ==================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #e0f2f1;
    color: #263238;
    margin: 0;
    padding: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    font-size: 14px; 
}

/* 头部 (Header) 样式 - 保持白色 */
.header {
    background-color: #ffffff;
    padding: 10px 20px;
    width: 100%; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    box-sizing: border-box; 
}

.header-left, .header-right {
    display: flex;
    align-items: center;
}

.logo-kaspersky {
    max-width: 100px;
    height: auto;
}

.operator-logo {
    background-color: #33a65b;
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

/* 内容容器：自适应宽度 */
.container {
    background-color: #e0f2f1;
    max-width: 420px; 
    width: 100%; 
    padding: 15px; 
    border-radius: 0;
    box-shadow: none; 
    border: none;
    margin: 0; 
    box-sizing: border-box;
}

/* ==================================== */
/* 警告区域 (Warning Alert) */
/* ==================================== */
.warning-alert {
    background-color: #ffebee;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #ef9a9a; 
    color: #c62828; 
}

.alert-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.warning-alert h2 {
    margin: 5px 0 10px 0;
    font-size: 18px;
    font-weight: 900;
    color: #c62828; 
}

.warning-alert p {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

/* ==================================== */
/* 设备信息区 (Device Info) */
/* ==================================== */
.device-info {
    text-align: left;
    margin-bottom: 30px; 
    color: #37474f; 
}

.device-info h3 {
    color: #008744; 
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-weight: normal;
}

.info-grid {
    display: grid;
    /* 保持 1 列布局，实现垂直堆叠 */
    grid-template-columns: 1fr; 
    gap: 0; 
}

.info-grid > div {
    /* 关键修改：移除 flex 布局，使用块级元素实现上下结构 */
    padding: 6px 0;
    border-bottom: 1px dashed #cfd8dc; 
    display: block; 
    text-align: left; /* 文本居左 */
}

.label {
    /* 标签在一行 */
    display: block; 
    font-size: 11px; 
    color: #78909c; 
    margin-bottom: 2px; /* 增加与数值之间的间距 */
}

.value {
    /* 数值在下一行 */
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #263238; 
    text-align: left;
    white-space: normal; /* 允许换行 */
}

/* 按钮上方的警告提醒样式 */
.final-recommendation-note {
    font-size: 11px;
    color: #008744; 
    font-weight: bold;
    margin-top: 15px; 
    margin-bottom: 15px; 
    text-align: center;
}


/* ==================================== */
/* 动态数据和按钮区域 */
/* ==================================== */
/* 动态获取/IP定位的数据统一使用绿色 */
#ipAddress, #city, #coords, #networkType {
    color: #008744; 
}

/* 运营商名称固定为绿色 */
#operatorName {
    color: #008744;
}

/* 电池电量处理 */
#batteryLevel {
    color: #008744; 
}
#batteryLevel.low { 
    color: #c62828;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px; 
}

.btn {
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s, opacity 0.3s;
}

.btn-scan {
    background-color: #008744; 
    color: white;
    box-shadow: 0 3px 8px rgba(0, 135, 68, 0.4);
}

.btn-scan:hover {
    background-color: #006633;
}

.btn-ignore {
    background-color: transparent;
    color: #546e7a; 
    border: 1px solid #90a4ae; 
}

.btn-ignore:hover {
    opacity: 0.8;
}

/* ==================================== */
/* 媒体查询 - 针对更宽的屏幕（可选） */
/* ==================================== */
@media (min-width: 400px) {
    .container {
        padding: 25px;
    }
    /* 在宽屏幕上也可以保持上下结构，但恢复两列布局 */
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .info-grid > div {
        padding: 8px 0;
    }
    .label {
        font-size: 12px;
    }
    .value {
        font-size: 16px;
    }
}