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

:root {
    --primary-color: #4a6fa5;
    --primary-hover: #3b5998;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --border-color: #dee2e6;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --border-radius: 0.25rem;
    --transition: all 0.3s ease;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 排版样式 */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* 头部样式 */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

header h1 {
    margin-bottom: 0.5rem;
    text-align: center;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* 语言切换器样式 */
.language-switcher {
    margin-top: 1rem;
    text-align: center;
}

.language-switcher select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0,0 L12,0 L6,6 Z" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
}

.language-switcher select:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.language-switcher select option {
    background-color: var(--primary-color);
    color: white;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

nav li {
    margin: 0 0.75rem;
}

nav a {
    color: white;
    padding: 0.5rem 0;
    display: block;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

nav a:hover {
    text-decoration: none;
}

nav a:hover::after {
    transform: scaleX(1);
}

/* 主要内容区域 */
main {
    padding: 2rem 0;
}

.section {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* 转换器样式 */
.converter {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.input-area, .output-area {
    margin-bottom: 1.5rem;
}

.input-area label, .output-area label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#input-text {
    width: 100%;
    height: 120px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    resize: vertical;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#input-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 111, 165, 0.25);
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.control-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    background-color: var(--secondary-color);
    color: white;
}

.primary-btn {
    background-color: var(--primary-color);
}

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

#clear-btn {
    background-color: var(--danger-color);
}

#copy-btn {
    background-color: var(--success-color);
}

.output-box {
    min-height: 80px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
    word-break: break-word;
    font-family: monospace;
    font-size: 1.1rem;
}

.copy-success {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-success.visible {
    opacity: 1;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.social-share span {
    font-size: 0.9rem;
}

.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: var(--dark-color);
    transition: var(--transition);
}

.social-share a:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.share-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* 社交媒体图标的品牌色 - 保留兼容旧版 */
#share-weixin:hover {
    background-color: #07C160;
}

#share-weibo:hover {
    background-color: #E6162D;
}

#share-qq:hover {
    background-color: #12B7F5;
}

#share-twitter:hover {
    background-color: #1DA1F2;
}

#share-facebook:hover {
    background-color: #1877F2;
}

#share-youtube:hover {
    background-color: #FF0000;
}

#share-instagram:hover {
    background: linear-gradient(45deg, #FFDC80, #FCAF45, #F77737, #F56040, #FD1D1D, #E1306C, #C13584, #833AB4, #5851DB, #405DE6);
}

.output-options {
    margin-top: 1rem;
}

.option {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checkbox {
    margin-right: 0.5rem;
}

.html-code {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 0.5rem;
}

.hidden {
    display: none;
}

.small-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* 使用指南样式 */
.step-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

/* 字符表样式 */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background-color: #f1f3f5;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark-color);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.char-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.char-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: white;
}

.char-original, .char-flipped {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.char-name {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-align: center;
}

/* 创意用途样式 */
.uses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.use-card {
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background-color: white;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
}

.use-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.use-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background-color: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon {
    background-color: #e8f4f8;
}

.chat-icon {
    background-color: #fff4e8;
}

.design-icon {
    background-color: #e8f8ef;
}

.security-icon {
    background-color: #f8e8e8;
}

/* 预览部分样式 */
.preview-section {
    margin-top: 3rem;
}

.preview-section h3 {
    text-align: center;
    margin-bottom: 1rem;
}

.preview-section > p {
    text-align: center;
    margin-bottom: 2rem;
}

.preview-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.platform {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.05);
}

.platform-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.weixin-header .platform-icon {
    background-color: #07C160;
}

.weibo-header .platform-icon {
    background-color: #E6162D;
}

.facebook-header .platform-icon {
    background-color: #1877F2;
}

.twitter-header .platform-icon {
    background-color: #1DA1F2;
}

