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

/* 更现代的字体和暗色主题 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0a0a0a;
    color: #e6e6e6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    line-height: 1.6;
    font-weight: 400;
}

/* 字体层次系统 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

h5 {
    font-size: 1.1rem;
    font-weight: 500;
}

h6 {
    font-size: 1rem;
    font-weight: 500;
}

/* 文本层次 */
.text-large {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.7;
}

.text-medium {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
}

.text-small {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

.text-xsmall {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
}

/* 强调文本 */
.text-bold {
    font-weight: 700;
}

.text-semibold {
    font-weight: 600;
}

.text-light {
    font-weight: 300;
}

.text-italic {
    font-style: italic;
}

/* 漂浮粒子效果 */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: floatUp 15s linear infinite;
    opacity: 0.4;
}

.particle:nth-child(odd) {
    background: rgba(173, 216, 230, 0.8); /* 淡蓝色 */
    box-shadow: 0 0 6px rgba(173, 216, 230, 0.6);
}

.particle:nth-child(even) {
    background: rgba(255, 255, 255, 0.8); /* 淡白色 */
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(20px);
        opacity: 0;
    }
}

/* 容器 */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 60px;
    padding: 20px 0;
}

.main-title {
    font-size: 2.0rem;
    font-weight: 700;
    font-family: '黑体', 'SimHei', sans-serif;
    color: #ffffff;
    letter-spacing: 0;
    margin-bottom: 0;
    animation: fadeInDown 1s ease-out;
    line-height: 2.67rem;
    height: 2.67rem;
    display: flex;
    align-items: center;
    margin-left: 0.5em;
}

.sub-title {
    font-size: 1.5rem;
    color: #888;
    font-weight: 400;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
}

/* 标题容器 */
.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 12px;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.title-container:hover {
    transform: scale(1.1);
}

/* 标题图标 */
.title-icon {
    width: 2.67rem;
    height: 2.67rem;
    object-fit: contain;
}

/* 英文副标题 */
.english-subtitle {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 300;
    font-style: italic;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    line-height: 1.4;
    width: 100%;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

/* 格言文字 */
.motto {
    font-size: 0.9rem;
    color: #888888;
    font-weight: 400;
    font-style: italic;
    text-align: center;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    animation: fadeInUp 1.2s ease-out;
}

.slogan {
    font-size: 1.2rem;
    color: #6a11cb;
    font-weight: 500;
    animation: fadeInUp 1.2s ease-out;
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    flex: 1;
    margin-bottom: 60px;
}

/* 音频播放器样式 */
.audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding: 8px 12px;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: none;
    width: 50%;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-btn {
    background: transparent;
    border: none;
    color: #6a11cb;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: #FFD700;
    color: #000000;
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: #333333;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #FFD700;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #FFD700;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* 左侧聊天区域 */
.chat-section {
    background: #121212;
    border: 1px solid #222;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: 70vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    border-radius: 10px 10px 0 0;
    margin-bottom: 20px;
    color: white;
}

.chat-header h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

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

.chat-input-container {
    padding: 20px;
    border-top: 1px solid #222;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
}

#chatInput {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px;
    color: #e6e6e6;
    font-size: 1rem;
    resize: none;
    transition: all 0.3s ease;
}

#chatInput:focus {
    outline: none;
    border-color: #6a11cb;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.3);
}

.send-btn {
    width: 100%;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.4);
}

/* 右侧工具区域 */
.tools-section {
    background: #121212;
    border: 1px solid #222;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    height: 70vh;
    overflow-y: auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding-right: 10px;
}

/* 工具卡片样式 */
.tool-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: #6a11cb;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.tool-card.selected {
    border: 2px solid #6a11cb !important;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(106, 17, 203, 0.3);
    z-index: 10;
    position: relative;
}

.tool-card h4 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.tool-desc {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* 底部样式 */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid #222;
    margin-top: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: center;
}

.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: scale(1.1);
}

.social-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.8);
    transition: all 0.3s ease;
}

.social-link:hover .social-icon {
    filter: grayscale(0%) brightness(1);
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #121212;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.4s ease-out;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #222;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #333;
    color: #fff;
    transform: rotate(90deg);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6a11cb;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .chat-section {
        height: 60vh;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    .main-title {
        font-size: 1.8rem;
        line-height: 2.2rem;
        height: auto;
    }
    .sub-title {
        font-size: 1.2rem;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .audio-player {
        width: 100%;
    }
    .tools-section {
        height: auto;
    }
    .tool-card {
        padding: 18px;
    }
    .chat-header h3 {
        font-size: 1.2rem;
    }
    .title-icon {
        width: 2rem;
        height: 2rem;
    }
    .social-icon {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.6rem;
        line-height: 2rem;
        height: auto;
    }
    .chat-header {
        flex-direction: column;
        gap: 10px;
    }
    .chat-section {
        height: 55vh;
    }
    .chat-input-container {
        padding: 16px;
    }
    .send-btn {
        padding: 12px;
    }
    .tools-grid {
        gap: 16px;
    }
}

/* 消息样式 */
.message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.6;
    animation: popIn 0.3s ease;
}

.user-message {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #fff;
    align-self: flex-end;
    border-radius: 12px 12px 0 12px;
}

.ai-message {
    background: #1a1a1a;
    border: 1px solid #333;
    align-self: flex-start;
    border-radius: 12px 12px 12px 0;
}

/* 表单元素样式 */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    color: #aaa;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 15px;
    color: #e6e6e6;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #6a11cb;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.3);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.4);
}

.copy-btn {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    color: #aaa;
    padding: 10px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.copy-btn:hover {
    background: #333;
    color: #fff;
}

.result-box {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #ccc;
    text-align: left;
    line-height: 1.5;
    max-height: 600px !important;
    overflow-y: auto !important;
    min-height: 100px;
}

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Splash Screen Styles */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0a0a0a; /* Match body background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    animation: hideSplash 0s linear 1s forwards; /* Hide immediately after animation */
}

#splash-image {
    width: 150px; /* Smaller size */
    height: 150px; /* Smaller size */
    border-radius: 50%; /* Circular mask */
    object-fit: cover; /* Ensure image covers the circle */
    animation: flipAndFade 1s ease-in-out forwards; /* Faster animation */
    filter: drop-shadow(0 0 0 rgba(106, 17, 203, 0)); /* Initial state for glow effect */
}

@keyframes flipAndFade {
    0% {
        transform: rotateY(0deg) scale(0.8);
        opacity: 0;
        filter: drop-shadow(0 0 0 rgba(106, 17, 203, 0));
    }
    25% {
        transform: rotateY(90deg) scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(106, 17, 203, 0.7));
    }
    50% {
        transform: rotateY(180deg) scale(1.1);
        opacity: 1;
        filter: drop-shadow(0 0 30px rgba(106, 17, 203, 0.9));
    }
    75% {
        transform: rotateY(270deg) scale(1);
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(106, 17, 203, 0.7));
    }
    100% {
        transform: rotateY(360deg) scale(0.8);
        opacity: 0;
        filter: drop-shadow(0 0 0 rgba(106, 17, 203, 0));
    }
}

@keyframes hideSplash {
    0% {
        opacity: 1;
        display: flex;
    }
    100% {
        opacity: 0;
        display: none;
    }
}
