/* 样式版本：v2.3 - 2025-12-26 - 修复页面全屏问题 */

/* Icon 样式优化 */
.ri {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* 隐藏滚动条但保持滚动功能 */
*::-webkit-scrollbar {
    display: none;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    overflow: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
    background: #f5f5f5;
    padding: 20px;
    min-height: 100vh;
}
.container { max-width: 1600px; margin: 0 auto; }
.header {
    background: #667eea;
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.header h1 { font-size: 32px; margin-bottom: 10px; }
.header p { font-size: 16px; opacity: 0.9; }

.phone-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}
.phone-frame {
    width: 375px;
    background: white;
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 15px;
}

.phone-notch {
    width: 150px;
    height: 25px;
    background: black;
    border-radius: 0 0 15px 15px;
    margin: 0 auto 10px;
}
.phone-screen {
    width: 100%;
    height: 750px;
    background: white;
    border-radius: 25px;
    overflow: hidden !important;
    display: block !important;
    position: relative !important;
    isolation: isolate;
    contain: layout style paint;
}

.top-bar {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-bottom: 1px solid #eee;
    min-height: 50px;
}
.back-btn {
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 20px;
    color: #333;
}
.page-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}
.top-action {
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 18px;
    color: #667eea;
}

.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    padding-bottom: 20px;
    background: #f5f5f5;
    -webkit-overflow-scrolling: touch;
}

/* 首页聊天区域需要更大的底部间距，避免输入框遮挡 */
#chatHistory {
    padding-bottom: 130px;
}

.page { 
    display: none;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
.page.active { 
    display: flex !important;
    flex-direction: column;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
}

.banner {
    width: 100%;
    height: 140px;
    background: #667eea;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}
.banner h2 { font-size: 22px; margin-bottom: 8px; position: relative; z-index: 1; }
.banner p { font-size: 14px; opacity: 0.9; position: relative; z-index: 1; }
.banner::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.stat-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}
.stat-label {
    font-size: 12px;
    color: #999;
}

.menu-list {
    background: white;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 15px;
}
.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: #f5f5f5; }

.menu-icon {
    width: 36px;
    height: 36px;
    background: #667eea;
    border-radius: 8px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}
.menu-text { flex: 1; }
.menu-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 3px;
}
.menu-desc {
    font-size: 12px;
    color: #999;
}
.menu-arrow {
    color: #ccc;
    font-size: 18px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ff6b6b;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 5px;
}

.list-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #f8f8f8; }

.item-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    flex-shrink: 0;
}
.item-content { flex: 1; }
.item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}
.item-meta {
    font-size: 12px;
    color: #999;
}
.item-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    background: white;
    border-top: 1px solid #eee;
}
.bottom-nav-item {
    text-align: center;
    cursor: pointer;
    flex: 1;
}
.bottom-nav-item .icon {
    width: 24px;
    height: 24px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 auto 5px;
}
.bottom-nav-item.active .icon { background: #667eea; }
.bottom-nav-item .text {
    font-size: 11px;
    color: #666;
}
.bottom-nav-item.active .text { color: #667eea; }

.btn {
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

/* 隐藏横向滚动条 */
.content ::-webkit-scrollbar {
    display: none;
}
.content * {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.tag {
    padding: 6px 12px;
    background: #f0f2ff;
    color: #667eea;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
}
.tag.active {
    background: #667eea;
    color: white;
}

/* Tab样式 */
.tab-nav {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.tab-nav-item {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.tab-nav-item.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}
.tab-content-item {
    display: none;
}
.tab-content-item.active {
    display: block;
}

.form-group { margin-bottom: 15px; }
.form-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}
.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.service-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.service-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.publish-type-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.publish-type-card:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.publish-type-card .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.publish-type-card .title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.quick-access {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.quick-btn {
    flex: 1;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-btn:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.quick-btn .icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.quick-btn .text {
    font-size: 12px;
    color: #666;
}

/* 对话气泡样式 */
.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f5f5f5;
}

.message {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.message.user .avatar {
    background: #4caf50;
}

.message .bubble {
    max-width: 70%;
    padding: 12px 15px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 14px;
    line-height: 1.6;
}

.message.user .bubble {
    background: #667eea;
    color: white;
}

.message .bubble.voice {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message .bubble.voice .voice-icon {
    font-size: 24px;
    animation: pulse 1.5s infinite;
}

.service-card-preview {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.service-card-preview .title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.service-card-preview .info-row {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.service-card-preview .label {
    font-weight: 500;
    color: #999;
    min-width: 60px;
}

.service-card-preview .publish-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 15px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}
