/* ===== 全局变量 - 绿色主题 ===== */
:root {
    --primary: #009241;
    /* 主色调 绿 */
    --primary-dark: #007a37;
    /* 深绿 */
    --primary-light: #2bb86b;
    /* 亮绿/鲜绿 */
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --text-dark: #333;
    --text-light: #fff;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --light-color: rgba(255, 255, 255, 0.1);
    --transition-speed: 0.4s;
    --sunlight-color: rgba(255, 255, 255, 0.1);
    --success-green: #4CAF50;
    --success-green-dark: #388E3C;
    --processing-blue: #2bb86b;
    /* 处理中统一用亮绿色，贴合主题 */
    --processing-blue-dark: #009241;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #0f2a1a 0%, #1f543a 50%, #0f2a1a 100%);
    /* background: url('images/bg.jpg') no-repeat center center fixed; */
    background-size: cover;
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 背景光效 - 绿意光晕 */
.light-effect {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

.light-blue {
    background: var(--primary);
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation: float 20s infinite ease-in-out;
    opacity: 0.45;
}

.light-orange {
    background: var(--primary-light);
    width: 250px;
    height: 250px;
    bottom: 10%;
    right: 5%;
    animation: float 25s infinite ease-in-out reverse;
    opacity: 0.45;
}

/* 阳光光影效果 - 调整为绿色氛围 */
.sunlight {
    position: fixed;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 80%,
            rgba(43, 184, 107, 0.2) 0%,
            rgba(0, 146, 65, 0.12) 20%,
            transparent 40%);
    top: -50%;
    left: -50%;
    animation: sunlight-move 30s infinite linear alternate;
    z-index: 0;
    pointer-events: none;
}

.sunlight-2 {
    position: fixed;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 80% 20%,
            rgba(0, 146, 65, 0.18) 0%,
            rgba(43, 184, 107, 0.08) 15%,
            transparent 35%);
    top: -50%;
    left: -50%;
    animation: sunlight-move-reverse 35s infinite linear alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes sunlight-move {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(5%, 5%) rotate(5deg);
    }
}

@keyframes sunlight-move-reverse {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-5%, -5%) rotate(-5deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, 50px) scale(1.1);
    }

    50% {
        transform: translate(0, 100px) scale(1);
    }

    75% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 头部样式 */
header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 凹凸拟态感logo - 绿色主题 */
.logo-placeholder {
    width: 80px;
    height: 80px;
    /* background: linear-gradient(135deg, var(--primary), var(--primary-dark)); */
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 2px 2px 5px rgba(0, 0, 0, 0.2),
        inset -2px -2px 5px rgba(255, 255, 255, 0.1),
        10px 10px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    padding: 5px;
}

.logo-placeholder img {
    width: 100%;
    object-fit: contain;
}

.logo-placeholder:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 2px 2px 5px rgba(0, 0, 0, 0.2),
        inset -2px -2px 5px rgba(255, 255, 255, 0.15),
        15px 15px 30px rgba(0, 0, 0, 0.4);
}

.logo-placeholder::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 标题渐变：绿→亮绿 */
.title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 1px rgba(0, 146, 65, 0.4);
}

.subtitle {
    font-size: 15.5px;
    opacity: 0.9;
    margin-top: 5px;
    font-weight: 300;
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* 查询卡片 - 增强凹凸拟态感 */
.query-card {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.08),
            rgba(0, 0, 0, 0.08));
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow:
        20px 20px 40px rgba(0, 0, 0, 0.3),
        inset 5px 5px 10px rgba(255, 255, 255, 0.05),
        inset -5px -5px 10px rgba(0, 0, 0, 0.1);
    padding: 50px 40px;
    width: 100%;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.query-card:hover {
    transform: translateY(-5px);
    box-shadow:
        25px 25px 50px rgba(0, 0, 0, 0.4),
        inset 5px 5px 10px rgba(255, 255, 255, 0.08),
        inset -5px -5px 10px rgba(0, 0, 0, 0.15);
}

.query-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.card-title {
    text-align: center;
    font-size: 26px;
    margin-bottom: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.card-title i {
    color: var(--primary);
}

.input-group {
    margin-bottom: 30px;
    position: relative;
}

.input-label {
    display: block;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-icon {
    position: absolute;
    left: 20px;
    color: var(--primary-light);
    font-size: 22px;
    z-index: 2;
}

#traceCode {
    width: 100%;
    padding: 22px 25px 22px 65px;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.1),
            rgba(0, 0, 0, 0.05));
    border: 2px solid transparent;
    border-radius: 15px;
    font-size: 18px;
    color: white;
    transition: all var(--transition-speed) ease;
    backdrop-filter: blur(5px);
    box-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.2),
        inset -3px -3px 6px rgba(255, 255, 255, 0.05);
}

#traceCode:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(0, 146, 65, 0.25),
        inset 3px 3px 6px rgba(0, 0, 0, 0.2),
        inset -3px -3px 6px rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.15),
            rgba(0, 0, 0, 0.08));
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.input-hint i {
    color: var(--primary-light);
}

