/* 重置样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* 基础样式 */
html { background: #f5f5f5; }
body { 
    max-width: 640px; 
    margin: 0 auto; 
    font-family: "Microsoft YaHei", sans-serif; 
    font-size: 14px; 
    background: #EEEEEE;
    line-height: 1.5;
}

/* 清除浮动 */
.clear { clear: both; }

/* 页面头部 */
.page-header {
    width: 100%;
}

/* 主内容区域 */
.main-content {
    padding: 20px 10px 80px 10px;
    min-height: calc(100vh - 200px);
}

/* 聊天区域 */
.chat-section {
    margin-bottom: 20px;
}

.chat-container {
    min-height: 300px;
    padding: 10px;
}

.chat-line {
    margin: 10px 0;
    animation: fadeIn 0.5s ease;
}

/* 消息样式 */
.message-left {
    float: left;
    max-width: 80%;
    margin: 10px 0;
}

.message-left .avatar {
    float: left;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
}

.message-left .content {
    position: relative;
    margin-left: 55px;
    padding: 12px;
    background: #FFF;
    color: #323232;
    border-radius: 8px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message-left .content::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-right: 8px solid #FFF;
    border-bottom: 6px solid transparent;
}

.message-right {
    float: right;
    max-width: 80%;
    margin: 10px 0;
}

.message-right .avatar {
    float: right;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    border-radius: 50%;
}

.message-right .content {
    position: relative;
    margin-right: 55px;
    padding: 12px;
    background: #A0E75A;
    color: #333;
    border-radius: 8px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message-right .content::before {
    content: '';
    position: absolute;
    top: 15px;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-left: 8px solid #A0E75A;
    border-bottom: 6px solid transparent;
}

/* 选项区域 */
.selection-options {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.selection-options.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.option-title {
    text-align: center;
    color: #333;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.option-btn {
    flex: 0 0 calc(50% - 5px);
    padding: 12px 8px;
    background: #fd8c27;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.option-btn:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.option-btn.special {
    flex: 0 0 100%;
    background: #0365d0;
}

.option-btn.special:hover {
    background: #0254b3;
}

/* 加载动画 */
.loading {
    width: 150px;
    height: 10px;
    margin: 20px auto;
}

.loading span {
    display: inline-block;
    width: 10px;
    height: 100%;
    margin-right: 5px;
    border-radius: 50%;
    background: #302825;
    animation: load 1.04s ease infinite;
}

.loading span:last-child {
    margin-right: 0;
}

.loading span:nth-child(1) { animation-delay: 0.13s; }
.loading span:nth-child(2) { animation-delay: 0.26s; }
.loading span:nth-child(3) { animation-delay: 0.39s; }
.loading span:nth-child(4) { animation-delay: 0.52s; }
.loading span:nth-child(5) { animation-delay: 0.65s; }

@keyframes load {
    0% { opacity: 1; transform: scale(1.3); }
    100% { opacity: 0.2; transform: scale(0.3); }
}

/* 底部添加好友区域 */
.add-friend-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #eeeeee;
    padding: 15px;
    max-width: 640px;
    margin: 0 auto;
}

.add-friend-footer.active {
    display: block;
    animation: slideUp 0.5s ease;
}

.add-friend-btn-container {
    text-align: center;
}

.add-friend-btn {
    display: inline-block;
    padding: 15px 30px;
    background: #ffff00;
    color: #ff0000;
    border: 8px solid #006600;
    border-radius: 8px;
    font-size: 21px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.add-friend-btn:hover {
    background: #ffeb3b;
    transform: scale(1.05);
}

/* 版权信息 */
.copyright {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 12px;
}

/* 动画效果 */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideUp {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}

/* 翡翠图片样式 */
.jewelry-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.jewelry-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #fd8c27;
    transition: all 0.3s ease;
    cursor: pointer;
}

.jewelry-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 图片放大模态框 */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.image-modal {
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.image-modal img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.image-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    gap: 20px;
}

.nav-btn {
    background: #fd8c27;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #e67e22;
}

.image-counter {
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

/* 工具类 */
.hidden { display: none; }
.visible { display: block; }
.text-center { text-align: center; }
.text-red { color: #ff0000; }
.text-orange { color: #ff6600; }
.text-bold { font-weight: bold; }