/* 极简风格 CSS - 主色调 #2563eb */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 导航栏 */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* 转换区域 */
.converter-section {
    padding: 4rem 0;
    background: var(--bg-white);
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.main-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.converter-box {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.text-panel {
    margin-bottom: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.panel-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.char-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.conversion-badge {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 6px;
}

.text-input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
    background: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.text-input::placeholder {
    color: var(--text-light);
}

/* 按钮 */
.control-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background: var(--primary-light);
    color: white;
}

.btn-secondary:hover {
    background: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-clear,
.btn-copy {
    background: var(--bg-white);
    color: var(--text-gray);
    border: 1px solid var(--border);
}

.btn-clear:hover,
.btn-copy:hover {
    background: var(--bg-gray);
    border-color: var(--primary);
    color: var(--primary);
}

/* 广告位 */
.ad-banner {
    max-width: 900px;
    margin: 2rem auto 0;
}

.ad-link {
    display: block;
    text-decoration: none;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.ad-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.ad-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ad-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.ad-text {
    flex: 1;
}

.ad-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.ad-subtitle {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
}

.ad-arrow {
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.ad-link:hover .ad-arrow {
    transform: translateX(5px);
}

/* 通用区块 */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--bg-white);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* 功能介绍 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s;
}

.feature-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.feature-item p {
    font-size: 0.9375rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* 使用说明 */
.usage-content {
    max-width: 800px;
    margin: 0 auto;
}

.usage-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.step-content p {
    color: var(--text-gray);
    line-height: 1.6;
}

.usage-tips {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.usage-tips h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.usage-tips ul {
    list-style: none;
    padding: 0;
}

.usage-tips li {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
    position: relative;
}

.usage-tips li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* 隐私保护 */
.privacy-content {
    max-width: 900px;
    margin: 0 auto;
}

.privacy-block {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.privacy-block h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.privacy-block p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.privacy-block ul {
    list-style: none;
    padding: 0;
}

.privacy-block li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-gray);
    position: relative;
    line-height: 1.6;
}

.privacy-block li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.privacy-block strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* 友情链接 */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.link-item {
    display: block;
    padding: 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.2s;
}

.link-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.links-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
}

/* 页脚 */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

.footer-text {
    color: var(--text-gray);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

.toast-warning {
    background: var(--warning);
}

.toast-info {
    background: var(--primary);
}

.toast.hide {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .main-subtitle {
        font-size: 1rem;
    }
    
    .converter-box {
        padding: 1.5rem;
    }
    
    .control-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .ad-link {
        padding: 1.25rem 1.5rem;
    }
    
    .ad-content {
        gap: 1rem;
    }
    
    .ad-icon {
        font-size: 2rem;
    }
    
    .ad-title {
        font-size: 1rem;
    }
    
    .ad-subtitle {
        font-size: 0.875rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .usage-step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        height: 56px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .main-title {
        font-size: 1.75rem;
    }
    
    .converter-box {
        padding: 1rem;
    }
    
    .control-buttons {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}
