/* 科幻风格查号系统 */
:root {
    --primary-cyan: #00ffff;
    --primary-blue: #0080ff;
    --neon-green: #00ff41;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --glass-bg: rgba(0, 255, 255, 0.05);
    --border-glow: rgba(0, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0a0ff;
    --shadow-glow: 0 0 20px rgba(0, 255, 255, 0.3);
}

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

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* 字体渲染优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga", "kern";
}

/* 科幻背景 */
.sci-fi-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, var(--primary-cyan), transparent),
        radial-gradient(2px 2px at 40px 70px, var(--neon-green), transparent),
        radial-gradient(1px 1px at 90px 40px, var(--primary-blue), transparent),
        radial-gradient(1px 1px at 130px 80px, var(--primary-cyan), transparent),
        radial-gradient(2px 2px at 160px 30px, var(--neon-green), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particlesFloat 15s ease-in-out infinite;
}

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

.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 255, 255, 0.03) 50%
    );
    background-size: 100% 4px;
    animation: scanMove 2s linear infinite;
}

@keyframes scanMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

.glow-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
}

.orb-1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation: orbFloat1 8s ease-in-out infinite;
}

.orb-2 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.1) 0%, transparent 70%);
    top: 60%;
    right: 15%;
    animation: orbFloat2 10s ease-in-out infinite;
}

.orb-3 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 128, 255, 0.1) 0%, transparent 70%);
    bottom: 20%;
    left: 50%;
    animation: orbFloat3 6s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 30px) scale(0.9); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.2); }
}

/* 主界面 */
.main-interface {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.interface-header {
    text-align: center;
    margin-bottom: 50px;
}

.system-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-cyan);
    text-shadow: 0 0 20px var(--primary-cyan);
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.system-title i {
    margin-right: 15px;
    animation: satelliteRotate 3s linear infinite;
}

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

.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* 查询表单 */
.query-form {
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.input-wrapper {
    width: 100%;
    position: relative;
}

.input-frame {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: var(--shadow-glow);
    pointer-events: auto;
}

.input-frame::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--primary-cyan), var(--primary-blue), var(--neon-green));
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-frame:hover::before,
.input-frame:focus-within::before,
.input-frame.focused::before {
    opacity: 0.5;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-cyan);
    font-size: 1.2rem;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 15px 15px 15px 50px;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 1px;
    z-index: 2;
    position: relative;
    pointer-events: auto;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-frame:focus-within .input-glow,
.input-frame.focused .input-glow {
    opacity: 1;
    animation: inputScan 2s ease-in-out infinite;
}

/* 输入验证状态样式 */
.input-frame.partial {
    border-color: rgba(255, 165, 0, 0.6);
}

.input-frame.partial .input-glow {
    background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.3), transparent);
}

.input-frame.valid {
    border-color: rgba(0, 255, 0, 0.6);
}

.input-frame.valid .input-glow {
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.3), transparent);
}

.input-frame.invalid {
    border-color: rgba(255, 0, 0, 0.6);
    animation: shake 0.5s ease-in-out;
}

.input-frame.invalid .input-glow {
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.3), transparent);
}

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

@keyframes inputScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 查询按钮 */
.query-btn {
    position: relative;
    background: linear-gradient(45deg, var(--primary-cyan), var(--primary-blue));
    border: none;
    border-radius: 12px;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-bg);
    cursor: pointer;
    font-family: 'Microsoft YaHei', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.query-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 30px rgba(0, 255, 255, 0.6);
}

.query-btn:active {
    transform: translateY(0);
}

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

.query-btn:hover .btn-glow {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.query-btn:hover .btn-icon {
    transform: translateX(5px);
}

/* 结果区域 */
.result-section {
    width: 100%;
    max-width: 700px;
    margin-top: 30px;
}

.result-content {
    background: var(--glass-bg);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    padding: 25px;
    box-shadow: var(--shadow-glow);
    animation: resultAppear 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.result-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    animation: scanComplete 2s ease-out;
}

.result-content.scan-complete::before {
    animation: scanComplete 2s ease-out;
}

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

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-glow);
}

.result-header h3 {
    color: var(--primary-cyan);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-header h3 i {
    animation: satelliteRotate 3s linear infinite;
}

.scan-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.result-item {
    background: rgba(0, 255, 255, 0.02);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-item:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-cyan), var(--neon-green));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.result-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-label i {
    color: var(--primary-cyan);
    font-size: 0.9rem;
}

.result-value {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.status-active {
    color: var(--neon-green) !important;
    text-shadow: 0 0 5px var(--neon-green);
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-glow);
}

.action-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--border-glow);
    color: var(--primary-cyan);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Microsoft YaHei', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 0.8rem;
}