.instagram-header .platform-icon {
    background: linear-gradient(45deg, #FFDC80, #FCAF45, #F77737, #F56040, #FD1D1D, #E1306C, #C13584, #833AB4, #5851DB, #405DE6);
}

.tiktok-header .platform-icon {
    background: linear-gradient(45deg, #000000, #EE1D52, #69C9D0);
}

.platform-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    background-color: #f1f3f5;
    border-radius: 50%;
}

.platform-content {
    padding: 1rem;
}

.message {
    margin-bottom: 1rem;
    display: flex;
}

.message.reply {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background-color: #f1f3f5;
}

.message.reply .message-bubble {
    background-color: #e3f2fd;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f1f3f5;
    margin-right: 0.75rem;
}

.post-content {
    padding: 0.75rem 0;
}

/* CSS示例部分 */
.css-section {
    background-color: #f8f9fa;
}

.code-example {
    margin-bottom: 2rem;
}

.code-example h3 {
    margin-bottom: 1rem;
}

pre {
    background-color: #282c34;
    color: #abb2bf;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 页脚样式 */
footer {
    background-color: #2d3748;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo h2 {
    margin-bottom: 0.5rem;
}

.footer-logo p {
    opacity: 0.7;
}

.footer-links h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a:hover {
    color: white;
}

/* 响应式设计 */
@media (min-width: 576px) {
    .controls {
        justify-content: space-between;
    }
}

@media (min-width: 768px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    header h1 {
        margin-bottom: 0;
    }
    
    .tagline {
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .converter {
        padding: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .control-group {
        width: 100%;
        justify-content: center;
    }
    
    .step {
        margin-bottom: 1.5rem;
    }
}

/* 字体图标 */
@font-face {
    font-family: 'iconfont';
    src: url('iconfont.woff2') format('woff2'),
         url('iconfont.woff') format('woff');
}

[class^="icon-"], [class*=" icon-"] {
    font-family: 'iconfont' !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.icon-wechat:before {
    content: "\e909";
}

.icon-weibo:before {
    content: "\e90a";
}

.icon-qq:before {
    content: "\e90b";
}

.icon-twitter:before {
    content: "\e90c";
}

.icon-facebook:before {
    content: "\e90d";
}

.icon-youtube:before {
    content: "\e90e";
}

.icon-instagram:before {
    content: "\e90f";
}

/* 打印样式 */
@media print {
    header, footer, nav, .social-share, #guide, #uses, #about {
        display: none;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .converter {
        box-shadow: none;
        border: none;
        padding: 0;
    }
    
    .output-box {
        border: none;
    }
}

/* 暗黑模式支持 - 已禁用
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f8f9fa;
        --light-color: #121212;
        --border-color: #2d3748;
    }
    
    body {
        background-color: #121212;
        color: #f8f9fa;
    }
    
    .converter, .use-card, .platform, .char-item {
        background-color: #1e1e1e;
    }
    
    .output-box, .html-code, .tab-btn {
        background-color: #2d3748;
        color: #f8f9fa;
    }
    
    #input-text {
        background-color: #2d3748;
        color: #f8f9fa;
        border-color: #4a5568;
    }
    
    pre {
        background-color: #1a202c;
    }
}
*/

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 0.5s;
}

/* 策略页面样式 */
.policy-container {
    padding: 2rem 0;
}

.policy-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.policy-section {
    margin-bottom: 2.5rem;
}

.policy-section:last-child {
    margin-bottom: 0;
}

.policy-section h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.policy-section h3 {
    font-size: 1.35rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.policy-section p,
.policy-section ul,
.policy-section ol {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.policy-section ul,
.policy-section ol {
    padding-left: 1.5rem;
}

.policy-section ul li,
.policy-section ol li {
    margin-bottom: 0.5rem;
}

.policy-section ul {
    list-style-type: disc;
}

.policy-section ol {
    list-style-type: decimal;
}

.policy-section strong {
    font-weight: 600;
}

/* 对暗黑模式的支持 - 已禁用
@media (prefers-color-scheme: dark) {
    .policy-content {
        background-color: #1e1e1e;
    }
    
    .policy-section h2 {
        border-bottom-color: #4a5568;
    }
}
*/

/* 响应式调整 */
@media (max-width: 767px) {
    .policy-content {
        padding: 1.5rem;
    }
    
    .policy-section h2 {
        font-size: 1.5rem;
    }
    
    .policy-section h3 {
        font-size: 1.25rem;
    }
} 

/* 语言切换样式 */
.language-switcher {
    margin-top: 1rem;
    text-align: center;
}

.lang-link {
    display: none; /* 隐藏链接，改用下拉框 */
} 