/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #1a1a2e;
}

/* 基础容器 */
.landing-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 0 20px;
}



/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-chat {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.breadcrumb-chat .breadcrumb-item {
    color: #666;
}

.breadcrumb-chat .breadcrumb-item:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.breadcrumb-chat .breadcrumb-item.active {
    color: #333;
}

.breadcrumb-chat .breadcrumb-separator {
    color: #999;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a9b1d6;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 6px 10px;
    border-radius: 6px;
}

.breadcrumb-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.breadcrumb-item.active {
    color: #fff;
    font-weight: 600;
    pointer-events: none;
}

.breadcrumb-item.disabled {
    color: #4a4a6a;
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.breadcrumb-item.disabled:hover {
    background: transparent;
    color: #4a4a6a;
}

.breadcrumb-icon {
    font-size: 16px;
}

.breadcrumb-separator {
    color: #a9b1d6;
    font-size: 16px;
    font-weight: 300;
}

a.breadcrumb-item {
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    max-width: 800px;
    margin: 100px auto 150px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #fff;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 40px;
    color: #a9b1d6;
}

.start-btn {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(233, 69, 96, 0.3);
}

/* 特性区域 */
.features {
    max-width: 1200px;
    margin: 0 auto 150px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(233, 69, 96, 0.5);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #e94560;
}

.feature-card p {
    color: #a9b1d6;
    font-size: 16px;
}

/*  testimonials */
.testimonials {
    max-width: 1200px;
    margin: 0 auto 100px;
    text-align: center;
}

.testimonials h2 {
    font-size: 36px;
    margin-bottom: 50px;
    color: #fff;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-card p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #a9b1d6;
    font-style: italic;
}

.testimonial-card .author {
    font-size: 14px;
    color: #e94560;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .testimonials h2 {
        font-size: 28px;
    }
}

/* 角色画廊页面 */
.character-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 20px;
}

.character-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.character-header.scrolled {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
}

.character-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.character-header .logo {
    font-size: 18px;
    font-weight: 600;
    color: #e94560;
    flex-shrink: 0;
    margin-right: auto;
}

.character-header .nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.character-header .nav-item {
    display: flex;
    align-items: center;
    color: #a9b1d6;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 400;
}

.character-header .nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.character-header .nav-item.active {
    color: #fff;
    background: rgba(233, 69, 96, 0.2);
    font-weight: 500;
}

.info-header {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 30px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.character-title {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.character-title h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #fff;
}

.character-title p {
    font-size: 16px;
    color: #a9b1d6;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    text-align: center;
}

.search-box {
    width: 60%;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
}

.search-box::placeholder {
    color: #a9b1d6;
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    text-align: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #a9b1d6;
    padding: 8px 16px;
    border-radius: 20px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

.character-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0 20px;
}

/* 平板设备：一行3个 */
@media (max-width: 1200px) {
    .character-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* 小平板/大手机：一行2个 */
@media (max-width: 768px) {
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 12px;
    }
}

/* 手机：一行2个，更紧凑 */
@media (max-width: 480px) {
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }
}

.character-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(233, 69, 96, 0.5);
}

.character-image {
    width: 100%;
    aspect-ratio: 3/4;
    height: auto;
    object-fit: cover;
    flex-shrink: 0;
}

.character-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.character-tags {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 8px;
    gap: 4px;
}

.character-tag {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    white-space: nowrap;
}

.character-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #fff;
}