.btn-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* 主查询按钮 - 绿色主题 */
#queryBtn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all var(--transition-speed) ease;
    box-shadow:
        0 10px 30px rgba(0, 146, 65, 0.4),
        inset 3px 3px 6px rgba(255, 255, 255, 0.1),
        inset -3px -3px 6px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 180px;
    min-height: 60px;
}

#queryBtn:hover:not(.loading):not(.success):not(.processing) {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-3px);
    box-shadow:
        0 15px 35px rgba(0, 146, 65, 0.6),
        inset 3px 3px 6px rgba(255, 255, 255, 0.15),
        inset -3px -3px 6px rgba(0, 0, 0, 0.15);
}

#queryBtn:active:not(.loading):not(.success):not(.processing) {
    transform: translateY(0);
}

/* 查询中状态 - 使用亮绿色系 */
#queryBtn.processing {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    cursor: not-allowed;
    box-shadow:
        0 10px 30px rgba(43, 184, 107, 0.5),
        inset 3px 3px 6px rgba(255, 255, 255, 0.1),
        inset -3px -3px 6px rgba(0, 0, 0, 0.2);
}

#queryBtn.processing .btn-text {
    display: none;
}

#queryBtn.processing .processing-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 查询成功状态 */
#queryBtn.success {
    background: linear-gradient(135deg, var(--success-green), var(--success-green-dark));
    cursor: not-allowed;
    box-shadow:
        0 10px 30px rgba(76, 175, 80, 0.4),
        inset 3px 3px 6px rgba(255, 255, 255, 0.1),
        inset -3px -3px 6px rgba(0, 0, 0, 0.2);
}

#queryBtn.success .btn-text {
    display: none;
}

#queryBtn.success .success-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 加载动画 */
.processing-content {
    display: none;
}

.processing-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.processing-text {
    font-size: 18px;
    font-weight: 600;
}

.success-content {
    display: none;
}

.success-icon {
    font-size: 24px;
    animation: successScale 0.5s ease-out;
}

.success-text {
    font-size: 18px;
    font-weight: 600;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes successScale {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#queryBtn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    animation: shine 3s infinite linear;
}

/* 页脚 */
footer {
    margin-top: 60px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .logo-container {
        flex-direction: column;
        gap: 15px;
    }

    .title {
        font-size: 24px;
    }

    .card-title {
        font-size: 22px;
    }

    #traceCode {
        padding: 18px 20px 18px 55px;
        font-size: 16px;
    }

    .input-icon {
        left: 15px;
        font-size: 20px;
    }

    #queryBtn {
        padding: 18px 40px;
        font-size: 18px;
        min-width: 160px;
        min-height: 56px;
    }

    .processing-text,
    .success-text {
        font-size: 16px;
    }

    .light-blue,
    .light-orange {
        display: none;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 20px;
    }

    .card-title {
        font-size: 20px;
    }

    .query-card {
        padding: 25px 15px;
    }

    #traceCode {
        padding: 16px 15px 16px 50px;
    }

    #queryBtn {
        padding: 16px 30px;
        font-size: 16px;
        min-width: 140px;
        min-height: 52px;
    }

    .processing-text,
    .success-text {
        font-size: 14px;
    }

    .processing-spinner {
        width: 20px;
        height: 20px;
        border-width: 2px;
    }

    .success-icon {
        font-size: 20px;
    }
}

/* 错误提示 */
.error-message {
    color: #ff6b6b;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
    display: none;
    padding: 12px 20px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 10px;
    border-left: 4px solid #ff6b6b;
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* 脉冲动画 - 绿色脉冲 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 146, 65, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 146, 65, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 146, 65, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 通知组件 */
.notification {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px 30px;
    border-radius: 20px;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.2),
        0 8px 25px rgba(0, 146, 65, 0.25);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    transform: translateX(150%) scale(0.9) rotateY(-90deg);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 450px;
    border: 1px solid rgba(0, 146, 65, 0.2);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.notification.show {
    transform: translateX(0) scale(1) rotateY(0);
}

.notification-success {
    border-left: 6px solid var(--success-green);
}

.notification-processing {
    border-left: 6px solid var(--primary-light);
}

.notification-icon {
    color: var(--success-green);
    font-size: 2rem;
    flex-shrink: 0;
    text-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
}

.notification-icon.processing {
    color: var(--primary-light);
    text-shadow: 0 2px 5px rgba(43, 184, 107, 0.4);
    animation: pulse 1.5s infinite;
}

/* 状态进度指示器 */
.status-indicator {
    display: none;
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    border-left: 4px solid transparent;
    animation: fadeIn 0.5s ease;
}

.status-indicator.show {
    display: block;
}

.status-indicator.processing {
    border-left-color: var(--primary-light);
}

.status-indicator.success {
    border-left-color: var(--success-green);
}

.status-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.status-icon {
    font-size: 20px;
}

.status-description {
    font-size: 15px;
    opacity: 0.9;
    margin-left: 32px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}