/* ========== 山东商业职业技术大学90周年校庆主题 ========== */
/* 风格：水彩国潮 · 珊瑚红/桃腮粉/暖黄渐变 · 竹叶)·(花卉·(水花纹样 */
/* 柔和水彩晕染如朝霞，植物纹样如画卷，低饱和朦胧美 */

:root {
    /* 水彩国潮 · 柔和四红色系 */
    --color-jiang: #D65A5A;          /* 深珊瑚 - 主色 */
    --color-jiang-dark: #B84848;
    --color-jiang-light: #E87878;
    --color-shiliu: #EE8674;         /* 珊瑚红 - 辅色 */
    --color-shiliu-dark: #D65A5A;
    --color-shiliu-light: #F2A694;
    --color-xinchun: #E87878;        /* 桃红 - 强调 */
    --color-xinchun-dark: #C86060;
    --color-mitao: #F2A694;          /* 桃腮粉 - 柔和 */
    --color-mitao-light: #F5C0B0;
    --color-mitao-dark: #E89888;
    --color-nuanhuang: #F5D0A9;      /* 暖黄 - 过渡 */
    --color-liujin: #E8B84A;         /* 鎏金 - 装饰 */
    --color-liujin-light: #F0C870;

    /* 语义映射 */
    --color-primary: #D65A5A;
    --color-primary-dark: #B84848;
    --color-primary-light: #E87878;
    --color-gold: #E8B84A;
    --color-gold-light: #F0C870;
    --color-accent: #E87878;
    --color-accent-dark: #C86060;
    --color-soft: #F2A694;
    --color-ink: #5A3838;
    --color-bg: #FDF8F4;             /* 暖宣纸 */
    --color-bg-card: #FFFFFF;
    --color-bg-warm: #FBF0EC;
    --color-text: #5A3838;
    --color-text-light: #8A6060;
    --color-text-muted: #B89898;
    --color-border: #F0E0DC;
    --color-success: #6A9A5A;
    --color-warning: #D8A050;
    --color-info: #D65A5A;
    --shadow-sm: 0 2px 8px rgba(214, 90, 90, 0.08);
    --shadow-md: 0 4px 16px rgba(214, 90, 90, 0.12);
    --shadow-lg: 0 8px 28px rgba(214, 90, 90, 0.16);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --header-h: 60px;
    --nav-h: 64px;

    /* 竹叶纹样 SVG */
    --zhuye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23D65A5A' stroke-width='1' opacity='0.08'%3E%3Cpath d='M15,105 Q35,75 55,55 Q70,40 85,25'/%3E%3Cpath d='M20,100 Q38,78 55,60' fill='%23D65A5A' opacity='0.4'/%3E%3Cpath d='M30,108 Q48,80 65,58 Q78,42 90,30'/%3E%3Cpath d='M35,103 Q50,83 65,68' fill='%23D65A5A' opacity='0.3'/%3E%3Cpath d='M50,110 Q65,85 80,65 Q90,50 100,38'/%3E%3C/g%3E%3C/svg%3E");

    /* 花卉纹样 SVG */
    --huahui: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23EE8674' stroke-width='0.8' opacity='0.07'%3E%3Cpath d='M10,140 Q40,100 80,80 Q120,60 150,30'/%3E%3Ccircle cx='80' cy='80' r='6'/%3E%3Cpath d='M75,75 Q80,70 85,75 Q80,80 75,75'/%3E%3Cpath d='M40,110 Q45,105 50,110 Q45,115 40,110'/%3E%3Cpath d='M110,60 Q115,55 120,60 Q115,65 110,60'/%3E%3Ccircle cx='40' cy='110' r='3'/%3E%3Ccircle cx='120' cy='60' r='3'/%3E%3C/g%3E%3C/svg%3E");

    /* 水花纹样 SVG */
    --shuihua: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60'%3E%3Cg fill='none' stroke='%23F2A694' stroke-width='0.8' opacity='0.12'%3E%3Cpath d='M0,35 Q25,25 50,35 Q75,45 100,35 Q125,25 150,35 Q175,45 200,35'/%3E%3Cpath d='M0,45 Q30,38 60,45 Q90,52 120,45 Q150,38 180,45'/%3E%3C/g%3E%3C/svg%3E");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: "STKaiti", "KaiTi", "楷体", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ========== 启动屏 · 水彩国潮 ========== */
.splash-screen {
    position: fixed;
    inset: 0;
    background:
        /* 水彩晕染光团 */
        radial-gradient(ellipse at 25% 20%, rgba(245, 208, 169, 0.5) 0%, transparent 45%),
        radial-gradient(ellipse at 75% 80%, rgba(242, 166, 148, 0.4) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(238, 134, 116, 0.15) 0%, transparent 60%),
        /* 水彩渐变底色：珊瑚红→暖黄→桃腮粉 */
        linear-gradient(160deg, #EE8674 0%, #F5D0A9 45%, #F2A694 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    overflow: hidden;
}

/* 竹叶装饰（左上） */
.splash-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        var(--zhuye) top left / 200px 200px no-repeat,
        var(--zhuye) bottom right / 180px 180px no-repeat,
        var(--huahui) 0 0 / 200px 200px repeat;
    animation: leafSway 8s ease-in-out infinite;
    pointer-events: none;
}

/* 水花底部装饰 */
.splash-screen::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background:
        var(--shuihua) bottom / 200px 60px repeat-x,
        radial-gradient(ellipse at 50% 100%, rgba(214, 90, 90, 0.12) 0%, transparent 60%);
    animation: waterFlow 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes leafSway {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(3px, -2px); }
}

