/*
Theme Name: 溯源查询主题
Theme URI: 
Author: 红枫叶
Author URI: 
Description: 极简产品溯源查询主题，首页即查询页，扫码直达溯源结果。
Version: 2.0
License: GPLv2 or later
Text Domain: trace-query
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    color: #1a1a2e;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4ecf7 50%, #f0e8ff 100%);
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰光斑 */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -100px;
    right: -100px;
    animation: float1 8s ease-in-out infinite;
}

body::after {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: -150px;
    left: -150px;
    opacity: 0.3;
    animation: float2 10s ease-in-out infinite;
}

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

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

#traceCodeInput{width:90%; height:45px; padding:0px 10px;}
#traceQueryForm button{  height:35px; margin-top:10px;   min-width: 200px;display: inline-block; font-size: 1rem;    background:linear-gradient(243deg, #346dc3 0%, #344761 50%, #b7a2dd 100%);
    color: #fff;}
.trace-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.trace-container {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 36px 36px;
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: fadeInUp 0.6s ease-out;
}

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

.trace-header {
    text-align: center;
    margin-bottom: 36px;
}

.trace-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}

.trace-icon svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.trace-logo img {
    max-height: 56px;
    max-width: 200px;
}

.trace-title {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #1a1a2e 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.trace-desc {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.trace-search-box {
    margin-bottom: 28px; text-align:center;
}

/* 查询框 - 覆盖插件样式 */
.trace-search-box .wp-trace-query-box {
    border: none;
    padding: 0;
}

.trace-search-box .wp-trace-query-box h3 {
    display: none;
}

.trace-search-box .wp-trace-query-input {
    width: 100%;
    padding: 16px 18px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f9fafb;
    color: #1a1a2e;
}

.trace-search-box .wp-trace-query-input::placeholder {
    color: #9ca3af;
}

.trace-search-box .wp-trace-query-input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.trace-search-box .wp-trace-query-button {
    width: 100%;
    margin-top: 14px;
    padding: 15px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.trace-search-box .wp-trace-query-button::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.6s ease;
}

.trace-search-box .wp-trace-query-button:hover::before {
    left: 100%;
}

.trace-search-box .wp-trace-query-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.trace-search-box .wp-trace-query-button:active {
    transform: translateY(0);
}

.trace-search-box .wp-trace-query-results {
    margin-top: 16px;
}

.trace-search-box .wp-trace-query-item {
    padding: 12px 14px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trace-search-box .wp-trace-query-item:hover {
    background: #eef2ff;
    border-color: #667eea;
}

/* 分割线 + 提示文字 */
.trace-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.trace-divider::before,
.trace-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.trace-divider span {
    font-size: 12px;
    color: #9ca3af;
}

/* 功能入口 */
.trace-features {
    display: flex;
    justify-content: space-around;
    gap: 12px;
}

.trace-feature {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.trace-feature:hover {
    background: rgba(102, 126, 234, 0.06);
}

.trace-feature-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.trace-feature:nth-child(1) .trace-feature-icon {
    background: rgba(99, 102, 241, 0.1);
}

.trace-feature:nth-child(2) .trace-feature-icon {
    background: rgba(16, 185, 129, 0.1);
}

.trace-feature:nth-child(3) .trace-feature-icon {
    background: rgba(245, 158, 11, 0.1);
}

.trace-feature-label {
    font-size: 12px;
    color: #4b5563;
}

.trace-footer {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding-top: 24px;
    border-top: 1px solid rgba(229, 231, 235, 0.6);
}

@media (max-width: 480px) {
    .trace-container {
        padding: 36px 24px 28px;
        border-radius: 20px;
    }
    .trace-title {
        font-size: 22px;
    }
    .trace-icon {
        width: 56px;
        height: 56px;
    }
    .trace-icon svg {
        width: 28px;
        height: 28px;
    }
}
