* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: radial-gradient(1200px 800px at 20% 20%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 60%),
        radial-gradient(900px 600px at 80% 70%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 55%),
        #0b0c10;
    color: #ffffff;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.10) 0%, transparent 55%),
        radial-gradient(circle at 75% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 55%),
        radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
    animation: gradientShift 24s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-5%, -8%) rotate(120deg); }
    66% { transform: translate(-8%, -5%) rotate(240deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.page-content {
    position: relative;
    z-index: 1;
    padding-top: 132px;
    padding-bottom: 90px;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(28px) saturate(120%);
    -webkit-backdrop-filter: blur(28px) saturate(120%);
    padding: 20px 16px 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 52px;
    height: 52px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.18);
    transition: all 0.3s;
    animation: float 3s ease-in-out infinite;
}

.logo-img:hover {
    transform: scale(1.05) rotate(5deg);
    animation: none;
}

.title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-title {
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    letter-spacing: 0.5px;
}

.building-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 12px;
    font-size: 12px;
    color: #FFFFFF;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.building-selector:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.arrow {
    font-size: 10px;
    opacity: 0.8;
}

.cart-btn {
    position: relative;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: all 0.3s;
}

.cart-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.cart-btn .cart-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.cart-btn .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: rgba(255, 255, 255, 0.92);
    color: #111111;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.search-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    border-radius: 24px;
    padding: 0 18px;
    height: 48px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: all 0.3s;
    flex: 1;
}

.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.20);
}

.search-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    filter: brightness(0) invert(1);
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #FFFFFF;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

.modal.show {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(30px) saturate(120%);
    -webkit-backdrop-filter: blur(30px) saturate(120%);
    border-radius: 24px 24px 0 0;
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.70);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    font-size: 24px;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.building-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.building-option {
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 16px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.building-option:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.building-option.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