@keyframes waterFlow {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(-15px); opacity: 0.85; }
}

.splash-screen.hide {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    color: #FFF9F2;
    animation: splashIn 1s ease;
    position: relative;
    z-index: 2;
}

@keyframes splashIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.splash-logo {
    margin-bottom: 28px;
    position: relative;
}

/* 圆形色环 - 水彩风 + 呼吸动效 */
.logo-ring {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(238,134,116,0.1) 70%, transparent 100%);
    box-shadow: 0 0 60px rgba(238, 134, 116, 0.3), inset 0 0 30px rgba(255, 255, 255, 0.15);
    position: relative;
    animation: ringBreathe 5s ease-in-out infinite;
}

@keyframes ringBreathe {
    0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(238, 134, 116, 0.3), inset 0 0 30px rgba(255, 255, 255, 0.15); }
    50% { transform: scale(1.06); box-shadow: 0 0 80px rgba(238, 134, 116, 0.4), inset 0 0 36px rgba(255, 255, 255, 0.2); }
}

.logo-ring::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-ring::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.25);
}

/* 中心色点 - 珊瑚红 */
.logo-inner {
    width: 72px;
    height: 72px;
    background: radial-gradient(circle, #EE8674 0%, #D65A5A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: #FFF9F2;
    letter-spacing: 1px;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
    box-shadow: 0 6px 20px rgba(214, 90, 90, 0.4), inset 0 0 12px rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
    animation: dotBreathe 6s ease-in-out infinite;
}

@keyframes dotBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.splash-title {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 6px;
    color: #FFF9F2;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
    text-shadow: 0 2px 12px rgba(214, 90, 90, 0.3);
}

.splash-title::before,
.splash-title::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    vertical-align: middle;
    margin: 0 12px;
}

.splash-subtitle {
    font-size: 14px;
    opacity: 0.88;
    margin-bottom: 28px;
    letter-spacing: 3px;
    color: #FFE9DD;
    text-shadow: 0 1px 6px rgba(214, 90, 90, 0.2);
}

.splash-anniv {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    padding: 8px 22px;
    border-radius: 30px;
    margin-bottom: 14px;
    position: relative;
    backdrop-filter: blur(6px);
}

.splash-anniv::before,
.splash-anniv::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.splash-anniv::before { top: -4px; left: 50%; transform: translateX(-50%); }
.splash-anniv::after { display: none; }

.anniv-badge {
    font-size: 26px;
    font-weight: 700;
    color: #FFF9F2;
    font-family: Georgia, "STKaiti", serif;
    letter-spacing: 1px;
}

.anniv-text {
    font-size: 13px;
    color: #FFE9DD;
    letter-spacing: 2px;
    opacity: 0.9;
}

