* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* 顶部说明 */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 17px;
    font-weight: 400;
    color: #666;
    line-height: 1.8;
}

.header h1 i {
    color: #5b6eae;
}

.top-nav {
    margin-top: 10px;
    display: inline-flex;
    gap: 12px;
    font-size: 13px;
}

.top-nav a {
    color: #5b6eae;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.top-nav a:hover {
    background: #eef1ff;
    color: #4a5a94;
}

/* 主功能卡片 */
.main-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: #5b6eae;
    color: white;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
}

.card-header i {
    margin-right: 8px;
}

.card-body {
    padding: 25px;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e8ecf1;
}

.tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab:hover {
    color: #5b6eae;
}

.tab.active {
    color: #5b6eae;
    border-bottom-color: #5b6eae;
    font-weight: 600;
}

/* 标签说明 */
.tab-description {
    background: #f8f9fb;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    margin-top: 15px;
}

.tab-description p {
    color: #666;
    font-size: 13px;
    margin: 0;
    line-height: 1.6;
}

/* 输入区域 */
.input-section {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-box {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-box:focus {
    outline: none;
    border-color: #5b6eae;
}

.btn-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    display: none;
    transition: color 0.2s;
}

.btn-clear:hover {
    color: #666;
}

.btn-clear.show {
    display: block;
}

/* 示例按钮样式（视觉提示用） */
.examples {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.example-btn {
    padding: 6px 12px;
    background: #f8f9fb;
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.example-btn:hover,
.example-btn.active {
    background: #5b6eae;
    color: white;
    border-color: #5b6eae;
}

.example-btn i {
    margin-right: 4px;
}

.btn-convert {
    padding: 12px 28px;
    background: #5b6eae;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.btn-convert:hover {
    background: #4a5a94;
}

.btn-convert:active {
    transform: scale(0.98);
}

.btn-convert i {
    margin-right: 6px;
}

/* 错误提示 */
.error-message {
    display: none;
    padding: 10px 14px;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    color: #d32f2f;
    font-size: 13px;
    margin-bottom: 12px;
    animation: slideDown 0.2s ease-out;
}

.error-message.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 结果区域 */
.result-section {
    display: none;
    margin-top: 20px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section.show {
    display: block;
}

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

.link-type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #5b6eae;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.result-hint {
    font-size: 12px;
    color: #999;
}

.result-box {
    background: #f8f9fb;
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 12px;
    word-break: break-all;
    color: #5b6eae;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.result-box:hover {
    background: #f0f3ff;
    border-color: #5b6eae;
}

.result-box:hover::after {
    content: '点击复制';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #5b6eae;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.result-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.btn-action {
    padding: 10px;
    background: white;
    color: #5b6eae;
    border: 1px solid #5b6eae;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    background: #5b6eae;
    color: white;
}

.btn-action:active {
    transform: scale(0.95);
}

.btn-action.copied {
    background: #00b09b;
    border-color: #00b09b;
    color: white;
}

.btn-action i {
    margin-right: 6px;
}

/* 广告区域 */
.ad-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.sponsor-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 20px;
    text-align: center;
}

/* VPN 广告样式 */
.ad-link {
    text-decoration: none;
    display: block;
}

.ad-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 30px 20px;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e8ecf1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.ad-banner-content {
    text-align: center;
}

.ad-banner-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #333;
}

.ad-banner-content p {
    font-size: 13px;
    margin-bottom: 6px;
    color: #666;
}

.ad-features {
    font-size: 11px;
    margin: 12px 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    color: #555;
}

.ad-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 18px;
    background: #5b6eae;
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.ad-banner:hover .ad-cta {
    background: #4a5a94;
}

.ad-title, .sponsor-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.sponsor-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}

.qr-code {
    margin-top: 10px;
}

.qr-image {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.qr-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

/* 页脚 */
.footer {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 20px 0;
}

/* 响应式 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .header h1 {
        font-size: 15px;
    }

    .input-section {
        flex-direction: column;
    }
    
    .btn-convert {
        width: 100%;
        padding: 14px 28px;
    }

    .ad-section {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: wrap;
    }
    
    .result-box:hover::after {
        display: none;
    }
    
    .result-actions {
        grid-template-columns: 1fr;
    }
    
    .btn-action {
        font-size: 14px;
        padding: 12px;
    }
}


/* 评论区 */
.comments-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.comments-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* HowTo & FAQ */
.howto, .faq {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.howto h3, .faq h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #333;
}

.howto ol {
    padding-left: 20px;
    color: #444;
    line-height: 1.7;
    margin-bottom: 10px;
}

.howto-note {
    font-size: 13px;
    color: #666;
    background: #f8f9fb;
    padding: 10px 12px;
    border-radius: 6px;
}

.faq-item + .faq-item {
    margin-top: 14px;
}

.faq-item h4 {
    font-size: 15px;
    margin-bottom: 6px;
    color: #333;
}

.faq-item p {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
}

/* Guide/Status extras */
.guide .code-block {
    background: #0b1021;
    color: #e9eef7;
    padding: 14px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
    margin-top: 10px;
}

.status-list {
    padding-left: 18px;
    color: #444;
    line-height: 1.7;
}
