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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 50px;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.card h2 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-footer {
    color: #667eea;
    font-weight: bold;
    text-align: right;
}

footer {
    text-align: center;
    color: white;
    padding: 20px 0;
    opacity: 0.8;
}

/* 二级页面样式 */
.page-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #667eea;
}

.page-header h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
}

.page-header .back-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    margin-bottom: 20px;
}

.page-header .back-btn:hover {
    background: #5568d3;
}

.input-section {
    margin-bottom: 30px;
}

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

.input-group label {
    display: block;
    color: #333;
    font-weight: bold;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.result-section {
    margin-top: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 5px;
    display: none;
}

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

.result-section h3 {
    color: #333;
    margin-bottom: 15px;
}

.result-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #667eea;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.error {
    color: #e74c3c;
    padding: 15px;
    background: #fee;
    border-radius: 5px;
    margin-top: 15px;
}

.success {
    color: #27ae60;
    padding: 15px;
    background: #efe;
    border-radius: 5px;
    margin-top: 15px;
}

/* 浮窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background: white;
    border-radius: 10px;
    width: 90%;
    height: 85%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow-y: auto; /* 添加垂直滚动条 */
}

.modal-container.fullscreen {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.modal-container.fullscreen .modal-header {
    border-radius: 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.modal-controls {
    display: flex;
    gap: 10px;
}

.modal-btn {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 5px;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-btn:hover {
    background: #e9ecef;
    color: #333;
}

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

.modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

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

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

/* 结果弹窗样式 */
.result-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.result-modal-overlay.show {
    display: flex;
}

.result-modal-container {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.result-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px 10px 0 0;
}

.result-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.3em;
    font-weight: 600;
}

.result-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.result-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.result-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.result-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.result-item:hover {
    background: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-item-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-item-title::before {
    content: '▸';
    font-size: 1.2em;
}

.result-item-content {
    color: #333;
    line-height: 1.8;
    font-size: 1em;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.result-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .result-modal-container {
        width: 95%;
        max-height: 90vh;
    }
    
    .result-modal-header {
        padding: 15px 20px;
    }
    
    .result-modal-body {
        padding: 20px;
    }
    
    .result-item {
        padding: 15px;
    }
}

/* 案件同步区域 */
.notice-sync {
    grid-column: 1 / -1;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
    margin-bottom: 10px;
}

.notice-sync h2 {
    margin: 0 0 16px;
    font-size: 1.6em;
    color: #2d3748;
}

.notice-sync-form {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.notice-sync-input {
    flex: 1 1 280px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s ease;
}

.notice-sync-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.notice-sync-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notice-sync-button:disabled {
    background: #cbd5f5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.notice-sync-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.25);
}

.notice-sync-message {
    margin-top: 16px;
    font-size: 0.95em;
    min-height: 1.2em;
}

.notice-sync-message.info {
    color: #4a5568;
}

.notice-sync-message.success {
    color: #2f855a;
}

.notice-sync-message.error {
    color: #e53e3e;
}

@media (max-width: 768px) {
    .notice-sync {
        padding: 20px;
    }

    .notice-sync-form {
        flex-direction: column;
    }

    .notice-sync-button {
        width: 100%;
    }
}
