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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --error-color: #ef4444;
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 0;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }
}

/* 主内容区域 */
.main-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    box-shadow: var(--shadow-xl);
    overflow-x: hidden;
    overflow-y: visible;
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .main-content {
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .main-content {
        border-radius: 16px;
    }
}

/* 顶部区域（标题+查询） */
.top-section {
    padding: 60px 50px 50px;
    text-align: center;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .top-section {
        padding: 30px 25px 25px;
    }
}

@media (max-width: 480px) {
    .top-section {
        padding: 20px 20px 20px;
    }
}

.title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    line-height: 1.2;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .title {
        font-size: 28px;
        margin-bottom: 8px;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 24px;
        margin-bottom: 6px;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 12px;
        margin-bottom: 15px;
    }
}

/* 查询区域 */
.search-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

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

@media (max-width: 768px) {
    .input-group {
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .input-group {
        margin-bottom: 10px;
    }
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-align: left;
}

.required {
    color: var(--error-color);
    font-weight: 600;
}

.input-wrapper {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    font-weight: 400;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .search-input {
        padding: 12px 16px;
        font-size: 14px;
    }
}

.search-input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), var(--shadow-md);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
}

.search-btn {
    width: 100%;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

@media (max-width: 480px) {
    .search-btn {
        padding: 12px 32px;
        font-size: 14px;
        margin-top: 6px;
    }
}

.search-btn::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;
}

.search-btn:hover:not(:disabled)::before {
    left: 100%;
}

.search-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.search-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

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

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.error-msg {
    color: var(--error-color);
    font-size: 15px;
    padding: 14px 20px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--error-color);
    animation: shake 0.5s ease;
    text-align: left;
    font-weight: 500;
}

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

/* PDF显示区域 */
.pdf-section {
    background: rgba(248, 250, 252, 0.5);
    margin: 0 auto;
    padding: 0;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pdf-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pdf-viewer {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    border: none;
    background: #f5f5f5;
    display: block;
    transition: opacity 0.3s ease;
}

.pdf-viewer[src=""] {
    opacity: 0;
}

.pdf-viewer:not([src=""]) {
    opacity: 1;
}

/* PDF.js 容器样式（移动端） */
.pdf-canvas-container {
    width: 100%;
    background: #f5f5f5;
    padding: 10px 5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.pdf-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: var(--shadow-sm);
}

.pdf-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.pdf-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pdf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-info {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 60px;
    text-align: center;
}

.pdf-canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    background: white;
    /* 保持图像质量，避免变形 */
    image-rendering: auto;
    object-fit: contain;
    /* 移除多余的空白 */
    vertical-align: top;
}

