:root {
    --theme-primary: #ff6699;
    --theme-light: #ff99cc;
    --theme-lighter: #ffcce6;
    --theme-bg: rgba(255, 153, 204, 0.05);
    --theme-shadow: rgba(255, 153, 204, 0.35);
    --theme-card-border: rgba(255, 153, 204, 0.2);
    --theme-card-shadow: rgba(255, 153, 204, 0.25);
    --theme-header-border: rgba(255, 153, 204, 0.15);
    --theme-container-border: #ffcce6;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f6f6f6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    overflow-x: hidden;
}

.content-container {
    max-width: 800px;
    width: 90%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    padding: 40px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--theme-container-border);
    text-align: center;
    position: relative;
    z-index: 1;
}

/* 头像区域 */
.avatar-wrap {
    margin-bottom: 25px;
}

.avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid var(--theme-light);
    box-shadow: 0 4px 12px var(--theme-shadow);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05) rotate(3deg);
}

/* 标题区域 */
.site-title {
    margin-bottom: 20px;
}

.site-title h1 {
    font-size: 2em;
    color: var(--theme-primary);
    margin: 0;
    font-weight: 600;
}

.site-title p {
    color: #999;
    font-size: 0.95em;
    margin-top: 8px;
}

/* 一言区域 */
.YYan-box {
    width: 100%;
    max-width: 600px;
    margin: 15px 0 25px;
}

.YYan-content {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    font-size: 1.1em;
    line-height: 1.8;
    color: #666;
}

.YYan-from {
    display: block;
    margin-top: 8px;
    font-size: 0.85em;
    color: #999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease 0.3s;
}

/* LayUI 卡片增强样式 */
.site-card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--theme-card-border);
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--theme-card-shadow);
}

.site-card .layui-card-header {
    font-size: 1.15em;
    color: var(--theme-primary);
    font-weight: 600;
    border-bottom: 1px solid var(--theme-header-border);
}

.site-card .layui-card-header i {
    margin-right: 8px;
    color: var(--theme-primary);
}

.site-card .layui-card-body p {
    color: #888;
    font-size: 0.95em;
    margin: 0;
}

/* 页脚 — 一体化 */
.footer {
    margin-top: 25px;
    padding-top: 20px;
    font-size: 0.85em;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    width: 100%;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 6px;
    padding: 0 20px;
}

.footer-copyright {
    color: var(--theme-primary);
}

.footer-sep {
    color: rgba(0, 0, 0, 0.2);
    font-size: 0.85em;
}

.footer-beian-link {
    color: var(--theme-primary) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-beian-link:hover {
    color: var(--theme-light) !important;
}

.footer-police {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 768px) {
    .footer { font-size: 0.78em; }
}
@media (max-width: 480px) {
    .footer { font-size: 0.72em; }
}

/* LayUI 按钮主题覆盖 */
.layui-btn-theme {
    background-color: var(--theme-light) !important;
    border-color: var(--theme-light) !important;
}

.layui-btn-theme:hover {
    background-color: var(--theme-primary) !important;
}

.layui-btn-theme.layui-btn-primary {
    color: var(--theme-primary) !important;
    border: 1px solid var(--theme-light) !important;
    background-color: rgba(255, 255, 255, 0.7) !important;
}

.layui-btn-theme.layui-btn-primary:hover {
    color: #fff !important;
    background-color: var(--theme-light) !important;
}

/* LayUI 引用区块 */
.layui-elem-quote {
    border-left: 5px solid var(--theme-light) !important;
}

/* LayUI 面包屑 */
.layui-breadcrumb a:hover {
    color: var(--theme-primary) !important;
}

/* 分割线 */
.layui-bg-theme {
    background-color: var(--theme-light) !important;
}

/* 主题色标签 */
.theme-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75em;
    color: #fff;
    background-color: var(--theme-light);
    margin-top: 6px;
}

/* 更换主题色按钮 */
.theme-change-btn {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75em;
    color: var(--theme-primary);
    background-color: rgba(255,255,255,0.7);
    border: 1px solid var(--theme-light);
    cursor: pointer;
    margin-top: 6px;
    margin-left: 6px;
    transition: all 0.3s ease;
}

.theme-change-btn:hover {
    color: #fff;
    background-color: var(--theme-light);
}

