:root {
    --projectColor: #00A8C1;
    --projectColorLight: #e3ecf3;
    --projectCompareColor: #ffd47c;
    --bgColor: #f8f8f8;
    --textColor: #333;
    --greyColor: #8799a3;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bgColor);
    color: var(--textColor);
    padding-bottom: 80px; /* Space for tabbar */
    margin: 0;
    font-size: 14px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- Utility Classes --- */
.text-project { color: var(--projectColor) !important; }
.bg-project { background-color: var(--projectColor) !important; color: white; }
.text-grey { color: var(--greyColor) !important; }
.text-cut {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shadow-project { box-shadow: 3px 3px 4px rgba(114, 130, 138, 0.2); }
.card-project {
    background: white;
    border-radius: 10px; /* 20rpx */
    overflow: hidden;
}

/* --- Layout Structure --- */
.main {
    width: 100%;
    padding-bottom: 50px;
}

/* Up/Banner Area */
.up {
    width: 100%;
    height: 200px; /* 400rpx */
    overflow: hidden;
    position: relative;
}
.up img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Down/Content Area */
.down {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 15px; /* 10rpx 30rpx */
    margin-top: -100px; /* -200rpx */
    position: relative;
    z-index: 10;
}

/* --- Components --- */

/* Grid Menu */
.menu {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    background-color: #fff;
    padding: 10px 5px; /* 20rpx 10rpx */
    margin-bottom: 15px;
}

.menu .item {
    width: 25%; /* 4 columns */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90px; /* 180rpx */
}

.menu .item .img {
    width: 38px; /* 75rpx */
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    border-radius: 50%;
    background-color: var(--projectColorLight); /* Optional: add bg for icons if using font icons */
    color: var(--projectColor);
    font-size: 20px;
}

.menu .item .img img {
    width: 100%;
    height: 100%;
}

.menu .item .title {
    font-size: 13px; /* 26rpx */
    color: #333;
}

/* List Items (News/Activities) */
.list-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #f1f1f1;
    background: white;
}
.list-item:last-child { border-bottom: none; }

.list-item .left-pic {
    width: 110px; /* 220rpx */
    height: 80px; /* 160rpx */
    border-radius: 5px;
    margin-right: 15px;
    object-fit: cover;
    background: #eee;
}

.list-item .right-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.list-item .title {
    font-size: 15px; /* 30rpx */
    font-weight: bold;
    color: #000;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item .desc {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item .bottom {
    font-size: 11px;
    color: #bbb;
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

/* User Header (My Page) */
.upside {
    width: 100%;
    height: 200px; /* 400rpx */
    background-color: var(--projectColor);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.upside .upImg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.3;
    z-index: 1;
}
.user-bar {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}
.user-bar .avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    overflow: hidden;
    margin-bottom: 10px;
}
.user-bar .avatar img { width: 100%; height: 100%; }
.user-bar .name { font-size: 18px; font-weight: bold; }
.user-bar .desc { font-size: 12px; opacity: 0.8; margin-top: 5px; }

/* Comm List (Menu in My Page) */
.comm-list {
    background: white;
    padding: 0;
    margin-bottom: 15px;
}
.comm-list .item {
    width: 100%; /* Reset from grid menu */
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #f8f8f8;
}
.comm-list .item:last-child { border-bottom: none; }
.comm-list .item .content {
    display: flex;
    align-items: center;
    font-size: 14px;
}
.comm-list .item .my-icon-project {
    font-size: 18px;
    margin-right: 10px;
}
.comm-list .item.arrow::after {
    content: "›";
    color: #ccc;
    font-size: 20px;
}

/* Today Card */
.today-card {
    display: block !important;
    padding: 15px !important;
}
.today-card .today .title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 4px solid var(--projectColor);
}
.today-card .item {
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.today-card .item .time {
    font-size: 12px;
    color: #999;
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}
.today-card .item .project {
    font-size: 14px;
    font-weight: bold;
}

/* Tabbar */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55px; /* 110rpx */
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
    z-index: 1000;
}
.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #999;
    font-size: 10px;
    text-decoration: none;
    flex: 1;
}
.tabbar-item.active {
    color: var(--projectColor);
}
.tabbar-item i {
    font-size: 22px;
    margin-bottom: 2px;
}

