﻿/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰元素 */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.bg-circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.bg-circle-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* 导航栏样式 */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-2px);
    color: #f8f9fa !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
}

.nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* 主卡片样式 */
.main-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: slideUp 0.8s ease-out;
}

.main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 输入框样式 */
.json-input {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s ease;
    background: #f8f9fa;
    resize: vertical;
    min-height: 200px;
}

.json-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
    outline: none;
}

.json-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* 按钮样式 */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(86, 171, 47, 0.6);
    color: white;
}

.btn-outline-danger {
    border: 2px solid #dc3545;
    color: #dc3545;
    background: transparent;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

/* 结果显示区域 */
.result-container {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease-in;
}

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

.json-result {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.json-output {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #495057;
}

/* 功能特性卡片 */
.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.feature-title {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-desc {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* 页脚样式 */
.footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    margin-top: 3rem;
}

.language-switcher .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.language-switcher .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .main-card {
        margin: 0 1rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .json-input {
        min-height: 150px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* 加载动画 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 成功提示动画 */
.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

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

/* 错误提示样式 */
.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 工具提示样式 */
.tooltip-inner {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 6px;
    font-size: 0.8rem;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* 自定义选择样式 */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #333;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: #333;
}

/* JSON语法高亮样式 */
.json-output .string {
    color: #28a745;
    font-weight: 500;
}

.json-output .number {
    color: #007bff;
    font-weight: 500;
}

.json-output .boolean {
    color: #fd7e14;
    font-weight: 500;
}

.json-output .null {
    color: #6c757d;
    font-weight: 500;
}

.json-output .key {
    color: #6f42c1;
    font-weight: 600;
}

/* JSON输出区域增强样式 */
.json-result {
    position: relative;
}

.json-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 12px 12px 0 0;
}

/* 复制按钮增强 */
.copy-json-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-json-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #5a6fd8;
    transform: translateY(-1px);
}

/* 错误状态样式 */
.json-input.error {
    border-color: #dc3545;
    background: #fff5f5;
    animation: shake 0.5s ease-in-out;
}

/* 成功状态样式 */
.json-input.success {
    border-color: #28a745;
    background: #f8fff8;
}

/* 加载状态样式 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 页面内容样式 */
.content-text {
    line-height: 1.8;
    color: #495057;
}

.content-text p {
    margin-bottom: 1rem;
}

/* 统计卡片样式 */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 服务卡片样式 */
.service-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-desc {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* 联系卡片样式 */
.contact-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    transition: all 0.3s ease;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
}

.contact-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-detail {
    color: #495057;
    margin-bottom: 0.5rem;
}

.contact-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* 业务项目样式 */
.business-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.business-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

/* 联系表单样式 */
.contact-form {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e9ecef;
}

.contact-form .form-control,
.contact-form .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 隐私政策页面样式 */
.privacy-content {
    line-height: 1.8;
}

.privacy-content section {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 2rem;
}

.privacy-content section:last-child {
    border-bottom: none;
}

/* 信息卡片样式 */
.info-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.info-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.info-desc {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* 目的列表样式 */
.purpose-list {
    list-style: none;
    padding: 0;
}

.purpose-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.purpose-list li:hover {
    background: #f8f9fa;
    padding-left: 1rem;
    border-radius: 8px;
}

.purpose-list li:last-child {
    border-bottom: none;
}

/* 保护卡片样式 */
.protection-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

.protection-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.protection-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* 共享条件样式 */
.sharing-conditions {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
}

.condition-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.condition-item:hover {
    background: #e9ecef;
    padding-left: 1rem;
    border-radius: 8px;
}

.condition-item:last-child {
    border-bottom: none;
}

/* 权利网格样式 */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.right-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.right-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.right-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.2rem;
}

.right-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.right-desc {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

/* 联系信息卡片样式 */
.contact-info-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

.contact-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.contact-info-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-details {
    margin-top: 1rem;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    color: #495057;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .service-card,
    .contact-card,
    .info-card,
    .protection-card,
    .contact-info-card {
        margin-bottom: 1rem;
    }
    
    .rights-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .business-item {
        margin-bottom: 0.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .privacy-content section {
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .service-icon,
    .info-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .contact-icon,
    .right-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .main-card .card-body {
        padding: 1.5rem;
    }
}