/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background: #f0f8ff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: linear-gradient(120deg, #e0f7fa 0%, #bbdefb 100%);
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(to right, #1e5799, #2989d8);
    border-radius: 12px;
    color: white;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    border: 1px solid #0d4a8a;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

h1 {
    font-size: 36px;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

.description {
    font-size: 17px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
}

.app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 35px;
}

.form-container {
    flex: 1;
    min-width: 320px;
    background: white;
    padding: 28px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    border: 1px solid #d0e3f0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.form-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, #2980b9, #2c3e50);
}

.preview-container {
    flex: 1;
    min-width: 320px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #d0e3f0;
}

h2 {
    text-align: center;
    margin-bottom: 22px;
    color: #1a5276;
    padding-bottom: 12px;
    border-bottom: 2px solid #2e86c1;
    font-size: 26px;
    position: relative;
}

h2::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #3498db;
    border-radius: 2px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 15px;
    padding-left: 5px;
    border-left: 3px solid #3498db;
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1e0ed;
    border-radius: 6px;
    font-size: 16px;
    background: #f9fbfd;
    transition: all 0.3s;
}

input:focus, select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #2980b9, #2c3e50);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

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

.btn::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.1);
    transform: rotate(30deg);
    transition: all 0.5s;
}

.btn:hover::after {
    transform: rotate(30deg) translate(20%, 20%);
}

.btn-download {
    background: linear-gradient(to right, #27ae60, #219653);
}

.btn-history {
    background: linear-gradient(to right, #9b59b6, #8e44ad);
}

#report {
    width: 100%;
    background: white;
    padding: 35px;
    border: 1px solid #c9d7e3;
    position: relative;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.report-header {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 15px 0 25px;
    color: #000;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.report-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin: 20px 0 15px;
    color: #000;
    position: relative;
    letter-spacing: 2px;
}

.report-title::after {
    content: "";
    display: block;
    width: 120px;
    height: 3px;
    background: #000;
    margin: 12px auto 20px;
    border-radius: 2px;
}

.report-number {
    text-align: center;
    font-size: 17px;
    margin-bottom: 25px;
    font-weight: bold;
    color: #2c3e50;
}

.report-info {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0 25px;
    font-size: 15px;
    table-layout: fixed;
}

.report-info td {
    border: 1px solid #000;
    padding: 10px 12px;
    height: 42px;
    vertical-align: middle;
    text-align: center;
}

.report-info td:first-child {
    width: 20%;
    background: #f0f7ff;
    font-weight: bold;
    text-align: center;
}

.report-section {
    margin: 30px 0 20px;
    position: relative;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
    table-layout: fixed;
}

.report-table th, .report-table td {
    border: 1px solid #000;
    padding: 12px;
    text-align: center;
    height: 45px;
    vertical-align: middle;
}

.report-table th {
    background: #f0f7ff;
    font-weight: bold;
}

.note {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    font-size: 15px;
    color: #27ae60;
    border: 1px solid #c8e6c9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 420px;
    color: #7f8c8d;
    font-style: italic;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    width: 100%;
    text-align: center;
    padding: 25px;
    background: #f9f9f9;
}

.preview-placeholder i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 15px;
}

.preview-title {
    margin-top: 18px;
    text-align: center;
    color: #2980b9;
    font-weight: bold;
    font-size: 17px;
}

footer {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 15px;
    border-top: 1px solid #d6e4f0;
    width: 100%;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
}

.report-image {
    max-width: 100%;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border: 1px solid #d0e0ed;
    border-radius: 5px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    display: none;
    border: 1px solid #c3e6cb;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.inspection-seal-container {
    position: absolute;
    top: 150px;
    right: 50%;
    transform: translateX(50%) translateY(-50%);
    z-index: 100;
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.85;
}

.inspection-seal {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.3));
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-upload input {
    flex: 1;
}

.upload-btn {
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.upload-btn:hover {
    background: #2980b9;
}

.form-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    overflow-y: auto;
    max-height: 65vh;
    padding-right: 5px;
    margin-bottom: 10px;
}

.form-columns::-webkit-scrollbar {
    width: 6px;
}

.form-columns::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.form-columns::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

.form-column {
    flex: 1;
    min-width: 300px;
}

.history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: auto;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #e74c3c;
}

.history-list {
    margin-top: 20px;
}

.history-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    background: #edf7ff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.history-item h3 {
    color: #2980b9;
    margin-bottom: 8px;
    font-size: 18px;
}

.history-item p {
    color: #555;
    font-size: 14px;
    margin: 3px 0;
}

.history-date {
    font-weight: bold;
    color: #27ae60;
}

.history-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.history-btn {
    padding: 8px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.history-btn:hover {
    background: #2980b9;
}

.history-btn.delete {
    background: #e74c3c;
}

.history-btn.delete:hover {
    background: #c0392b;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .form-container, .preview-container {
        width: 100%;
    }
    
    .report-title {
        font-size: 24px;
    }
    
    .inspection-seal-container {
        width: 100px;
        height: 100px;
        top: 130px;
    }
    
    .form-column {
        min-width: 100%;
    }
    
    .history-modal .modal-content {
        width: 95%;
        padding: 15px;
    }
}