@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600&display=swap');

:root {
    --bg-primary: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0d0d0d 100%);
    --bg-secondary: #161616;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.05);
    --accent-gold: #c9a962;
    --accent-gold-light: #d4b87a;
    --accent-gold-dark: #a68a4a;
    --accent-bronze: #b87333;
    --text-primary: #f5f0e8;
    --text-secondary: #c4b8a8;
    --text-muted: #8a8070;
    --border-gold: rgba(201, 169, 98, 0.3);
    --border-light: rgba(255, 255, 255, 0.08);
    --shadow-gold: 0 0 30px rgba(201, 169, 98, 0.1);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-display: 'Playfair Display', 'Noto Serif SC', serif;
    --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    margin: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(201, 169, 98, 0.06) 0%, transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(184, 115, 51, 0.04) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(201, 169, 98, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.bg-texture {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 720px;
    position: relative;
    z-index: 1;
}

.main-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card), var(--shadow-gold);
    overflow: hidden;
    border: 1px solid var(--border-gold);
}

.card-header {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.1) 0%, rgba(184, 115, 51, 0.05) 100%);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-gold);
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.header-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-bronze) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(201, 169, 98, 0.3);
    position: relative;
    z-index: 1;
}

.header-icon svg {
    color: #1a1a1a;
    width: 28px;
    height: 28px;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 4px;
    letter-spacing: 2px;
}

.header-content .subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
}

.warning-banner {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.1) 0%, rgba(184, 115, 51, 0.08) 100%);
    padding: 20px 24px;
    margin: 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid rgba(201, 169, 98, 0.2);
}

.warning-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--accent-gold);
    margin-top: 2px;
}

.warning-icon svg {
    width: 22px;
    height: 22px;
}

.warning-text {
    flex: 1;
    min-width: 0;
}

.warning-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.warning-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.warning-list li {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 5px;
    padding-left: 14px;
    position: relative;
}

.warning-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-size: 14px;
}

.warning-list li:last-child {
    margin-bottom: 0;
}

.news-scrollbar {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.08) 0%, rgba(184, 115, 51, 0.05) 100%);
    padding: 12px 24px;
    margin: 0 24px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(201, 169, 98, 0.15);
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
}

.news-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-right: 16px;
    border-right: 1px solid rgba(201, 169, 98, 0.2);
}

.news-icon {
    color: var(--accent-gold);
    width: 14px;
    height: 14px;
}

.news-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 0.5px;
}

.news-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.news-track {
    display: flex;
    animation: scrollNews 12s linear infinite;
}

.news-track:hover {
    animation-play-state: paused;
}

/* 删除重复的newsScroll动画定义，保留scrollNews即可 */

.news-item {
    flex-shrink: 0;
    margin-right: 30px;
}

.news-item:last-child {
    margin-right: 0;
}

.news-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.news-link:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

@keyframes scrollNews {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.news-track {
    display: flex;
    align-items: center;
}

.form-section,
.query-section {
    padding: 0 32px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-gold);
    letter-spacing: 1px;
}

.section-icon {
    color: var(--accent-gold);
    width: 20px;
    height: 20px;
}

.query-hint {
    font-size: 11px;
    font-weight: 500;
    color: #c9a962;
    margin-left: auto;
    background: rgba(201, 169, 98, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(201, 169, 98, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
}

.label-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.required-mark {
    color: var(--accent-gold);
    font-weight: 600;
    margin-left: 3px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.15), 0 0 20px rgba(201, 169, 98, 0.1);
}

.form-select {
    cursor: pointer;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23c9a962' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    appearance: none;
    -webkit-appearance: none;
}

.form-select option {
    background: #1a1a1a;
    color: var(--text-primary);
    padding: 8px 12px;
}

.date-input {
    cursor: pointer;
    color-scheme: dark;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-family: var(--font-body);
}

.submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-bronze) 100%);
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(201, 169, 98, 0.4);
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(201, 169, 98, 0.5);
}

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

.submit-btn:disabled {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 26, 26, 0.3);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.message-box {
    margin-top: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: left;
    display: none;
    border: 1px solid;
}

.message-box.show {
    display: block;
}

.message-box.success {
    background: rgba(46, 125, 50, 0.1);
    color: #81c784;
    border-color: rgba(46, 125, 50, 0.3);
}

.message-box.error {
    background: rgba(198, 40, 40, 0.1);
    color: #ef9a9a;
    border-color: rgba(198, 40, 40, 0.3);
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border-gold) 50%, transparent 100%);
    margin: 32px 0;
}

.divider::after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: var(--accent-gold);
    border-radius: 50%;
    margin: -6px auto 0;
    box-shadow: 0 0 10px rgba(201, 169, 98, 0.5);
}

.query-form {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}

.query-input-wrapper {
    flex: 1;
    position: relative;
}