/* --- Responsive PC Design --- */
.pc-header { display: none; } /* Hidden on mobile */
.pc-footer { display: none; } /* Hidden on mobile */

@media (min-width: 768px) {
    body {
        background-color: #f0f2f5;
        padding-bottom: 0; /* No tabbar space needed */
    }

    /* Hide Mobile Tabbar */
    .tabbar { display: none; }

    /* Show PC Header */
    .pc-header {
        display: block;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    .pc-header .container {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 70px;
        padding: 0 20px;
    }
    .pc-header .logo {
        display: flex;
        align-items: center;
        font-size: 20px;
        font-weight: bold;
        color: var(--projectColor);
        text-decoration: none;
    }
    .pc-header .logo img {
        height: 40px;
        margin-right: 10px;
    }
    .pc-header .nav {
        display: flex;
        gap: 30px;
    }
    .pc-header .nav a {
        font-size: 16px;
        color: #333;
        font-weight: 500;
        padding: 10px 0;
        position: relative;
    }
    .pc-header .nav a:hover,
    .pc-header .nav a.active {
        color: var(--projectColor);
    }
    .pc-header .nav a.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: var(--projectColor);
        border-radius: 2px;
    }
    .pc-header .login-btn {
        padding: 8px 20px;
        background: var(--projectColor);
        color: white;
        border-radius: 20px;
        font-size: 14px;
        transition: opacity 0.3s;
    }
    .pc-header .login-btn:hover { opacity: 0.9; }

    /* Layout Adjustments */
    .main {
        max-width: 1200px;
        margin: 20px auto;
        padding-bottom: 20px;
        min-height: calc(100vh - 200px);
        display: flex;
        flex-direction: column;
    }

    /* Index specific */
    .up {
        height: 400px; /* Taller banner on PC */
        border-radius: 10px;
        margin-bottom: 20px;
    }
    .down {
        margin-top: 0; /* Reset negative margin */
        padding: 0;
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }
    
    /* Make menu a sidebar on PC or top grid */
    .down .menu {
        width: 280px; /* Sidebar width */
        flex-shrink: 0;
        border-radius: 10px;
        padding: 15px;
        order: 2; /* Put menu on right or left? Let's put on right for 'widget' feel or left for nav. Let's try right side widgets. */
        display: flex;
        flex-direction: column; /* Stack vertically */
    }
    
    .menu .item {
        width: 100%; /* Full width in sidebar */
        flex-direction: row; /* Icon + Text horizontal */
        justify-content: flex-start;
        padding: 15px;
        height: auto;
        border-bottom: 1px solid #f8f8f8;
        transition: background 0.2s;
        border-radius: 8px;
    }
    .menu .item:hover { background: #f9f9f9; }
    .menu .item:last-child { border-bottom: none; }
    .menu .item .img { margin-bottom: 0; margin-right: 15px; width: 30px; height: 30px; font-size: 16px; }
    .menu .item .title { font-size: 15px; }

    /* Content Area */
    #newsList, #meetList {
        flex: 1; /* Take remaining space */
        order: 1;
    }

    .list-item {
        border-radius: 10px;
        margin-bottom: 15px;
        border: 1px solid #eee;
        transition: transform 0.2s, box-shadow 0.2s;
    }
    .list-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    }
    .list-item .left-pic {
        width: 200px;
        height: 130px;
    }
    .list-item .title { font-size: 18px; margin-bottom: 10px; }
    .list-item .desc { font-size: 14px; margin-bottom: 10px; -webkit-line-clamp: 2; }
    
    /* Hide Search Bar sticky wrapper on PC for Activities/News pages, replace with inline */
    .bg-project {
        background: transparent !important;
        padding: 0 !important;
        position: static !important;
        margin-bottom: 20px;
    }
    .bg-project > div {
        background: white !important;
        border: 1px solid #eee;
        max-width: 400px;
    }
    .bg-project input { font-size: 16px; }

    /* Tabs on PC */
    .d-flex.justify-content-around {
        justify-content: flex-start !important;
        gap: 30px;
        padding: 15px 20px !important;
        border-radius: 10px;
    }
    
    /* Footer */
    .pc-footer {
        display: block;
        background: #333;
        color: #ccc;
        padding: 40px 0;
        margin-top: auto;
    }
    .pc-footer .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        text-align: center;
    }
    .pc-footer p { margin: 5px 0; font-size: 14px; }
}