.character-description {
    font-size: 12px;
    color: #a9b1d6;
    margin-bottom: 12px;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.create-btn {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
}

.create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

/* 平板设备卡片样式 */
@media (max-width: 1200px) {
    .character-info {
        padding: 12px;
    }
    .character-name {
        font-size: 15px;
    }
    .character-description {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
    .character-tag {
        font-size: 9px;
        padding: 2px 6px;
    }
    .create-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* 手机设备卡片样式 */
@media (max-width: 768px) {
    .character-info {
        padding: 10px;
    }
    .character-name {
        font-size: 14px;
        margin-bottom: 4px;
    }
    .character-description {
        font-size: 10px;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }
    .character-tags {
        margin-bottom: 6px;
    }
    .character-tag {
        font-size: 9px;
        padding: 2px 6px;
    }
    .create-btn {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 16px;
    }
    .character-card {
        border-radius: 12px;
    }
}

/* 小手机设备 */
@media (max-width: 480px) {
    .character-info {
        padding: 8px;
    }
    .character-name {
        font-size: 13px;
    }
    .character-description {
        font-size: 10px;
        -webkit-line-clamp: 2;
    }
    .character-tag {
        font-size: 8px;
        padding: 1px 5px;
    }
    .create-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
}

/* 基础信息填写页面 */
.info-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-form h2 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    color: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #a9b1d6;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
}

.form-group input::placeholder {
    color: #a9b1d6;
}

.submit-btn {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    padding: 15px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

/* 聊天页面 */
.chat-container {
    height: 100vh;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.ai-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e94560;
    flex-shrink: 0;
}

.chat-header-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.chat-header h1 {
    font-size: 20px;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.typing-indicator {
    font-size: 12px;
    color: #e94560;
    font-weight: 500;
    margin-top: 4px;
    min-height: 18px;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
}

.typing-indicator .typing-dots {
    display: inline-block;
    width: 20px;
    text-align: left;
}

.typing-indicator .typing-dots span {
    animation: typing-dot 1.4s infinite;
    opacity: 0;
}

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

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

@keyframes typing-dot {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.subscription-bar {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    position: sticky;
    top: auto;
    z-index: 99;
    flex-shrink: 0;
}

.subscription-bar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.subscription-bar a:hover {
    background: rgba(255, 255, 255, 0.3);
}

.subscription-bar .upgrade-btn {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 6px 16px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.subscription-bar .upgrade-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 移动端订阅横幅优化 */
@media (max-width: 768px) {
    .subscription-bar {
        padding: 8px 12px;
        font-size: 0;
        text-align: center;
        background: transparent;
    }

    .subscription-bar .upgrade-btn {
        font-size: 12px;
        padding: 6px 14px;
        margin-left: 0;
        background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
        white-space: nowrap;
    }
}

.chat-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    max-width: 80%;
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.message-content {
    display: flex;
    flex-direction: column;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-name {
    font-weight: 600;
    font-size: 14px;
}

.user-message {
    flex-direction: row-reverse;
    align-self: flex-end;
    animation: slideInRight 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    padding: 12px 16px;
}


.user-message .message-header {
    justify-content: flex-end;
    text-align: right;
}
.user-message .message-name {
    color: #dc3545;
    text-align: right;
    width: 100%;
}

.ai-message {
    align-self: flex-start;
    animation: slideInLeft 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.ai-message .message-bubble {
    background: #fff;
    color: #333;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 12px 16px;
}

.ai-message .message-name {
    color: #333;
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
}

.ai-message .message-time {
    align-self: flex-start;
}

.user-message .message-time {
    align-self: flex-end;
}

.chat-input {
    background: #fff;
    padding: 20px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
}

.send-btn {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

/* 订阅页面 */
.subscription-container {
    min-height: 100vh;
    background: #f5f5f5;
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.subscription-content {
    display: flex;
    max-width: 700px;
    width: 100%;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.subscription-plan {
    flex: 1;
    padding: 35px;
    text-align: center;
}

.subscription-plan h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.4;
}

.plan-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid #e94560;
}

.plan-price {
    font-size: 30px;
    font-weight: bold;
    color: #e94560;
    margin-bottom: 15px;
}

.plan-features {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 25px;
    padding: 0;
}

.plan-features li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    color: #666;
    font-size: 15px;
}

.plan-features li:before {
    content: "✓";
    color: #e94560;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.plan-options {
    margin-bottom: 30px;
}

.plan-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-option:hover {
    background: #e9ecef;
}

.plan-option.active {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
}

.plan-option input {
    margin-right: 10px;
}

.continue-btn {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

.chat-preview {
    flex: 1;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.chat-preview h3 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 20px;
}

.chat-preview-device {
    width: 300px;
    height: 600px;
    background: #333;
    border-radius: 30px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.chat-preview-header {
    background: #222;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    color: #fff;
    font-size: 14px;
    text-align: center;
}

.chat-preview-messages {
    flex: 1;
    background: #1a1a1a;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-preview-message {
    max-width: 70%;
    padding: 10px;
    border-radius: 15px;
}

.chat-preview-user {
    align-self: flex-end;
    background: #e94560;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-preview-ai {
    align-self: flex-start;
    background: #333;
    color: #fff;
    border-bottom-left-radius: 4px;
}

.chat-preview-input {
    background: #222;
    padding: 10px;
    border-radius: 0 0 10px 10px;
    display: flex;
    gap: 10px;
}

.chat-preview-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: 20px;
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
}

.chat-preview-input button {
    background: #e94560;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* 订阅弹窗样式 */
.subscription-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.subscription-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.subscription-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.subscription-modal-overlay.active .subscription-modal {
    transform: scale(1);
}

/* 左右分栏容器 */
.subscription-two-col {
    display: flex;
    min-height: 500px;
}

/* 左侧 - 价值主张区域 */
.subscription-left {
    flex: 0 0 42%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    color: white;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.subscription-left h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.3;
    background: linear-gradient(135deg, #fff 0%, #e94560 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-features-left {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features-left li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.check-icon {
    color: #e94560;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 16px;
}

/* 右侧 - 购买选项区域 */
.subscription-right {
    flex: 1;
    background: #f8f9fa;
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plan-price-display {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-options-modern {
    margin-bottom: 25px;
}

.plan-option-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-option-card:hover {
    border-color: #e94560;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.15);
}

.plan-option-card.active {
    border-color: #e94560;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.05) 0%, rgba(157, 78, 221, 0.05) 100%);
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.2);
}

.plan-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.plan-option-card label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
}

.plan-option-card .plan-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a2e;
}

.plan-option-card .plan-price {
    font-weight: 700;
    font-size: 18px;
    color: #e94560;
}

.continue-btn-modern {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.continue-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
}

/* 响应式设计 - 移动端回退到垂直布局 */
@media (max-width: 768px) {
    .subscription-modal {
        max-width: 95%;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .subscription-two-col {
        flex-direction: column;
        min-height: auto;
    }
    
    .subscription-left {
        flex: none;
        padding: 25px 20px;
    }
    
    .subscription-left h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .plan-features-left li {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .subscription-right {
        flex: none;
        padding: 25px 20px;
    }
    
    .plan-price-display {
        font-size: 28px;
        margin-bottom: 20px;
    }
}

.subscription-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
    transition: all 0.2s ease;
}

.subscription-modal-close:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.email-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.email-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.email-modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.email-modal-overlay.active .email-modal {
    transform: scale(1);
}

.email-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    z-index: 10;
}

.email-modal-close:hover {
    background: #e94560;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.email-modal h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

.email-modal p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.email-input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.email-input-container input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.email-input-container input:focus {
    outline: none;
    border-color: #e94560;
}

.email-submit-btn {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 100%;
}

.email-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

.email-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.email-success-message {
    color: #28a745;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
}

/* 成功提示弹窗 */
.success-toast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.success-toast-overlay.active {
    opacity: 1;
    visibility: visible;
}

.success-toast {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    pointer-events: auto;
    max-width: 400px;
    width: 90%;
}

.success-toast-overlay.active .success-toast {
    transform: scale(1);
}

.success-toast-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-toast-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.success-toast h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.success-toast p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.success-toast-close {
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.success-toast-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

/* 聊天应用容器 */
.chat-app-container {
    display: flex;
    height: 100vh;
    background: #1a1a2e;
}

/* 侧边栏 */
.chat-sidebar {
    width: 280px;
    background: #16213e;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    color: #fff;
    font-size: 18px;
}

.session-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* 新建聊天按钮 */
.new-chat-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

/* 会话项 */
.session-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.session-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.session-item.active {
    background: rgba(233, 69, 96, 0.2);
    border: 1px solid rgba(233, 69, 96, 0.5);
}

.session-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
}

.session-info {
    flex: 1;
    overflow: hidden;
}

.session-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.session-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.unread-count {
    background: #e94560;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.session-preview {
    color: #a9b1d6;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 主聊天区域 */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: #333;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.mobile-menu-btn svg {
    width: 20px;
    height: 20px;
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .chat-app-container {
        flex-direction: column;
    }
    
    .chat-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        max-height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .chat-sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .subscription-content {
        flex-direction: column;
    }
    
    .chat-preview {
        padding: 20px;
    }
    
    .chat-preview-device {
        width: 250px;
        height: 500px;
    }
    
    .email-input-container {
        flex-direction: column;
    }
    
    .email-submit-btn {
        width: 100%;
    }
}

/* ==================== 角色卡弹窗 ==================== */
.character-card-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.character-card-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.character-card-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 360px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.character-card-modal-overlay.active .character-card-modal {
    transform: scale(1);
}

.character-card-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-card-modal-close:hover {
    background: #fff;
    transform: scale(1.1);
}

.character-card-content {
    padding: 0;
}

.character-card-image {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
}

.character-card-info {
    padding: 20px;
}

.character-card-name {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.character-card-role {
    font-size: 12px;
    color: #e94560;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.character-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.character-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.character-card-tag {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.character-card-btn {
    width: 100%;
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.character-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.3);
}

/* 头像点击效果 */
.ai-avatar,
.message-avatar {
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-avatar:hover,
.message-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

/* ==================== 用户信息弹窗 ==================== */
.userinfo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(22, 33, 62, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.userinfo-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.userinfo-modal {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 360px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.userinfo-modal-overlay.active .userinfo-modal {
    transform: scale(1);
}

.userinfo-modal h3 {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
}

.userinfo-input-group {
    margin-bottom: 24px;
}

.userinfo-input-group label {
    display: block;
    color: #a9b1d6;
    font-size: 14px;
    margin-bottom: 8px;
}

.userinfo-input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.userinfo-input-group input:focus {
    outline: none;
    border-color: #e94560;
    background: rgba(255, 255, 255, 0.08);
}

.userinfo-input-group input::placeholder {
    color: #6a6a8a;
}

.userinfo-continue-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e94560 0%, #9d4edd 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.userinfo-continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.3);
}

@media (max-width: 768px) {
    .userinfo-modal {
        padding: 24px;
        max-width: 320px;
    }
    
    .userinfo-modal h3 {
        font-size: 20px;
    }
}