/* 通用样式 - 极简风格 - 主色调 #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;
    --error: #ef4444;
}

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);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand:hover {
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* 主内容区域 */
main {
    flex: 1;
    padding: 2rem 0;
}

/* 工具卡片 */
.tool-card {
    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);
    margin-bottom: 2rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.tool-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
}

/* 输入输出面板 */
.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;
}

.panel-info {
    font-size: 0.875rem;
    color: var(--text-light);
}

.text-input,
.text-output {
    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);
}

.text-output {
    background: var(--bg-white);
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--bg-white);
    color: var(--text-dark);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 按钮 */
.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-gray);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-gray);
    border-color: var(--primary);
    color: var(--primary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 广告位 */
.ad-banner {
    margin: 2rem 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);
}

/* 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-error {
    background: var(--error);
}

.toast-info {
    background: var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 页脚 */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-text {
    color: var(--text-gray);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.footer-text a {
    color: var(--text-gray);
    text-decoration: none;
}

.footer-text a:hover {
    color: var(--primary);
}

.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);
}

/* 信息区块 */
.info-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.info-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.info-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem;
}

.info-section p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
    position: relative;
    line-height: 1.6;
}

.info-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        gap: 0.25rem;
        font-size: 0.875rem;
    }
    
    .nav-menu a {
        padding: 0.4rem 0.75rem;
    }
    
    .tool-title {
        font-size: 1.5rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .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;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        min-height: 56px;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .info-section {
        padding: 1.5rem;
    }
}
