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

:root {
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background: #f3f4f6;
    --card-background: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #ffffff;
}

.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(30, 64, 175, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.02) 0%, transparent 60%);
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.02);
    animation: float 20s infinite;
}

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

.circle-2 {
    width: 300px;
    height: 300px;
    top: 50%;
    right: -5%;
    animation-delay: 7s;
}

.circle-3 {
    width: 350px;
    height: 350px;
    bottom: -10%;
    left: 40%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) translateX(30px) scale(1.1);
        opacity: 0.6;
    }
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-primary);
    animation: fadeIn 0.8s ease-out;
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.25));
    animation: float-icon 3s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes float-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    margin: 0;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 主卡片 */
.main-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
    transition: var(--transition);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.main-card::before {
    content: '';
    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;
}

.main-card:hover::before {
    left: 100%;
}

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

.main-card:hover {
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* 搜索区域 */
.search-section {
    margin-bottom: 30px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    pointer-events: none;
}

.idcard-input {
    width: 100%;
    padding: 20px 60px 20px 60px;
    font-size: 1.15rem;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.idcard-input:focus {
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.12),
        0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.idcard-input.error {
    border-color: var(--error-color);
    box-shadow: 
        0 0 0 4px rgba(239, 68, 68, 0.12),
        0 4px 12px rgba(239, 68, 68, 0.15);
    animation: shake 0.4s ease-in-out;
}

.idcard-input.success {
    border-color: var(--success-color);
    box-shadow: 
        0 0 0 4px rgba(16, 185, 129, 0.12),
        0 4px 12px rgba(16, 185, 129, 0.15);
}

.clear-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.clear-btn:hover {
    color: var(--error-color);
    transform: translateY(-50%) scale(1.1);
}

.clear-btn svg {
    width: 20px;
    height: 20px;
}

.input-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-left: 10px;
    min-height: 20px;
}

.input-hint.error {
    color: var(--error-color);
}

.input-hint.success {
    color: var(--success-color);
}

.search-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    box-shadow: 
        0 10px 30px -5px rgba(59, 130, 246, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-btn:hover::before {
    width: 300px;
    height: 300px;
}

.search-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 20px 40px -10px rgba(59, 130, 246, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.search-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

.btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    width: 24px;
    height: 24px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 60px;
    animation: fadeIn 0.3s ease-in;
}

.loading p {
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid transparent;
    border-top-color: #3b82f6;
    border-right-color: #1e40af;
    border-radius: 50%;
    margin: 0 auto 25px;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    position: relative;
}

.spinner::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-bottom-color: #06b6d4;
    border-left-color: #0891b2;
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 结果展示 */
.result-section {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid transparent;
    background: linear-gradient(90deg, #e5e7eb, transparent) bottom/100% 2px no-repeat;
    position: relative;
}

.result-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    animation: expandLine 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

@keyframes expandLine {
    to {
        width: 30%;
    }
}

.result-icon {
    width: 36px;
    height: 36px;
    color: var(--success-color);
    filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.3));
    animation: check 0.6s ease-out;
}

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

.result-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.result-item {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 25px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: 14px;
}

.result-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 15px 35px -5px rgba(59, 130, 246, 0.2),
        0 0 0 1px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

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

.result-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.result-label svg {
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.result-value {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-word;
    position: relative;
    z-index: 1;
}

/* 错误提示 */
.error-section {
    text-align: center;
    padding: 50px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}

.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    color: var(--error-color);
    animation: bounce 0.6s ease-in-out;
}

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

.error-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.3));
}

.error-message {
    color: var(--error-color);
    font-size: 1.15rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}


/* 功能说明卡片 */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 
        0 20px 40px -12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    animation-fill-mode: forwards;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.info-card:hover::before {
    opacity: 1;
}

.info-card:nth-child(1) {
    animation-delay: 0.1s;
}

.info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.info-card:nth-child(3) {
    animation-delay: 0.3s;
}

.info-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.info-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 
        0 10px 30px -5px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
    position: relative;
}

.info-icon::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.5;
    filter: blur(10px);
    z-index: -1;
}

.info-card:hover .info-icon {
    transform: scale(1.15) rotate(360deg);
    box-shadow: 
        0 15px 40px -5px rgba(0, 0, 0, 0.4),
        inset 0 0 40px rgba(255, 255, 255, 0.3);
}

.info-icon svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    border-radius: 2px;
}

.footer p {
    letter-spacing: 0.3px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .header-title {
        flex-direction: column;
        gap: 15px;
    }

    .logo-icon {
        width: 70px;
        height: 70px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .main-card {
        padding: 25px 20px;
    }

    .idcard-input {
        font-size: 1rem;
        padding: 15px 50px 15px 50px;
        letter-spacing: 1px;
    }

    .search-btn {
        font-size: 1rem;
        padding: 15px;
    }

    .result-content {
        grid-template-columns: 1fr;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .circle {
        display: none;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .main-card {
        padding: 20px 15px;
    }

    .history-card {
        padding: 20px 15px;
    }
}

/* 打印样式 */
@media print {
    .background-animation,
    .search-section,
    .history-card,
    .info-cards,
    .footer {
        display: none;
    }

    .main-card {
        box-shadow: none;
    }
}

