/* 整个页面使用Flexbox布局 */
body {
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    min-height: 100vh; /* 最小高度为视口高度 */
    margin: 0;
    background-color: #f0f0f0; /* 背景颜色 */
    font-family: Arial, sans-serif; /* 字体 */
}

.container {
    display: flex;
    flex-direction: column; /* 垂直排列子元素 */
    align-items: center; /* 子元素水平居中 */
    max-width: 800px;
    padding: 20px;
    width: 100%;
}

.button-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.cool-button {
    padding: 10px 20px;
    font-size: 16px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(45deg, #4b6cb7, #182848);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px; /* 添加底部间距 */
}

.cool-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: skewX(-20deg);
    transition: all 0.3s ease;
}

.cool-button:hover::before {
    transform: skewX(20deg) translateX(150%);
}

.cool-button:hover {
    background: linear-gradient(45deg, #182848, #4b6cb7);
}

.cool-textarea {
    width: 100%;
    max-width: 700px;
    padding: 15px;
    font-size: 16px;
    color: #333;
    background: #f7f7f7;
    border: 2px solid #4b6cb7;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    resize: vertical; /* 允许垂直调整大小 */
    min-height: 300px;
}

.cool-textarea:focus {
    border-color: #182848;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 5px rgba(25, 25, 25, 0.4);
    outline: none;
}

.cool-textarea::placeholder {
    color: #a9a9a9;
}

h1 {
    font-size: 2.5em; /* 字体大小 */
    color: #4b6cb7; /* 字体颜色，与按钮颜色相匹配 */
    text-align: center; /* 文本居中 */
    margin: 0; /* 移除默认的外边距 */
    padding: 20px 0; /* 上下内边距 */
    font-weight: normal; /* 字体权重 */
    background: linear-gradient(to right, #4b6cb7, #182848); /* 背景渐变 */
    -webkit-background-clip: text; /* 背景剪切，文本颜色变为透明 */
    background-clip: text;
    color: transparent; /* 文本颜色变为透明 */
    transition: all 0.3s ease; /* 平滑过渡效果 */
}

h1:hover {
    transform: scale(1.05); /* 鼠标悬停时放大 */
}

.language-switch {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.language-switch a {
    color: #4b6cb7;
    text-decoration: none;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.language-switch a:hover {
    text-decoration: none;
    background-color: rgba(75, 108, 183, 0.1);
}

.language-switch .separator {
    color: #4b6cb7;
    margin: 0 5px;
}

#add-favorite-btn {
    display: inline-flex;
    align-items: center;
    background-color: rgba(75, 108, 183, 0.05);
}

#add-favorite-btn:hover {
    background-color: rgba(75, 108, 183, 0.2);
}

.reference-section {
    margin-top: 20px;
    text-align: left;
    width: 100%;
    max-width: 700px;
}

.reference-section ul {
    padding-left: 20px;
}

.reference-section a {
    color: #4b6cb7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.reference-section a:hover {
    color: #182848;
    text-decoration: underline;
}

.group-section {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 20px;
    width: 100%;
}

.group-section h2 {
    color: #4b6cb7;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.group-section p {
    margin-bottom: 15px;
}

.group-section img {
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 10px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.group-section img:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.group-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.group-item {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .cool-textarea {
        min-height: 200px;
    }
    
    .cool-button {
        padding: 8px 16px;
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .button-container {
        gap: 10px;
    }
    
    .group-item {
        min-width: 150px;
        max-width: 100%;
    }
    
    .group-section img {
        width: 150px;
    }
    
    .language-switch {
        margin-bottom: 10px;
    }
    
    .site-footer {
        margin-top: 30px;
        padding-top: 15px;
        font-size: 0.8em;
    }
}

/* 页脚样式 */
.site-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    width: 100%;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}

.site-footer a {
    color: #4b6cb7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #182848;
    text-decoration: underline;
}

/* 确保列表项符号始终显示 */
.reference-section ul li {
    display: list-item !important;
}

.reference-section ul li.lang-zh,
.reference-section ul li.lang-en {
    display: none;
}

.reference-section ul li.lang-zh[style*="display: block"],
.reference-section ul li.lang-en[style*="display: block"] {
    display: list-item !important;
} 