/* 基础样式 */
@font-face {
    font-family: "Proxima Nova";
    src: url("/assets/fonts/ProximaNova.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}
body {
    font-family: "Proxima Nova", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    background-color: #f5f5f5;
    -webkit-text-size-adjust: 100%;
}

/* 搜索栏样式 */
#search-bar {
    width: calc(100% - 30px);
    max-width: 400px;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    margin: 15px auto;
    display: block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

/* 处理 iOS 上的输入框圆角问题 */
input[type="search"],
input[type="text"] {
    -webkit-border-radius: 25px;
    -moz-border-radius: 25px;
    border-radius: 25px;
}

/* 处理触摸时的高亮颜色 */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 处理滚动行为 */
.brand-container {
    -webkit-overflow-scrolling: touch;
}

/* 处理选择文本的颜色 */
::selection {
    background: #4caf50;
    color: white;
    text-shadow: none;
}

::-moz-selection {
    background: #4caf50;
    color: white;
    text-shadow: none;
}

/* 处理 webkit 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 国家区块样式 */
.country-section {
    width: 100%;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.country-title {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 3px solid #4caf50;
}

/* 集团区块样式 */
.group-section {
    margin: 15px 0;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 10px;
}

.group-title {
    color: #444;
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ddd;
}

/* 品牌网格样式 */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

/* 响应式设计 */
/* iPad Pro */
@media screen and (min-width: 1024px) {
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* iPad */
@media screen and (max-width: 1023px) and (min-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* iPhone 横屏 */
@media screen and (max-width: 767px) and (min-width: 568px) {
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* iPhone 竖屏 */
@media screen and (max-width: 567px) {
    body {
        padding: 10px;
    }

    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .country-title {
        font-size: 20px;
    }

    .group-title {
        font-size: 18px;
    }
}

/* 安全区域适配 */
@supports (padding: max(0px)) {
    body {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}