/* PDF占位符 */
.pdf-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px 20px;
    text-align: center;
    background: transparent;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    visibility: visible !important;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 768px) {
    .pdf-placeholder {
        min-height: 200px;
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .pdf-placeholder {
        min-height: 150px;
        padding: 15px 10px;
    }
}

.placeholder-icon {
    display: block !important;
    margin: 0 auto 24px;
    width: 180px !important;
    height: auto !important;
    max-width: 100%;
    max-height: 280px;
    aspect-ratio: 375 / 812;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box;
    object-fit: contain;
}

@media (max-width: 768px) {
    .placeholder-icon {
        display: block !important;
        margin: 0 auto 15px;
        width: 140px !important;
        height: auto !important;
        max-width: 100%;
        max-height: 200px;
        aspect-ratio: 375 / 812;
        box-sizing: border-box;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .placeholder-icon {
        display: block !important;
        margin: 0 auto 10px;
        width: 120px !important;
        height: auto !important;
        max-width: 100%;
        max-height: 170px;
        aspect-ratio: 375 / 812;
        box-sizing: border-box;
        object-fit: contain;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

.placeholder-text {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) scale(1);
    }
    50% { 
        transform: translateY(-15px) scale(1.05);
    }
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .container {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 0;
        max-width: 100%;
        width: 100%;
        margin: 0;
    }
    
    .main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-radius: 16px;
        margin: 15px 10px;
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        box-sizing: border-box;
    }
    
    .top-section {
        flex-shrink: 0;
        padding: 20px 15px 15px;
    }
    
    .title {
        font-size: 24px;
        margin-bottom: 6px;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .input-group {
        margin-bottom: 10px;
    }
    
    .input-label {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .search-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 10px 24px;
        font-size: 14px;
        margin-top: 5px;
    }
    
    .pdf-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 0;
        margin: 0 auto;
        padding: 0;
        width: 100%;
        max-width: 100%;
        position: relative;
        box-sizing: border-box;
    }
    
    .pdf-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 0;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .pdf-placeholder {
        flex: 1;
        min-height: 200px;
        padding: 15px 10px;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        visibility: visible;
        box-sizing: border-box;
        overflow: visible;
    }
    
    .placeholder-icon {
        display: block !important;
        margin: 0 auto 8px;
        width: 120px !important;
        height: auto !important;
        max-width: 100%;
        max-height: 170px;
        aspect-ratio: 375 / 812;
        visibility: visible !important;
        opacity: 1 !important;
        box-sizing: border-box;
        object-fit: contain;
    }
    
    .footer {
        flex-shrink: 0;
        padding: 10px 5px;
        margin-top: 10px;
    }
    
    .footer-text {
        font-size: 11px;
    }
    
    .pdf-viewer {
        height: auto;
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .container {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 0;
        max-width: 100%;
        width: 100%;
        margin: 0;
    }
    
    .main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-radius: 12px;
        margin: 10px 5px;
        width: calc(100vw - 10px);
        max-width: calc(100vw - 10px);
        box-sizing: border-box;
    }
    
    .top-section {
        flex-shrink: 0;
        padding: 15px 10px 10px;
    }
    
    .title {
        font-size: 20px;
        margin-bottom: 4px;
        letter-spacing: 1.5px;
    }
    
    .subtitle {
        font-size: 11px;
        margin-bottom: 12px;
    }
    
    .input-group {
        margin-bottom: 8px;
    }
    
    .input-label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .search-input {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .search-btn {
        padding: 8px 20px;
        font-size: 13px;
        margin-top: 4px;
    }
    
    .pdf-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 0;
        margin: 0 auto;
        padding: 0;
        width: 100%;
        max-width: 100%;
        position: relative;
        box-sizing: border-box;
    }
    
    .pdf-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 0;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .pdf-placeholder {
        flex: 1;
        min-height: 150px;
        padding: 10px 5px;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        visibility: visible;
        box-sizing: border-box;
        overflow: visible;
    }
    
    .placeholder-icon {
        display: block !important;
        margin: 0 auto 6px;
        width: 120px !important;
        height: auto !important;
        max-width: 100%;
        max-height: 170px;
        aspect-ratio: 375 / 812;
        visibility: visible !important;
        opacity: 1 !important;
        box-sizing: border-box;
        object-fit: contain;
    }
    
    .pdf-canvas-container {
        padding: 10px 5px;
    }
    
    .footer {
        flex-shrink: 0;
        padding: 8px 5px;
        margin-top: 8px;
    }
    
    .footer-text {
        font-size: 10px;
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .search-input {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .input-label {
        font-size: 12px;
    }

    .search-btn {
        font-size: 15px;
        padding: 14px 28px;
    }

    .placeholder-icon {
        display: block !important;
        margin: 0 auto;
        width: 140px !important;
        height: auto !important;
        max-width: 100%;
        max-height: 200px;
        aspect-ratio: 375 / 812;
        box-sizing: border-box;
        object-fit: contain;
    }

    .placeholder-text {
        font-size: 16px;
    }
}

/* 底部信息 */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-text {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

@media (max-width: 768px) {
    .footer {
        padding: 20px 15px;
        margin-top: 20px;
    }
    
    .footer-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 15px 10px;
        margin-top: 15px;
    }
    
    .footer-text {
        font-size: 12px;
    }
}

/* 响应式 - 底部信息 */
@media (max-width: 768px) {
    .footer {
        padding: 25px 15px;
        margin-top: 30px;
    }
    
    .footer-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 20px 10px;
        margin-top: 20px;
    }
    
    .footer-text {
        font-size: 13px;
    }
}

/* 悬浮留言按钮样式 */
.message-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: floatAnimation 3s ease-in-out infinite;
}

.message-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.message-float-btn:active {
    transform: scale(0.95);
}

.float-btn-icon {
    font-size: 28px;
    color: white;
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .message-float-btn {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }
    
    .float-btn-icon {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .message-float-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .float-btn-icon {
        font-size: 22px;
    }
}

/* 留言弹窗样式 */
.message-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.message-modal.show {
    display: flex;
}

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

.message-modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

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

.message-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 10;
    border-radius: 16px 16px 0 0;
}

.message-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.message-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
}

.message-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.message-modal-body {
    padding: 24px;
}

.message-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.success-msg {
    margin-top: 15px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    border-radius: 8px;
    color: var(--success-color);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 768px) {
    .message-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .message-modal-header {
        padding: 18px 20px;
    }
    
    .message-modal-body {
        padding: 20px;
    }
    
    .message-modal-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .message-modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }
    
    .message-modal-header {
        padding: 16px 18px;
    }
    
    .message-modal-body {
        padding: 18px;
    }
    
    .message-textarea {
        min-height: 100px;
    }
}