.splash-school {
    font-size: 13px;
    opacity: 0.75;
    margin-bottom: 36px;
    letter-spacing: 2px;
    color: #FFE9DD;
    text-shadow: 0 1px 4px rgba(214, 90, 90, 0.2);
}

.splash-loading {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: dotBounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* ========== 顶部栏 · 水彩渐变 ========== */
.app-header {
    height: var(--header-h);
    background: linear-gradient(135deg, #D65A5A 0%, #EE8674 50%, #E87878 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), var(--color-liujin), rgba(255,255,255,0.5), transparent);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.school-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFFFFF 0%, #F5D0A9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(214, 90, 90, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.badge-90 {
    font-size: 15px;
    font-weight: 700;
    color: #D65A5A;
    font-family: Georgia, "STKaiti", serif;
}

.header-titles {
    display: flex;
    flex-direction: column;
}

.app-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
}

.app-subtitle {
    font-size: 11px;
    opacity: 0.85;
    letter-spacing: 1px;
    color: #F5D0A9;
}

.header-right {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:active {
    background: rgba(255, 255, 255, 0.35);
}

/* ========== 主内容区 · 水彩宣纸 ========== */
.app-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--nav-h) + 12px);
    background:
        /* 水彩晕染 */
        radial-gradient(ellipse at 10% 5%, rgba(238, 134, 116, 0.06) 0%, transparent 35%),
        radial-gradient(ellipse at 90% 95%, rgba(242, 166, 148, 0.05) 0%, transparent 35%),
        radial-gradient(ellipse at 50% 50%, rgba(245, 208, 169, 0.04) 0%, transparent 50%),
        /* 花卉纹样 */
        var(--huahui) 0 0 / 220px 220px repeat,
        /* 水花底部 */
        var(--shuihua) bottom / 200px 60px repeat-x,
        /* 宣纸底 */
        var(--color-bg);
}

.view {
    display: none;
    animation: viewIn 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes viewIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ========== 首页横幅 · 水彩渐变 ========== */
.hero-banner {
    position: relative;
    margin: 12px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #EE8674 0%, #F5D0A9 40%, #F2A694 80%, #E87878 100%);
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(214, 90, 90, 0.15) 0%, transparent 50%),
        var(--huahui) 0 0 / 180px 180px repeat;
}

.hero-bg::after {
    content: '90';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    font-family: Georgia, serif;
}

.hero-content {
    position: relative;
    padding: 20px 18px;
    color: #FFFFFF;
    z-index: 1;
}

.hero-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 2px;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
    text-shadow: 0 2px 8px rgba(214, 90, 90, 0.2);
}

.hero-desc {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 16px;
    text-shadow: 0 1px 4px rgba(214, 90, 90, 0.15);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
}

.stat-label {
    font-size: 11px;
    opacity: 0.88;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.35);
}

/* ========== 搜索栏 ========== */
.search-bar {
    padding: 0 12px 8px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--color-border);
    overflow: hidden;
}

.search-icon {
    margin-left: 12px;
    color: var(--color-jiang);
    flex-shrink: 0;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 8px;
    font-size: 14px;
    background: transparent;
    color: var(--color-text);
}

.search-input-wrap input::placeholder {
    color: var(--color-text-muted);
}

