:root {
    --wuye-primary: #E86A33;
    --wuye-primary-dark: #C45326;
    --wuye-primary-light: #F28653;
    --wuye-accent: #F2A93B;
    --wuye-bg: #FFF8F3;
    --wuye-white: #ffffff;
    --wuye-text: #3D2E26;
    --wuye-text-light: #6B5A50;
    --wuye-text-muted: #9E8E84;
    --wuye-border: #EAD6C8;
    --wuye-gray: #FCF5EF;
    --wuye-danger: #D94B3E;
    --wuye-success: #5B8A2E;
    --wuye-warning: #F2A93B;
    --wuye-shadow: rgba(232, 106, 51, 0.10);
    --wuye-shadow-hover: rgba(232, 106, 51, 0.18);
    --wuye-radius: 18px;
    --wuye-radius-sm: 12px;

    --header-h: 56px;
    --nav-h: 68px;
    --container-max: 520px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}

html {
    font-size: 18px;
}

body {
    margin: 0;
    padding: 0;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans CN", sans-serif;
    color: var(--wuye-text);
    background-color: var(--wuye-bg);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

.wuye-page {
    min-height: 100vh;
    background: var(--wuye-bg);
    padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 20px);
}

.wuye-app {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--wuye-bg);
    position: relative;
}

.wuye-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px calc(var(--nav-h) + var(--safe-bottom) + 30px);
    min-height: 100vh;
    background: var(--wuye-bg);
    position: relative;
}

@media (min-width: 768px) {
    html {
        font-size: 19px;
    }
    body {
        background: #e8eaed;
    }
    .wuye-app,
    .wuye-container {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
        border-left: 1px solid #e0e2e5;
        border-right: 1px solid #e0e2e5;
    }
    .wuye-bottom-nav {
        left: 50% !important;
        transform: translateX(-50%);
        max-width: var(--container-max);
        border-left: 1px solid #e8e8e8;
        border-right: 1px solid #e8e8e8;
    }
    .wuye-topbar {
        margin: 0 auto;
        max-width: var(--container-max);
    }
    .wuye-toast {
        max-width: 360px;
    }
}

.wuye-topbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: calc(var(--header-h) + 4px);
    background: var(--wuye-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    margin: 0 -16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.wuye-topbar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.wuye-topbar .topbar-left,
.wuye-topbar .topbar-right {
    min-width: 40px;
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.wuye-topbar .topbar-left {
    justify-content: flex-start;
}

.wuye-topbar .topbar-right {
    justify-content: flex-end;
}

.wuye-topbar .topbar-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    max-width: calc(100% - 144px);
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wuye-topbar .topbar-title span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wuye-topbar .topbar-title::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -8px;
    width: 24px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

.wuye-topbar .back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.375rem;
    transition: background 0.2s;
}

.wuye-topbar .back-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

.page-header,
.action-header {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--wuye-primary);
    color: white;
    min-height: var(--header-h);
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title,
.action-title {
    flex: 1;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wuye-header {
    padding: 28px 16px 32px;
    text-align: center;
    background: linear-gradient(135deg, var(--wuye-primary) 0%, var(--wuye-primary-light) 100%);
    color: white;
    border-radius: 0 0 24px 24px;
    margin: 0 -16px;
    position: relative;
    overflow: hidden;
}

.wuye-header::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.header-subtitle {
    font-size: 0.9375rem;
    opacity: 0.85;
    font-weight: 400;
}

.wuye-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background-color: #fff;
    border-top: 1px solid #e8eaed;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    display: flex;
    justify-content: space-around;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--wuye-text-muted);
    cursor: pointer;
    user-select: none;
    position: relative;
    min-width: 0;
    padding: 8px 0 4px;
    min-height: 64px;
}

.nav-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8px;
    right: 8px;
    bottom: 0;
    border-radius: 14px;
    background: transparent;
    transition: background 0.2s;
    z-index: -1;
}

.nav-item:active::before,
.nav-item.active::before {
    background: rgba(232, 106, 51, 0.10);
}

.nav-item.active {
    color: var(--wuye-primary);
}

.nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: transform 0.2s;
}

.nav-icon .glyphicon {
    font-size: 1.5rem;
}

.nav-item.active .nav-icon {
    transform: translateY(-1px);
}