/* AI对话面板 */
.ai-chat-panel {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    z-index: 99999;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--theme-lighter);
}

.ai-chat-panel.active {
    display: flex;
}

.ai-chat-header {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-light));
    color: #fff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1em;
}

.ai-chat-header .close-btn {
    cursor: pointer;
    font-size: 1.2em;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.ai-chat-header .close-btn:hover {
    opacity: 1;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f9f9f9;
}

.ai-chat-messages .msg {
    margin-bottom: 12px;
    display: flex;
}

.ai-chat-messages .msg.bot {
    justify-content: flex-start;
}

.ai-chat-messages .msg.user {
    justify-content: flex-end;
}

.ai-chat-messages .msg .bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9em;
    line-height: 1.6;
    word-break: break-word;
}

.ai-chat-messages .msg.bot .bubble {
    background: #fff;
    color: #333;
    border: 1px solid #eee;
    border-top-left-radius: 4px;
}

.ai-chat-messages .msg.user .bubble {
    background: var(--theme-light);
    color: #fff;
    border-top-right-radius: 4px;
}

.ai-chat-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid #eee;
    background: #fff;
}

.ai-chat-input input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9em;
    outline: none;
    transition: border-color 0.3s;
}

.ai-chat-input input:focus {
    border-color: var(--theme-light);
}

.ai-chat-input button {
    margin-left: 8px;
    border: none;
    background: var(--theme-light);
    color: #fff;
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.ai-chat-input button:hover {
    background: var(--theme-primary);
}

/* 全屏圆形加载动画 */
.page-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.page-loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--theme-lighter);
    border-top: 4px solid var(--theme-primary);
    border-radius: 50%;
    animation: loadingSpin 0.8s linear infinite;
}

@keyframes loadingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 16px;
    color: var(--theme-primary);
    font-size: 0.95em;
    font-weight: 500;
}

/* 龙虾特色卡片图标 */
.lobster-icon {
    font-size: 1.2em;
    margin-right: 4px;
}

/* ====== 手机端适配 ====== */
@media (max-width: 768px) {
    body {
        justify-content: flex-start;
        padding-top: 10px;
    }

    .content-container {
        padding: 30px 20px;
        width: 92%;
        margin: 10px auto;
        border-radius: 12px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .site-title h1 {
        font-size: 1.5em;
    }

    .YYan-content {
        font-size: 1em;
        line-height: 1.7;
    }

    .layui-row.layui-col-space15 {
        margin: 10px 0 !important;
    }

    .site-card {
        margin-bottom: 10px;
    }

    .site-card .layui-card-header {
        font-size: 1em;
        padding: 10px 15px;
    }

    .site-card .layui-card-body {
        padding: 10px 15px;
    }

    .site-card .layui-card-body p {
        font-size: 0.85em;
    }

    .footer {
        margin-top: 20px;
        padding: 10px;
        font-size: 0.78em;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 5px;
    }

    .content-container {
        padding: 25px 15px;
        width: 95%;
        margin: 5px auto;
        border-radius: 10px;
    }

    .avatar-wrap {
        margin-bottom: 15px;
    }

    .avatar {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .site-title {
        margin-bottom: 12px;
    }

    .site-title h1 {
        font-size: 1.3em;
    }

    .site-title p {
        font-size: 0.85em;
    }

    .YYan-box {
        margin: 10px 0 15px;
    }

    .YYan-content {
        font-size: 0.9em;
        line-height: 1.6;
    }

    .YYan-from {
        font-size: 0.8em;
    }

    .layui-elem-quote {
        padding: 8px 12px !important;
    }

    .layui-row.layui-col-space15 > .layui-col-xs12 {
        margin-bottom: 8px;
    }

    .site-card .layui-card-header {
        font-size: 0.95em;
        padding: 8px 12px;
    }

    .site-card .layui-card-body {
        padding: 8px 12px;
    }

    .site-card .layui-card-body p {
        font-size: 0.8em;
    }

    .layui-breadcrumb {
        font-size: 0.85em !important;
    }

    .footer {
        margin-top: 15px;
        padding: 8px;
        font-size: 0.72em;
        line-height: 1.8;
    }

    .footer img {
        width: 14px !important;
        height: 14px !important;
    }
}