.ai-search-btn {
    background: linear-gradient(135deg, #D65A5A, #EE8674);
    color: #FFFFFF;
    border: none;
    padding: 8px 14px;
    margin-right: 6px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(214, 90, 90, 0.25);
}

.ai-search-btn:active {
    transform: scale(0.95);
}

/* ========== 分类栏 ========== */
.category-bar {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    flex-shrink: 0;
    padding: 7px 16px;
    border: 1.5px solid var(--color-border);
    background: var(--color-bg-card);
    color: var(--color-text-light);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-btn.active {
    background: linear-gradient(135deg, #D65A5A, #EE8674);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(214, 90, 90, 0.3);
}

/* ========== 定位栏 ========== */
.location-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px 8px;
    color: var(--color-text-muted);
    font-size: 12px;
}

.location-bar svg {
    color: var(--color-shiliu);
}

/* ========== 物品网格 ========== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 8px 12px;
}

.item-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border: 1px solid var(--color-border);
}

.item-card:active {
    transform: scale(0.97);
}

.item-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: linear-gradient(135deg, var(--color-bg-warm), var(--color-border));
    display: block;
}

.item-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg-warm), var(--color-border));
    font-size: 40px;
}

.item-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(4px);
}

.status-onsale { background: rgba(106, 154, 90, 0.9); }
.status-reserved { background: rgba(216, 160, 80, 0.9); }
.status-sold { background: rgba(138, 96, 96, 0.9); }

.item-category-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    background: linear-gradient(135deg, #EE8674, #D65A5A);
    color: #FFFFFF;
    backdrop-filter: blur(4px);
    letter-spacing: 1px;
}

.item-info {
    padding: 10px 12px;
}

.item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-size: 16px;
    font-weight: 700;
    color: #D65A5A;
}

.item-price::before {
    content: '¥';
    font-size: 12px;
}

.item-location {
    font-size: 11px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* ========== 视图头部 ========== */
.view-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--color-border);
}

.back-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-jiang);
    cursor: pointer;
    padding: 4px 8px;
}

.view-header h2 {
    font-size: 18px;
    font-weight: 600;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
    letter-spacing: 1px;
}

/* ========== 发布表单 ========== */
.publish-form {
    padding: 16px;
}

.form-section {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-label::before {
    content: '❀';
    color: var(--color-shiliu);
    font-size: 11px;
    margin-right: 6px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--color-bg-card);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--color-jiang);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ========== 上传区域 ========== */
.upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
    cursor: pointer;
    background: var(--color-bg-card);
}

.upload-area:active {
    border-color: var(--color-jiang);
}

.upload-placeholder {
    padding: 36px 20px;
    text-align: center;
    color: var(--color-text-muted);
}

.upload-placeholder svg {
    color: var(--color-jiang);
    opacity: 0.6;
    margin-bottom: 12px;
}

.upload-placeholder p {
    font-size: 15px;
    color: var(--color-text-light);
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 12px;
    color: var(--color-text-muted);
}

.upload-preview {
    position: relative;
}

.upload-preview img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    background: var(--color-bg-warm);
    display: block;
}

.reupload-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(214, 90, 90, 0.75);
    color: #FFFFFF;
    border: none;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
}

/* ========== AI识别 ========== */
.ai-recognizing {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(214, 90, 90, 0.06), rgba(238, 134, 116, 0.06));
    border-radius: var(--radius-sm);
    color: var(--color-jiang);
    border: 1px solid rgba(214, 90, 90, 0.12);
}

.recognizing-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(214, 90, 90, 0.2);
    border-top-color: var(--color-jiang);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ai-result {
    padding: 14px;
    background: linear-gradient(135deg, rgba(214, 90, 90, 0.06), rgba(238, 134, 116, 0.06));
    border-radius: var(--radius-sm);
    border: 1px solid rgba(214, 90, 90, 0.12);
}

.ai-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.ai-category {
    font-weight: 700;
    color: #FFFFFF;
    background: linear-gradient(135deg, #D65A5A, #EE8674);
    padding: 2px 10px;
    border-radius: 12px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-jiang);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
    font-weight: 600;
}

/* ========== 按钮 ========== */
.btn-primary {
    background: linear-gradient(135deg, #D65A5A, #EE8674, #E87878);
    color: #FFFFFF;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(214, 90, 90, 0.3);
    letter-spacing: 1px;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

.btn-secondary {
    background: var(--color-bg-card);
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
}

/* ========== 底部导航 ========== */
.app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: var(--color-bg-card);
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 12px rgba(214, 90, 90, 0.10);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--color-border);
}

.app-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-liujin), rgba(255,255,255,0.5), var(--color-liujin), transparent);
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 8px 16px;
    font-size: 11px;
    transition: color 0.2s;
}

.nav-btn.active {
    color: var(--color-jiang);
}

.nav-publish {
    position: relative;
}