.nav-text {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.glyphicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.grid-icon .glyphicon,
.menu-icon .glyphicon {
    font-size: 1.5rem;
    color: var(--wuye-primary);
}

.wuye-swiper {
    margin: 18px 0;
}

.swiper-container {
    position: relative;
    border-radius: var(--wuye-radius);
    overflow: hidden;
    box-shadow: 0 4px 14px var(--wuye-shadow);
}

.swiper-slide {
    display: none;
    width: 100%;
    height: 200px;
}

.swiper-slide.active {
    display: block;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.dot.active {
    background-color: #fff;
    width: 22px;
    border-radius: 5px;
}

.wuye-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px 0;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 8px;
    background: #fff;
    border: 1px solid transparent;
    border-radius: var(--wuye-radius-sm);
    box-shadow: 0 2px 8px var(--wuye-shadow);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    text-align: center;
    position: relative;
    min-height: 100px;
}

.grid-item:active {
    transform: scale(0.96);
    box-shadow: 0 4px 14px var(--wuye-shadow-hover);
    border-color: #FFE8DB;
}

.grid-icon {
    position: relative;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFF4E8 0%, #FFE8DB 100%);
}

.grid-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.grid-text {
    font-size: 1rem;
    color: var(--wuye-text);
    font-weight: 600;
    line-height: 1.2;
}

.grid-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    width: auto;
    height: 22px;
    padding: 0 6px;
    background-color: var(--wuye-danger);
    color: white;
    font-size: 0.75rem;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.grid-icon .badge {
    position: absolute;
    top: -10px;
    right: -29px;
    z-index: 2;
    font-size: 0.75rem;
    min-width: 22px;
    width: auto;
    height: 22px;
    border-radius: 11px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.wuye-section .wuye-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.index-container .wuye-grid,
.wuye-index .wuye-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.index-container .grid-item,
.wuye-index .grid-item {
    min-height: 92px;
    padding: 16px 4px;
    background: linear-gradient(180deg, #ffffff 0%, #FFF8F3 100%);
    border: 1px solid #FFE8DB;
    box-shadow: 0 2px 8px rgba(232, 106, 51, 0.08);
}

.index-container .grid-item:active,
.wuye-index .grid-item:active {
    box-shadow: 0 4px 14px rgba(232, 106, 51, 0.14);
}

.index-container .grid-icon,
.wuye-index .grid-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #FFF4E8 0%, #FFE8DB 100%);
}

.index-container .grid-icon .glyphicon,
.index-container .grid-icon span,
.wuye-index .grid-icon .glyphicon,
.wuye-index .grid-icon span {
    font-size: 1.75rem;
}

.index-container .grid-text,
.wuye-index .grid-text {
    font-size: 1rem;
}

@media (max-width: 374px) {
    .wuye-grid,
    .wuye-section .wuye-grid,
    .index-container .wuye-grid,
    .wuye-index .wuye-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 414px) {
    .index-container .wuye-grid,
    .wuye-index .wuye-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.wuye-section {
    margin-top: 18px;
    background-color: var(--wuye-white);
    border-radius: var(--wuye-radius);
    padding: 18px 16px;
    box-shadow: 0 2px 10px var(--wuye-shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.section-title {
    font-size: 1.1875rem;
    font-weight: 800;
    color: var(--wuye-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: "";
    width: 5px;
    height: 22px;
    background: var(--wuye-primary);
    border-radius: 3px;
}

.section-more {
    font-size: 1.0625rem;
    color: var(--wuye-accent);
    display: flex;
    align-items: center;
    gap: 2px;
}

.section-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    font-size: 1.0625rem;
}

.item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--wuye-accent);
    margin-right: 12px;
    flex-shrink: 0;
}

.item-text {
    flex: 1;
    color: var(--wuye-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-date {
    color: var(--wuye-text-muted);
    font-size: 1rem;
    margin-left: 10px;
    flex-shrink: 0;
}

.submit-btn,
.wuye-btn-primary,
.wuye-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 28px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.15s;
    min-height: 48px;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--wuye-primary) 0%, var(--wuye-primary-light) 100%);
    color: white;
    font-size: 1.1875rem;
    margin-top: 24px;
    box-shadow: 0 4px 14px var(--wuye-shadow);
}

.submit-btn:active {
    transform: scale(0.98);
}

.wuye-btn {
    padding: 14px 24px;
    font-size: 1.0625rem;
}

.wuye-btn-primary {
    background-color: var(--wuye-primary);
    color: white;
    padding: 14px 24px;
    font-size: 1.0625rem;
}

.wuye-btn-outline {
    background-color: transparent;
    border: 1px solid var(--wuye-primary);
    color: var(--wuye-primary);
    padding: 13px 24px;
}

.wuye-btn-block {
    display: block;
    width: 100%;
}

.wuye-btn-lg {
    padding: 18px 32px;
    font-size: 1.1875rem;
    border-radius: 28px;
}

.action-btn {
    padding: 14px 24px;
    background-color: var(--wuye-primary);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
}

.wuye-card,
.list-item {
    background-color: var(--wuye-white);
    border-radius: var(--wuye-radius);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px var(--wuye-shadow);
    display: flex;
    align-items: center;
}

.list-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 16px;
    flex-shrink: 0;
}

.list-content {
    flex: 1;
    min-width: 0;
}

.list-title {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--wuye-primary);
    margin-bottom: 8px;
}

