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

html {
    background: linear-gradient(135deg, #00a4bd 0%, #0088a3 100%) !important;
    background-attachment: fixed !important;
    min-height: 100% !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #00a4bd 0%, #0088a3 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
    color: #333;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰 */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 164, 189, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 164, 189, 0.2) 0%, transparent 50%);
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

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

/* 容器 */
.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 32px;
    padding: 40px 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 1px 0px rgba(255, 255, 255, 0.8) inset;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

.logo-image {
    height: 60px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 164, 189, 0.2));
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

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

.header h1 {
    font-size: 28px;
    background: linear-gradient(135deg, #00a4bd 0%, #0088a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 400;
}

.header-features {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.feature-tag {
    background: linear-gradient(135deg, rgba(0, 164, 189, 0.1) 0%, rgba(0, 136, 163, 0.1) 100%);
    color: #00a4bd;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(0, 164, 189, 0.2);
}

/* 表单容器 */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 1px 0px rgba(255, 255, 255, 0.8) inset;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-header p {
    color: #6c757d;
    font-size: 14px;
}

/* 表单组 */
.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.label-icon {
    margin-right: 8px;
    font-size: 16px;
}

.required {
    color: #e74c3c;
    margin-left: 4px;
}

/* 输入框样式 */
.input-wrapper {
    position: relative;
}

input[type="text"],
input[type="tel"] {
    width: 100% !important;
    padding: 18px 16px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 16px !important;
    font-size: 16px !important;
    background: #f8f9fa !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    -webkit-appearance: none !important;
    position: relative !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
    min-height: 56px !important;
}

input[type="text"]:focus,
input[type="tel"]:focus {
    outline: none !important;
    border-color: #00a4bd !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(0, 164, 189, 0.1) !important;
    transform: translateY(-1px) !important;
}

input[type="text"].error,
input[type="tel"].error {
    border-color: #e74c3c !important;
    background: #fdf2f2 !important;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1) !important;
}

.input-focus-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    background: linear-gradient(135deg, #00a4bd, #0088a3);
    background-clip: padding-box;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

input[type="text"]:focus + .input-focus-border,
input[type="tel"]:focus + .input-focus-border {
    opacity: 0.1;
}

.input-help {
    display: flex;
    align-items: center;
    margin-top: 8px;
    font-size: 13px;
    color: #6c757d;
}

.help-icon {
    margin-right: 6px;
    font-size: 14px;
}

/* 单选按钮组 */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.radio-card {
    display: block;
    cursor: pointer;
    margin-bottom: 0;
    position: relative;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    background: #f8f9fa;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.radio-card input[type="radio"]:checked + .radio-content {
    border-color: #00a4bd;
    background: linear-gradient(135deg, rgba(0, 164, 189, 0.05) 0%, rgba(0, 136, 163, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(0, 164, 189, 0.15);
    transform: translateY(-1px);
}

.radio-content::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 16px;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.radio-card input[type="radio"]:checked + .radio-content::after {
    border-color: #00a4bd;
    background: #00a4bd;
    box-shadow: inset 0 0 0 4px white;
}

.radio-icon {
    font-size: 24px;
    margin-right: 16px;
}

.radio-text {
    flex: 1;
}

.radio-text strong {
    display: block;
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 2px;
}

.radio-text small {
    color: #6c757d;
    font-size: 13px;
}

/* 按钮样式 */
.btn-primary {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #00a4bd 0%, #0088a3 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 164, 189, 0.4);
}

.btn-primary::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-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 164, 189, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    margin-right: 8px;
    font-size: 18px;
}

.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding: 12px 16px;
    background: rgba(0, 164, 189, 0.05);
    border-radius: 12px;
    font-size: 13px;
    color: #6c757d;
    border: 1px solid rgba(0, 164, 189, 0.1);
}

.security-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* 加载动画 */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    display: inline-block;
}

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

/* 错误信息 */
.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    display: block;
    min-height: 18px;
}

/* 结果容器 */
.result-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 1px 0px rgba(255, 255, 255, 0.8) inset;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 24px;
    animation: slideUp 0.5s ease-out;
}

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

.result-header {
    margin-bottom: 24px;
}

.result-title {
    display: flex;
    align-items: center;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

.result-icon {
    margin-right: 10px;
    font-size: 22px;
}

.result-summary {
    color: #6c757d;
    font-size: 14px;
}

/* 报告项 */
.report-item {
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    background: rgba(248, 249, 250, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.report-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #00a4bd 0%, #0088a3 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.report-item:hover {
    border-color: #00a4bd;
    background: white;
    box-shadow: 0 8px 25px rgba(0, 164, 189, 0.15);
    transform: translateY(-2px);
}

.report-item:hover::before {
    opacity: 1;
}

.report-info {
    margin-bottom: 20px;
}

.report-info p {
    margin-bottom: 8px;
    color: #555;
    display: flex;
    align-items: center;
}

.report-info strong {
    color: #2c3e50;
    margin-right: 8px;
    min-width: 80px;
}

.report-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-view {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-view::before {
    content: '👁️';
    margin-right: 6px;
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-download {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-download::before {
    content: '📥';
    margin-right: 6px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    color: #2c3e50;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.toast.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.2);
}

.toast.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.2);
}

.toast-icon {
    margin-right: 8px;
    font-size: 16px;
}

.toast-message {
    flex: 1;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 32px 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
}

.footer p {
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

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

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 16px;
    }
    
    .header {
        padding: 32px 20px;
        margin-bottom: 24px;
    }
    
    .logo-image {
        height: 48px;
        max-width: 240px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .header-features {
        gap: 8px;
    }
    
    .feature-tag {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .form-container {
        padding: 24px 20px;
    }
    
    .radio-group {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .radio-content {
        padding: 12px 14px;
        flex-direction: column;
        text-align: center;
    }
    
    .radio-icon {
        font-size: 24px;
        margin-right: 0;
        margin-bottom: 6px;
    }
    
    .radio-text strong {
        font-size: 13px;
    }
    
    .radio-text small {
        font-size: 11px;
    }
    
    input[type="text"],
    input[type="tel"] {
        padding: 16px 14px !important;
        font-size: 16px !important; /* 防止iOS缩放 */
        min-height: 52px !important;
    }
    
    .btn-primary {
        padding: 18px;
        font-size: 16px;
        min-height: 56px;
    }
    
    .report-item {
        padding: 20px;
    }
    
    .report-actions {
        flex-direction: column;
    }
    
    .btn-view,
    .btn-download {
        width: 100%;
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 12px;
    }
    
    .header {
        padding: 24px 16px;
    }
    
    .form-container,
    .result-container {
        padding: 20px 16px;
    }
    
    .toast {
        max-width: 95%;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    input[type="text"] {
        border-width: 3px;
    }
    
    .btn-primary {
        border: 2px solid #2c3e50;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}