@keyframes resultAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计 - 平板端 */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .main-interface {
        padding: 20px 15px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .system-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
        margin-bottom: 15px;
    }
    
    .status-bar {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .interface-header {
        margin-bottom: 35px;
    }
    
    .query-form {
        max-width: 100%;
    }
    
    .input-group {
        gap: 20px;
    }
    
    .input-frame {
        padding: 18px;
    }
    
    .input-wrapper input {
        font-size: 1.1rem;
        padding: 15px 15px 15px 50px;
    }
    
    .input-icon {
        font-size: 1.2rem;
        left: 18px;
    }
    
    .query-btn {
        padding: 18px 35px;
        font-size: 1.1rem;
        min-height: 56px;
    }
    
    .result-section {
        max-width: 100%;
        margin-top: 30px;
    }
    
    .result-content {
        padding: 20px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-btn {
        width: 100%;
        min-height: 48px;
    }
}

/* 手机端优化 */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .main-interface {
        padding: 15px 10px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .system-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .system-title i {
        margin-right: 8px;
        font-size: 1.6rem;
    }
    
    .status-bar {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin-bottom: 25px;
    }
    
    .interface-header {
        margin-bottom: 25px;
        text-align: center;
    }
    
    .query-form {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .input-group {
        gap: 18px;
    }
    
    .input-frame {
        padding: 15px;
    }
    
    .input-wrapper input {
        font-size: 1rem;
        padding: 14px 14px 14px 45px;
    }
    
    .input-icon {
        font-size: 1.1rem;
        left: 15px;
    }
    
    .query-btn {
        width: 100%;
        padding: 16px 20px;
        font-size: 1rem;
        min-height: 52px;
        border-radius: 8px;
    }
    
    .result-section {
        margin-top: 25px;
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .result-content {
        padding: 15px;
    }
    
    .result-header {
        margin-bottom: 15px;
    }
    
    .result-header h3 {
        font-size: 1.1rem;
    }
    
    .scan-status {
        font-size: 0.8rem;
    }
    
    .result-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .result-label {
        font-size: 0.85rem;
    }
    
    .result-value {
        font-size: 0.95rem;
    }
    
    .action-buttons {
        margin-top: 20px;
        gap: 10px;
    }
    
    .action-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* 优化科幻背景在手机端的性能 */
    .orb-1, .orb-2, .orb-3 {
        opacity: 0.3;
        transform: scale(0.8);
    }
    
    .particles {
        opacity: 0.4;
    }
    
    .scan-lines {
        opacity: 0.3;
    }
    
    /* 错误和成功消息在手机端的适配 */
     .error-message, .success-message {
         top: 10px;
         right: 10px;
         left: 10px;
         padding: 12px 15px;
         font-size: 0.9rem;
         text-align: center;
     }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .main-interface {
        padding: 10px 8px;
    }
    
    .system-title {
        font-size: 1.6rem;
    }
    
    .query-form {
        max-width: 100%;
    }
    
    .input-frame {
        padding: 12px;
    }
    
    .input-wrapper input {
        padding: 12px 12px 12px 40px;
        font-size: 0.95rem;
    }
    
    .input-icon {
        left: 12px;
        font-size: 1rem;
    }
    
    .query-btn {
        padding: 14px 16px;
        min-height: 48px;
        font-size: 0.95rem;
    }
    
    .result-section {
        max-width: 100%;
    }
    
    .result-content {
         padding: 12px;
     }
}

/* 触摸友好性优化 */
@media (max-width: 768px) {
    /* 确保所有可点击元素至少44px高度（Apple推荐） */
    .query-btn, .action-btn, button {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* 改善触摸反馈 */
    .query-btn:active, .action-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* 输入框触摸优化 */
    .input-wrapper input {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* 增加点击区域 */
    .input-wrapper {
        position: relative;
    }
    
    .input-wrapper::before {
        content: '';
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        z-index: -1;
    }
    
    /* 滚动优化 */
    body {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
    
    /* 防止双击缩放 */
    * {
        touch-action: manipulation;
    }
    
    /* 选择文本优化 */
    .result-value {
         -webkit-user-select: text;
         -moz-user-select: text;
         -ms-user-select: text;
         user-select: text;
     }
     
     /* 优化移动端字体渲染 */
     body {
         -webkit-font-smoothing: antialiased;
         -moz-osx-font-smoothing: grayscale;
         text-rendering: optimizeLegibility;
     }
     
     /* 优化移动端滚动 */
     html {
         scroll-behavior: smooth;
     }
     
     /* 确保内容不会被虚拟键盘遮挡 */
     .main-interface {
         padding-bottom: env(keyboard-inset-height, 0px);
     }
     
     /* 优化移动端表单体验 */
     input[type="tel"] {
         -webkit-appearance: none;
         appearance: none;
     }
}

/* 加载和动画效果 */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 错误和成功消息 */
.error-message, .success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1000;
    animation: messageSlide 0.3s ease-out;
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
}

.success-message {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: var(--neon-green);
}

@keyframes messageSlide {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}