.nav-publish svg {
    background: linear-gradient(135deg, #D65A5A, #EE8674);
    color: #FFFFFF;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 14px rgba(214, 90, 90, 0.35);
    margin-bottom: 2px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

/* ========== 我的发布 ========== */
.status-tabs {
    display: flex;
    background: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
}

.status-tab {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.status-tab.active {
    color: var(--color-jiang);
    border-bottom-color: var(--color-jiang);
    font-weight: 600;
}

.items-list {
    padding: 12px;
}

.list-item {
    display: flex;
    gap: 12px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.list-item-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--color-bg-warm), var(--color-border));
}

.list-item-img-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg-warm), var(--color-border));
    font-size: 32px;
    flex-shrink: 0;
}

.list-item-info {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-item-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.list-item-price {
    color: #D65A5A;
    font-weight: 700;
    font-size: 15px;
}

.list-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.action-btn {
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    color: var(--color-text-light);
    cursor: pointer;
}

.action-btn.primary {
    background: linear-gradient(135deg, #D65A5A, #EE8674);
    color: #FFFFFF;
    border-color: transparent;
}

/* ========== 详情页 ========== */
.detail-content {
    padding: 16px;
}

.detail-img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    background: var(--color-bg-warm);
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
}

.detail-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg-warm), var(--color-border));
    border-radius: var(--radius-lg);
    font-size: 80px;
    margin-bottom: 16px;
}

.detail-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
    letter-spacing: 1px;
}

.detail-price {
    font-size: 28px;
    font-weight: 700;
    color: #D65A5A;
    margin-bottom: 16px;
}

.detail-price::before {
    content: '¥';
    font-size: 18px;
}

.detail-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.detail-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    background: rgba(214, 90, 90, 0.1);
    color: var(--color-jiang);
    border: 1px solid rgba(214, 90, 90, 0.15);
}

.detail-section {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.detail-section h4 {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.detail-section h4::before {
    content: '❀';
    color: var(--color-shiliu);
    margin-right: 6px;
    font-size: 10px;
}

.detail-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text);
}

.detail-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* ========== AI检索结果 ========== */
.ai-search-info {
    margin: 12px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(214, 90, 90, 0.06), rgba(238, 134, 116, 0.06));
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-jiang);
}

.ai-search-info p {
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.ai-search-info strong {
    color: var(--color-jiang);
}

/* ========== 模态框 ========== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(184, 72, 72, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
    border: 1px solid var(--color-border);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, #D65A5A, #EE8674, #E87878);
    color: #FFFFFF;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 {
    font-size: 17px;
    letter-spacing: 1px;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle, #EE8674, #D65A5A);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 10px rgba(214, 90, 90, 0.3);
}

.user-name {
    font-size: 16px;
    font-weight: 600;
}

.user-school {
    font-size: 12px;
    color: var(--color-text-muted);
}

.user-stats {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.user-stat {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.user-stat-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-jiang);
}

.user-stat-label {
    font-size: 11px;
    color: var(--color-text-muted);
}

.cloud-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.cloud-section h4 {
    font-size: 14px;
    color: var(--color-jiang);
    margin-bottom: 10px;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
}

.cloud-status {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    padding: 6px 12px;
    background: var(--color-bg);
    border-radius: 8px;
    text-align: center;
}

.cloud-status.active {
    color: var(--color-success);
    background: rgba(106, 154, 90, 0.1);
}

.cloud-form {
    margin-bottom: 8px;
}

.cloud-tip {
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 8px;
}

.about-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.about-section h4 {
    font-size: 14px;
    color: var(--color-jiang);
    margin-bottom: 8px;
    font-family: "STKaiti", "KaiTi", "楷体", serif;
}

.about-section p {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.version {
    margin-top: 8px !important;
    color: var(--color-liujin) !important;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #D65A5A, #EE8674);
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    max-width: 80%;
    text-align: center;
    box-shadow: 0 4px 16px rgba(214, 90, 90, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 响应式 ========== */
@media (min-width: 600px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .app-main {
        max-width: 900px;
        margin: 0 auto;
        width: 100%;
    }
    .app-nav {
        max-width: 900px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

.app-main::-webkit-scrollbar {
    width: 4px;
}

.app-main::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}