/* style.css - 顾老师英语轻松学样式文件 - 自动生成 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a237e 0%, #311b92 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    width: 100%;
    padding: 20px;
}

/* 简洁头部 */
.simple-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.simple-header h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #FFD700;
    line-height: 1.3;
}

.simple-header h1 a {
    color: #FFD700;
    text-decoration: none;
}

.simple-header h1 a:hover {
    text-decoration: none;
    opacity: 0.9;
}

.simple-header .domain {
    font-size: 1.1rem;
    opacity: 0.8;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #BBDEFB;
}

/* 搜索框样式 */
.header-search-box {
    margin: 15px auto 0 auto;
    max-width: 600px;
}

.header-search-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* 修复搜索框全选时光标闪烁的问题 */
.header-search-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 52px;
    line-height: normal;
    text-align: left;
    direction: ltr;
    unicode-bidi: plaintext;
    caret-color: #FFD700;
    -webkit-tap-highlight-color: transparent;
    user-select: text;
}

/* 全选时完全隐藏光标的CSS方案 */
.header-search-input.no-caret {
    caret-color: transparent !important;
}

/* 当文本被选中时，隐藏光标 */
.header-search-input::selection {
    background-color: rgba(255, 215, 0, 0.3);
    color: white;
}

/* 文本选择样式 */
.header-search-input::-moz-selection {
    background: rgba(255, 215, 0, 0.3);
    color: white;
}

.header-search-input::-webkit-selection {
    background: rgba(255, 215, 0, 0.3);
    color: white;
}

.header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    text-align: left;
}

.header-search-input:focus {
    outline: none;
    border-color: #FFD700;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
}

/* 修复：当输入框获得焦点且有文本时，控制光标 */
.header-search-input:focus:read-only {
    caret-color: transparent;
}

.header-search-btn {
    padding: 0 28px;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    background: linear-gradient(135deg, #FF5722, #FF9800);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    height: 52px;
    white-space: nowrap;
}

.header-search-btn:hover {
    background: linear-gradient(135deg, #FF7043, #FFB74D);
    transform: scale(1.05);
}

/* 核心内容区域 - 两栏布局 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* 单词信息栏 */
.word-info-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
}

.word-info-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #FFD700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 单词卡片 */
.word-card {
    margin-top: 10px;
}

.word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.word {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #FFD700;
}

.phonetic {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-top: 5px;
    font-family: 'Arial', sans-serif;
}

.word-category {
    display: inline-block;
    background: rgba(255, 215, 0, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 10px;
}

.speak-btn {
    background: rgba(255, 215, 0, 0.2);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: #FFD700;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.speak-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.05);
}

.meaning {
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.example {
    font-size: 1.4rem;
    font-style: italic;
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 4px solid rgba(255, 215, 0, 0.5);
    line-height: 1.5;
}

.translation {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 25px;
    padding-left: 15px;
    color: #E0E0E0;
}

/* 相关单词 */
.related-words {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #FFD700;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 480px) {
    .related-list {
        grid-template-columns: 1fr;
    }
}

.related-item {
    background: rgba(255, 215, 0, 0.1);
    padding: 12px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.related-item:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-3px);
    text-decoration: none;
}

.related-word {
    font-weight: 600;
    font-size: 1.1rem;
    color: #FFD700;
    margin-bottom: 5px;
}

.related-meaning {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* 卡片生成栏 */
.image-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.image-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #FFD700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 25px;
}

.preview-image {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

.image-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.image-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 160px;
    white-space: nowrap;
}

.download-btn {
    background: linear-gradient(135deg, #00695C, #00897B);
    color: white;
}

.download-btn:hover {
    background: linear-gradient(135deg, #00796B, #009688);
    transform: scale(1.05);
}

.share-btn {
    background: linear-gradient(135deg, #FF5722, #FF9800);
    color: white;
}

.share-btn:hover {
    background: linear-gradient(135deg, #FF7043, #FFB74D);
    transform: scale(1.05);
}

/* 状态指示器 */
.status-indicator {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-success {
    color: #4CAF50;
}

.status-generating {
    color: #FFD700;
}

.status-error {
    color: #f44336;
}

/* 加载动画 */
.loader {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFD700;
    animation: spin 1s ease-in-out infinite;
    margin: 20px auto;
}

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

/* 抖音风格卡片容器（隐藏） */
#tiktok-image {
    width: 1080px;
    height: 1920px;
    position: absolute;
    left: -9999px;
    background: linear-gradient(135deg, #1a237e 0%, #311b92 100%);
    padding: 100px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    font-family: 'Noto Sans SC', sans-serif;
    text-align: center;
}

.tiktok-header {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    text-align: center;
}

.tiktok-logo {
    font-size: 4rem;
    color: #FFD700;
    margin-bottom: 20px;
}

.tiktok-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.tiktok-domain {
    font-size: 1.8rem;
    opacity: 0.9;
    letter-spacing: 3px;
    margin-bottom: 40px;
}

.tiktok-word {
    font-size: 7.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    color: #FFD700;
}

.tiktok-phonetic {
    font-size: 3rem;
    opacity: 0.9;
    margin-bottom: 60px;
    font-family: 'Arial', sans-serif;
}

.tiktok-meaning {
    font-size: 3.5rem;
    margin-bottom: 50px;
    line-height: 1.4;
    padding: 0 40px;
}

.tiktok-example {
    font-size: 2.8rem;
    font-style: italic;
    margin-bottom: 40px;
    padding: 0 40px;
    line-height: 1.5;
    color: #E0E0E0;
}

.tiktok-translation {
    font-size: 2.5rem;
    opacity: 0.9;
    margin-bottom: 80px;
    padding: 0 40px;
    color: #B0BEC5;
}

.tiktok-footer {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 2rem;
    opacity: 0.7;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
    color: #B0BEC5;
    width: 100%;
    max-width: 1000px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a {
    color: #FFD700;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* 站点地图链接 */
.sitemap-link {
    margin-top: 15px;
    font-size: 0.85rem;
}

.sitemap-link a {
    color: #FFD700;
    text-decoration: none;
}

.sitemap-link a:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .simple-header h1 {
        font-size: 1.8rem;
    }
    
    .word {
        font-size: 2.5rem;
    }
    
    .meaning {
        font-size: 1.5rem;
    }
    
    .example {
        font-size: 1.2rem;
    }
    
    .tiktok-word {
        font-size: 5rem;
    }
    
    .tiktok-phonetic {
        font-size: 2rem;
    }
    
    .tiktok-meaning {
        font-size: 2.2rem;
    }
    
    .tiktok-example {
        font-size: 1.8rem;
    }
    
    .tiktok-translation {
        font-size: 1.6rem;
    }
    
    .header-search-form {
        flex-direction: column;
    }
    
    .header-search-input, .header-search-btn {
        width: 100%;
        height: 48px;
    }
    
    .image-buttons {
        flex-direction: column;
    }
    
    .image-btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 全局链接无下划线 */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* 查询提示 */
.query-tip {
    font-size: 0.9rem;
    color: #BBDEFB;
    margin-top: 8px;
    text-align: center;
}

/* 修复按钮文字布局 */
.btn-text {
    display: inline-block;
}