.list-sub {
    font-size: 1.0625rem;
    color: var(--wuye-text-light);
    margin-bottom: 4px;
}

.list-meta {
    font-size: 1rem;
    color: var(--wuye-text-muted);
}

.list-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 1.125rem;
    color: var(--wuye-text);
    margin-bottom: 10px;
    font-weight: 600;
}

.form-input,
.form-select {
    width: 100%;
    height: 56px;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 1.125rem;
    color: var(--wuye-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--wuye-primary);
    box-shadow: 0 0 0 3px rgba(232, 106, 51, 0.10);
}

.form-input[readonly] {
    background: #f5f5f5;
    color: var(--wuye-text-muted);
}

.form-textarea {
    width: 100%;
    min-height: 140px;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px;
    font-size: 1.125rem;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--wuye-primary);
    box-shadow: 0 0 0 3px rgba(232, 106, 51, 0.10);
}

.tabs-bar {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eee;
    margin: 0 -16px 16px;
    box-shadow: 0 2px 6px var(--wuye-shadow);
}

.tabs-bar .tab-item {
    flex: 1;
    text-align: center;
    padding: 18px 0;
    font-size: 1.125rem;
    color: var(--wuye-text-light);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    font-weight: 600;
}

.tabs-bar .tab-item.active {
    color: var(--wuye-primary);
}

.tabs-bar .tab-item.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--wuye-primary);
    border-radius: 2px 2px 0 0;
}

.tab-content-wrapper {
    padding: 0 0 16px;
}

.tab-content {
    display: block;
    padding: 0;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.badge-success { background: #FFF7F0; color: var(--wuye-success); }
.badge-warning { background: #FFF8E6; color: var(--wuye-warning); }
.badge-danger { background: #FFF0EE; color: var(--wuye-danger); }
.badge-info { background: #FFF4E8; color: var(--wuye-accent); }
.badge-default { background: #f5f5f5; color: var(--wuye-text-muted); }

.avatar-img,
.member-avatar-img,
.group-avatar-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--wuye-primary-light) 0%, var(--wuye-primary) 100%);
    border-radius: 50%;
    overflow: hidden;
    font-size: 1.5rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: var(--wuye-radius);
    width: 88%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    position: relative;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--wuye-primary);
    text-align: center;
    margin-bottom: 24px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 44px;
    height: 44px;
    font-size: 1.75rem;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-btn {
    flex: 1;
    height: 52px;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.modal-btn-cancel {
    background: #f5f5f5;
    color: var(--wuye-text);
}

.modal-btn-confirm {
    background: var(--wuye-primary);
    color: #fff;
}

.wuye-toast {
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 18px 32px;
    border-radius: 12px;
    font-size: 1.125rem;
    z-index: 10001;
    opacity: 0;
    transition: all 0.25s ease;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
    line-height: 1.5;
}

.wuye-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 24px;
    color: var(--wuye-text-muted);
}

.empty-state .empty-icon {
    font-size: 4.5rem;
    margin-bottom: 20px;
    color: var(--wuye-primary);
    opacity: 0.35;
}

.empty-state .empty-text {
    font-size: 1.1875rem;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 1rem;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    min-height: 40px;
}

.btn-primary { background: var(--wuye-primary); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--wuye-primary); color: var(--wuye-primary); }
.btn-danger { background: var(--wuye-danger); color: #fff; }
.btn-ghost { background: #f5f5f5; color: var(--wuye-text-light); }

.wuye-flex { display: flex; }
.wuye-flex-center { display: flex; align-items: center; justify-content: center; }
.wuye-flex-between { display: flex; align-items: center; justify-content: space-between; }

.text-muted { color: var(--wuye-text-muted); }
.text-center { text-align: center; }

.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }

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