.query-input {
    width: 100%;
    padding: 14px 16px 14px 40px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.query-input::placeholder {
    color: var(--text-muted);
}

.query-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.15), 0 0 20px rgba(201, 169, 98, 0.1);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-gold);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.query-btn {
    padding: 14px 24px;
    background: rgba(201, 169, 98, 0.15);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.query-btn:hover {
    background: rgba(201, 169, 98, 0.25);
    box-shadow: 0 0 20px rgba(201, 169, 98, 0.2);
}

.query-btn:disabled {
    background: rgba(100, 100, 100, 0.1);
    border-color: #666666;
    color: #666666;
    cursor: not-allowed;
}

.query-result {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: left;
    margin-bottom: 20px;
    display: none;
    border: 1px solid;
}

.query-result.show {
    display: block;
}

.query-result.success {
    background: rgba(46, 125, 50, 0.1);
    color: #81c784;
    border-color: rgba(46, 125, 50, 0.3);
}

.query-result.error {
    background: rgba(198, 40, 40, 0.1);
    color: #ef9a9a;
    border-color: rgba(198, 40, 40, 0.3);
}

.query-result.info {
    background: rgba(2, 119, 189, 0.1);
    color: #90caf9;
    border-color: rgba(2, 119, 189, 0.3);
}

.records-container {
    display: none;
}

.records-container.show {
    display: block;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.record-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.record-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-gold);
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.record-index {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 1px;
}

.record-time {
    font-size: 12px;
    color: var(--text-muted);
}

.record-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.record-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.record-row .label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.record-row .value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 400;
    word-break: break-word;
}

.record-row .value.status-success {
    color: #81c784;
    font-weight: 500;
}

.record-row .value.status-error {
    color: #ef9a9a;
    font-weight: 500;
}

.record-row .value.status-info {
    color: #90caf9;
    font-weight: 500;
}

.record-row .value.status-warning {
    color: var(--accent-gold);
    font-weight: 500;
}

.footer {
    padding: 24px 32px;
    text-align: center;
    border-top: 1px solid var(--border-gold);
    margin-top: 24px;
    background: rgba(201, 169, 98, 0.03);
}

.footer p {
    font-size: 12px;
    color: var(--text-muted);
}

.footer .copyright {
    font-weight: 500;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    body {
        padding: 0;
        background: #0d0d0d;
    }

    .bg-texture {
        display: none;
    }

    .container {
        max-width: 100%;
    }

    .main-card {
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-bottom: 1px solid var(--border-gold);
    }

    .card-header {
        padding: 24px 20px;
    }

    .header-icon {
        width: 48px;
        height: 48px;
    }

    .header-icon svg {
        width: 24px;
        height: 24px;
    }

    .header-content h1 {
        font-size: 20px;
    }

    .header-content .subtitle {
        font-size: 11px;
    }

    .warning-banner {
        margin: 12px 16px;
        padding: 14px 16px;
        background: linear-gradient(135deg, rgba(201, 169, 98, 0.1) 0%, rgba(184, 115, 51, 0.06) 100%);
        border-radius: var(--radius-sm);
        border: 1px solid rgba(201, 169, 98, 0.2);
        box-shadow: none;
        gap: 12px;
        align-items: flex-start;
    }

    .news-scrollbar {
        margin: 0 16px 16px;
        padding: 10px 14px;
        gap: 12px;
    }

    .news-header {
        padding-right: 12px;
    }

    .news-label {
        font-size: 11px;
    }

    .news-link {
        font-size: 12px;
    }

    .warning-icon {
        width: 22px;
        height: 22px;
        background: linear-gradient(135deg, rgba(201, 169, 98, 0.15) 0%, rgba(184, 115, 51, 0.1) 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: 0;
    }

    .warning-icon svg {
        width: 12px;
        height: 12px;
    }

    .warning-title {
        font-size: 12px;
        font-weight: 600;
        color: var(--accent-gold);
        margin-bottom: 6px;
        letter-spacing: 0.3px;
    }

    .warning-list li {
        font-size: 11px;
        color: var(--text-secondary);
        line-height: 1.6;
        margin-bottom: 4px;
        padding-left: 12px;
        position: relative;
        text-indent: 0;
    }

    .warning-list li::before {
        content: '•';
        position: absolute;
        left: 0;
        top: 2px;
        color: var(--accent-gold);
        font-size: 10px;
        font-weight: 600;
        line-height: 1;
    }

    .form-section,
    .query-section {
        padding: 0 16px;
    }

    .section-title {
        font-size: 15px;
    }

    .query-hint {
        font-size: 10px;
        padding: 3px 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-label {
        margin-bottom: 7px;
    }

    .label-text {
        font-size: 12px;
    }

    .form-input,
    .form-select {
        padding: 14px 14px;
        font-size: 16px;
    }

    .date-input {
        padding: 14px 14px;
        font-size: 16px;
        box-sizing: border-box;
        max-width: 100%;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-sm);
        background: rgba(255, 255, 255, 0.03);
        color: var(--text-primary);
        font-family: var(--font-body);
        text-align: left;
    }

    .submit-btn {
        padding: 15px 16px;
        font-size: 15px;
    }

    .message-box {
        padding: 12px 14px;
    }

    .divider {
        margin: 24px 0;
    }

    .query-form {
        flex-direction: column;
        gap: 12px;
    }

    .query-input {
        padding: 14px 14px 14px 40px;
        font-size: 16px;
    }

    .input-icon {
        left: 14px;
    }

    .query-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 16px;
    }

    .query-result {
        padding: 14px 16px;
    }

    .record-item {
        padding: 16px;
    }

    .record-header {
        flex-direction: row;
        gap: 8px;
    }

    .record-index {
        font-size: 13px;
    }

    .record-time {
        font-size: 11px;
    }

    .record-body {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .record-row .label {
        font-size: 10px;
    }

    .record-row .value {
        font-size: 13px;
    }

    .footer {
        padding: 20px;
    }

    .footer p {
        font-size: 11px;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 3px;
}

::selection {
    background: rgba(201, 169, 98, 0.3);
    color: var(--text-primary);
}
