@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");

:root {
    --primary-purple: #6a3e9c;
    --light-purple: #9b7bcf;
    --dark-purple: #4a2c7a;
    --soft-purple: #f3eaff;
    --gradient-purple: linear-gradient(135deg, #6a3e9c, #8a5fc0);
    --gradient-flow: linear-gradient(90deg, transparent, #fff, #9b7bcf, #6a3e9c, #9b7bcf, #fff, transparent);
    --shadow-purple: rgba(106, 62, 156, 0.25);
    --card-bg: rgba(255, 255, 255, 0.95);
    --nav-bg: rgba(255, 255, 255, 0.85);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: "Noto Sans SC", "PingFang SC", Helvetica, Arial, sans-serif;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: linear-gradient(145deg, #f8f2ff 0%, #ffffff 100%);
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    z-index: 0;
}

.content-frame,
.main-content {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* ===== 头部导航栏 ===== */
.header {
    position: relative;
    height: 12%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2%;
    background: transparent;
    backdrop-filter: blur(12px);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
}

.university-logo {
    height: 70%;
    width: auto;
}

.university-name-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.university-name {
    font-weight: 700;
    font-size: clamp(1.1rem, 2.2vh, 1.6rem);
    color: white;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.university-name-en {
    font-weight: 400;
    font-size: clamp(0.55rem, 1.1vh, 0.8rem);
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* ===== 导航栏 - 科技感布局 ===== */
.main-nav-dropdown {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
}

.nav-items-wrapper {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.3rem;
    border-radius: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.dropdown {
    position: relative;
}

.dropbtn {
    display: block;
    padding: 0.6rem 1.2rem;
    color: white;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 2rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
    position: relative;
    background: transparent;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.dropbtn:hover {
    background: var(--gradient-purple);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-purple);
}

.dropdown-content {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(106, 62, 156, 0.3);
    border: 1px solid var(--light-purple);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    top: 140%;
}

.wide-dropdown {
    min-width: 350px;
    column-count: 2;
    column-gap: 0;
}

.dropdown-content a {
    color: var(--dark-purple);
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background: var(--soft-purple);
    color: var(--primary-purple);
    padding-left: 2rem;
}

.user-avatar {
    width: 2.8%;
    aspect-ratio: 1/1;
    background: var(--gradient-purple);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* ===== 漂浮气泡动画 ===== */
.floating-bubbles {
    position: absolute;
    top: 15%;
    left: 0;
    width: 100%;
    height: 150px;
    pointer-events: none;
    z-index: 50;
}

.quote-bubble-wrapper {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
}

.quote-bubble {
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(106, 62, 156, 0.3);
    border-radius: 40px;
    padding: 0.6rem 1.8rem;
    font-size: clamp(0.85rem, 1.5vh, 1rem);
    color: var(--dark-purple);
    white-space: nowrap;
    font-weight: 400;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 10px rgba(106, 62, 156, 0.1);
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* 使用伪元素实现中文翻译的平滑过渡 */
.quote-bubble::before {
    content: attr(data-zh);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-purple);
    color: white;
    border-radius: 40px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    padding: 0.6rem 1.8rem;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.quote-bubble-wrapper:hover .quote-bubble {
    opacity: 1;
    background: transparent;
    border-color: transparent;
    color: transparent;
    box-shadow: 0 8px 20px var(--shadow-purple);
    transform: scale(1.02);
}

.quote-bubble-wrapper:hover .quote-bubble::before {
    opacity: 1;
}

/* 6个气泡的不同位置和动画延迟 */
.bubble-1 {
    top: 5%;
    animation: floatRightToLeft 30s linear infinite;
    right: -400px;
}

.bubble-2 {
    top: 25%;
    animation: floatRightToLeft 32s linear infinite;
    animation-delay: 4s;
    right: -450px;
}

.bubble-3 {
    top: 45%;
    animation: floatRightToLeft 35s linear infinite;
    animation-delay: 8s;
    right: -500px;
}

.bubble-4 {
    top: 65%;
    animation: floatRightToLeft 28s linear infinite;
    animation-delay: 12s;
    right: -350px;
}

.bubble-5 {
    top: 85%;
    animation: floatRightToLeft 33s linear infinite;
    animation-delay: 16s;
    right: -480px;
}

.bubble-6 {
    top: 15%;
    animation: floatRightToLeft 38s linear infinite;
    animation-delay: 20s;
    right: -550px;
}

@keyframes floatRightToLeft {
    0% {
        right: -500px;
        opacity: 0;
    }

    5% {
        opacity: 0.8;
    }

    95% {
        opacity: 0.8;
    }

    100% {
        right: 100%;
        opacity: 0;
    }
}

/* ===== 三栏布局 ===== */
.three-column-layout {
    display: flex;
    height: 88%;
    width: 100%;
    padding: 0 1%;
    gap: 1%;
    position: relative;
}

/* 左侧：数据统计区 */
.left-stats-area {
    width: 20%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 10vh;
}

.stats-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    width: 95%;
}

.stat-card,
.visit-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    border: 1px solid var(--light-purple);
    box-shadow: 0 6px 16px var(--shadow-purple);
    padding: 1rem 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover,
.visit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-purple);
}

.stat-number,
.visit-number {
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 700;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.stat-label,
.visit-label {
    font-size: clamp(0.6rem, 1.1vw, 0.8rem);
    color: var(--dark-purple);
    opacity: 0.8;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.visit-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    min-height: 70px;
    width: 115%;
    margin: 0 auto;
}

/* 中间：大标题区域 - 带流光边框 */
.center-title-area {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.title-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.major-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 600;
    color: white;
    text-shadow: 0 10px 25px var(--shadow-purple);
    letter-spacing: 10px;
    position: relative;
    z-index: 2;
}

.flowing-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid transparent;
    border-radius: 20px;
    background: linear-gradient(90deg, transparent, #fff, #9b7bcf, #6a3e9c, #9b7bcf, #fff, transparent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: flowBorder 3s linear infinite;
    z-index: 1;
}

@keyframes flowBorder {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.page-subtitle {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    color: white;
    letter-spacing: 0.4em;
    margin-bottom: 1rem;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.background-title {
    font-size: clamp(2.2rem, 4.5vw, 7rem);
    color: rgba(255, 255, 255, 0.15);
    font-weight: 800;
    letter-spacing: 2px;
}

/* 右侧：AI区域 */
.right-ai-area {
    width: 25%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 3vh;
}

/* AI头像和气泡 */
.ai-profile {
    position: absolute;
    top: 7.5rem;
    right: 6rem;
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    z-index: 200;
}

.ai-avatar {
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 6px 18px var(--shadow-purple);
    transition: transform 0.3s ease;
}

.ai-avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

.ai-intro-bubble {
    background: white;
    border-radius: 20px 20px 20px 0;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--primary-purple);
    box-shadow: 0 6px 18px var(--shadow-purple);
    font-size: clamp(0.7rem, 1.3vh, 0.85rem);
    color: var(--dark-purple);
    line-height: 1.4;
    max-width: 200px;
    position: relative;
    animation: bubbleFloat 3s ease-in-out infinite;
}

@keyframes bubbleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* AI侧边栏 */
.ai-sidebar {
    height: auto;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    border: 2px solid var(--light-purple);
    box-shadow: 0 15px 35px var(--shadow-purple);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
}

.ai-controls {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.ai-control-btn {
    flex: 1;
    background: rgba(106, 62, 156, 0.1);
    border: 1px solid var(--primary-purple);
    border-radius: 30px;
    color: var(--dark-purple);
    font-weight: 500;
    font-size: clamp(0.9rem, 1.2vh, 0.8rem);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-control-btn:hover {
    background: var(--gradient-purple);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
}

.ai-stats {
    background: rgba(106, 62, 156, 0.1);
    border-radius: 30px;
    padding: 0.6rem;
    margin-bottom: 1rem;
}

.ai-stats-content {
    display: flex;
    justify-content: space-around;
    font-size: clamp(0.8rem, 1.1vh, 0.7rem);
    color: var(--dark-purple);
    font-weight: 500;
}

/* AI工具卡片 */
.ai-tools {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.ai-tools::-webkit-scrollbar {
    width: 3px;
}

.ai-tools::-webkit-scrollbar-thumb {
    background: var(--light-purple);
    border-radius: 10px;
}

.tools-title {
    font-size: clamp(0.7rem, 1.3vh, 0.85rem);
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 0.2rem;
    letter-spacing: 0.3px;
}

.daily-sentence-card,
.translation-tool-card {
    background: white;
    border-radius: 22px;
    border: 1px solid var(--light-purple);
    box-shadow: 0 6px 18px var(--shadow-purple);
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.daily-sentence-card:hover,
.translation-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow-purple);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.badge {
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: clamp(0.55rem, 1.1vh, 0.7rem);
    font-weight: 600;
}

.badge.purple {
    background: var(--gradient-purple);
    color: white;
}

.badge.light-purple {
    background: var(--soft-purple);
    color: var(--primary-purple);
    border: 1px solid var(--light-purple);
}

.english-sentence {
    font-size: clamp(0.65rem, 1.2vh, 0.8rem);
    color: var(--dark-purple);
    font-style: italic;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.chinese-translation {
    font-size: clamp(0.55rem, 1.1vh, 0.7rem);
    color: #666;
}

.tool-description {
    font-size: clamp(0.55rem, 1.1vh, 0.7rem);
    color: #666;
    margin-bottom: 0.8rem;
    text-align: center;
}

/* feature-buttons 居中显示 */
.feature-buttons-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    flex-wrap: wrap;
    padding: 0.2rem 0;
}

.feature-btn,
.feature-nav-btn {
    background: rgba(106, 62, 156, 0.08);
    border: 1px solid var(--light-purple);
    border-radius: 30px;
    padding: 0.4rem 0.8rem;
    font-size: clamp(0.55rem, 1.1vh, 0.7rem);
    color: var(--dark-purple);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feature-btn:hover,
.feature-nav-btn:hover {
    background: var(--gradient-purple);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
}

.feature-nav-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.use-now-link {
    color: var(--primary-purple);
    text-decoration: none;
    font-size: clamp(0.55rem, 1.1vh, 0.7rem);
    font-weight: 600;
    transition: transform 0.2s ease;
    display: inline-block;
}

.use-now-link:hover {
    transform: translateX(3px);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.6rem;
}

.language-support {
    font-size: clamp(0.5rem, 1vh, 0.65rem);
    color: #999;
}

.play-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    transition: transform 0.2s ease;
}

.play-btn:hover {
    transform: scale(1.1);
}

.play-btn img {
    width: 100%;
    height: 100%;
}

/* 重新设计的聊天输入区域 */
.ai-chat-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    background: transparent;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    border: 2px solid var(--primary-purple);
    padding: 0.2rem 0.2rem 0.2rem 1rem;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(106, 62, 156, 0.2);
    transform: scale(1.02);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-size: clamp(0.6rem, 1.2vh, 0.75rem);
    outline: none;
    color: var(--dark-purple);
}

.chat-input::placeholder {
    color: #aaa;
    font-style: italic;
}

.voice-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: var(--gradient-purple);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 2px;
}

.voice-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 4px 12px var(--shadow-purple);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attach-btn,
.send-btn {
    width: 2.8rem;
    height: 2.8rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px var(--shadow-purple);
}

.attach-btn {
    background: white;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
}

.attach-btn:hover {
    background: var(--gradient-purple);
    color: white;
    transform: scale(1.1) rotate(15deg);
    border-color: transparent;
}

.send-btn {
    background: var(--gradient-purple);
    color: white;
    border: 2px solid transparent;
}

.send-btn:hover {
    transform: scale(1.1) translateX(3px);
    box-shadow: 0 6px 15px var(--shadow-purple);
}

/* 移除旧的圆圈样式 */
.attach-circle,
.send-circle {
    display: none;
}

@media screen and (min-width: 1919px) {
    .major-title {
        font-size: 150px;
    }

    .left-stats-area {
        padding-bottom: 10%;
    }

    .right-ai-area {
        padding-bottom: 7%;

        .ai-profile {
            position: absolute;
            top: 13rem;
            right: 8rem;
            display: flex;
            align-items: flex-end;
            gap: 0.6rem;
            z-index: 200;
        }
    }



}