/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: transparent;
    color: #333;
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #0092FF 0%, #61D0F5 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-title {
    font-size: 1.8rem;
    font-weight: bold;
    flex: 1;
}

.nav-title a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
}



/* Banner样式 */
.banner-container {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 2rem;
    box-sizing: border-box;
}

.banner-wrapper-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    aspect-ratio: 4800 / 520;
    max-height: 400px;
    width: 100%;
    height: 100%;
}

.banner-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    width: 100%;
}

.banner-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

.banner-indicators {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: #FF7029;
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

/* 主要内容 */
.main-content {
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}



/* 群聊网格 */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 群聊卡片 */
.group-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
}

.group-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 卡片头部 */
.group-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.group-avatar-small {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.group-title-area {
    flex: 1;
}

.group-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.group-tag {
  display: inline-block;
  background-color: #ff6b35;
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.group-tags {
    margin-bottom: 0.5rem;
}

.group-tags .group-tag {
  margin-right: 0.3rem;
  margin-bottom: 0.2rem;
}

.group-tags .group-tag:first-child {
    background-color: #FF7029;
    color: white;
}

.group-tags .group-tag:not(:first-child) {
  background-color: #FFEFE3;
  color: #FF5E18;
}

.group-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 群聊特点 */
.group-features {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(3px);
}

.feature-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-label {
    color: #888;
    font-weight: 500;
    position: relative;
    padding-left: 20px;
    display: inline-flex;
    align-items: center;
}

.feature-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}

.feature-label[data-label="发单时段"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.feature-label[data-label="主推价格"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M8 14s1.5 2 4 2 4-2 4-2'/%3E%3Cline x1='9' y1='9' x2='9.01' y2='9'/%3E%3Cline x1='15' y1='9' x2='15.01' y2='9'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.feature-label[data-label="商品类别"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.feature-value {
    color: #333;
    font-weight: 600;
}

/* 商品图片 */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-image {
    width: 100%;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    background: #f0f0f0;
}

/* 加入按钮 */
.join-btn {
    width: 100%;
    padding: 0.5rem;
    background: #296AFD;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.join-btn:hover {
    background: #1e5ae8;
    transform: translateY(-1px);
}

/* 管理后台样式 */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h2 {
    margin: 0;
    color: #333;
}

.add-group-btn {
    background: #296AFD;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.add-group-btn:hover {
    background: #1e5ae8;
    transform: translateY(-1px);
}

.banner-management {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.banner-management h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}

.banner-management .form-group {
    margin-bottom: 1rem;
}

.banner-management label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.banner-management input {
    width: 100%;
    max-width: 400px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.banner-management button {
    margin-top: 0.5rem;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* 模态窗口样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 0;
    padding: 30px;
    border-radius: 12px;
    width: 360px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

/* 线报信息流样式 */
.tip-off-container {
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.tip-off-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

.tip-off-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.tip-off-icon {
    font-size: 18px;
    margin-right: 8px;
}

.tip-off-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-right: 8px;
}

.tip-off-subtitle {
    font-size: 12px;
    color: #999;
}

.tip-off-scroll {
    height: 40px;
    overflow: hidden;
    position: relative;
}

.tip-off-content {
    position: absolute;
    width: 100%;
    transition: transform 0.5s ease;
}

.tip-off-item {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.tip-off-text {
    font-size: 14px;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.tip-off-time {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        padding: 0 1rem;
    }
    
    .nav-title {
        font-size: 1.4rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .group-header {
        flex-direction: row;
        text-align: left;
    }
    
    .product-gallery {
        grid-template-columns: 1fr 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* 移动端宽度统一优化 */
    .banner-container,
    .tip-off-container,
    .sort-container {
        padding: 0 1rem;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
    
    .banner-wrapper-container,
    .tip-off-card,
    .sort-card,
    .sort-options {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 移动端模态窗口优化 */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
    }
    
    .modal-content {
        width: 90%;
        max-width: 320px;
        margin: 0;
        padding: 20px;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10001;
    }
    
    #modalQR {
        width: 100%;
        max-width: 280px;
        height: auto;
        aspect-ratio: 1/1;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .groups-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}