/* Official Document Font Stacks */
:root {
    --font-heiti: "SimHei", "STHeiti", "黑体", sans-serif;
    --font-kaiti: "KaiTi", "STKaiti", "楷体", "楷体_GB2312", serif;
    --font-fangsong: "FangSong", "STFangsong", "仿宋", "仿宋_GB2312", serif;
    --bg-color: #f0f2f5;
    --police-blue: #002c5f; /* Deep Police Blue */
    --accent-red: #cc0000; /* Red for Stamps/Warnings */
    --text-color: #1a1a1a;
    --border-color: #bfcbd9;
    --header-height: 60px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.8;
}

/* Full-page Watermark */
body::before {
    content: "内部资料 严禁外传 // INTERNAL USE ONLY";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    font-size: 40px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-30deg);
    white-space: pre;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 20px 20px; /* Space for fixed header */
}

/* System Header Bar */
.system-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background: #000;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    font-size: 12px;
    font-family: monospace;
    z-index: 1001;
}

.main-header {
    text-align: center;
    margin-bottom: 0;
    padding: 40px 20px;
    background: #fff;
    border: 2px solid var(--police-blue);
    border-bottom: 4px double var(--police-blue);
    position: relative;
}

/* CSS Official Emblem */
.official-emblem {
    width: 80px;
    height: 80px;
    background: #cc0000; /* National Red */
    border-radius: 50%;
    margin: 0 auto 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px double #FFD700; /* Gold Border */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.official-emblem .star {
    color: #FFD700; /* Gold Star */
    font-size: 50px;
    line-height: 1;
    margin-top: -5px; /* Visual adjustment */
    text-shadow: 0 2px 2px rgba(0,0,0,0.3);
}

/* Red-head Document Style for the Main Title - Level 1: Heiti */
.main-header h1 {
    color: var(--accent-red);
    font-family: var(--font-heiti);
    font-weight: 900;
    font-size: 2.8em;
    margin: 10px 0;
    letter-spacing: 2px;
}

.header-status {
    background: var(--police-blue);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    border-radius: 0;
}

/* System Action Toolbar */
.action-bar {
    background: #eef1f6; /* Light gray system background */
    border: 1px solid var(--police-blue);
    border-top: none;
    padding: 6px 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.85em;
    margin-bottom: 20px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.05);
}

.action-btn {
    cursor: not-allowed; /* Simulate restricted system */
    color: #333;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-kaiti); /* Level 2/Sub-ui elements usually Kaiti */
    font-weight: bold;
    transition: all 0.1s;
}

.action-btn:hover {
    background: #dfe6f0;
    border-color: #a0b3d6;
    color: #000;
}

.action-btn.active {
    background: #fff;
    border: 1px inset #ccc;
}

.separator {
    width: 1px;
    height: 18px;
    background: #ccc;
    margin: 0 5px;
}

/* The "File" Window */
.case-file-window {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 40px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    font-family: var(--font-fangsong); /* Main Content: FangSong */
}

/* Formal Content - Kaiti for Level 2/3 headers */
.case-file-window h1, .case-file-window h2 {
    font-family: var(--font-kaiti);
    color: var(--police-blue);
    border-bottom: 1px solid var(--police-blue);
    padding-bottom: 5px;
}

.case-file-window h3, .case-file-window h4 {
    font-family: var(--font-kaiti);
    color: var(--police-blue);
}

pre {
    background: #fafafa;
    padding: 20px;
    border: 1px dashed #ccc;
    font-family: var(--font-fangsong);
    font-size: 1.15em;
    color: #222;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Electronic Seal (Stamp) */
.stamp {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid var(--accent-red);
    border-radius: 50%;
    color: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    transform: rotate(-15deg);
    opacity: 0.8;
    user-select: none;
    pointer-events: none;
    text-transform: uppercase;
}
.stamp::after {
    content: "证据固定";
    text-align: center;
}
.stamp-top-right { top: 20px; right: 40px; }

/* Grid Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    background: #f9f9f9;
    border-left: 5px solid var(--police-blue);
    padding: 20px;
    transition: all 0.2s;
}
.card:hover {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card h3 { border: none; font-size: 1.1em; margin-top: 0; }
.card a { color: var(--police-blue); text-decoration: underline; }

.alert {
    border-left: 10px solid var(--accent-red);
    background: #fff0f0;
    padding: 15px;
    color: var(--accent-red);
}

/* Formal Table Style (Strict Grid) */
table {
    width: 100%;
    border-collapse: collapse;
    font-family: "SimSun", serif;
    font-size: 12px;
    margin-top: 20px;
    border: 1px solid #ccc;
}

table th {
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
}

table td {
    border: 1px solid #ccc;
    padding: 6px 12px;
    color: #333;
    background-color: #fff;
}

table tr:nth-child(even) td {
    background-color: #fafafa; /* Zebra stripe */
}

table tr:hover td {
    background-color: #f0f7ff; /* Highlight on hover */
}

/* Image Gallery Fixes */
.img-gallery img {
    height: 150px;
    object-fit: cover;
    border: 1px solid #ddd;
}

/* System Toast Notification */
.system-toast {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 2px solid var(--police-blue);
    padding: 15px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10000;
    font-family: "SimSun", serif;
    font-weight: bold;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 10px;
    min-width: 300px;
}

.system-toast.error {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.system-toast.success {
    border-color: #008000;
    color: #00529B;
}

.toast-icon {
    font-size: 1.5em;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 0.8em;
    border-top: 1px solid #ddd;
}


/* Image and Lightbox/Drawer styles remain mostly unchanged */
.img-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.img-gallery img {
    max-width: 100%;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    cursor: zoom-in;
}

.img-gallery img:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.lightbox-modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); justify-content: center; align-items: center; padding: 20px; box-sizing: border-box;
}
.lightbox-content {
    max-width: 90%; max-height: 90%; border: 2px solid var(--primary-blue); box-shadow: 0 0 30px var(--primary-blue); animation: zoomIn 0.3s ease-out;
}
.lightbox-close {
    position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer;
}
@keyframes zoomIn { from {transform: scale(0.8); opacity: 0;} to {transform: scale(1); opacity: 1;} }

.drawer-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 998; backdrop-filter: blur(2px); }
.drawer-container { position: fixed; top: 0; right: -60%; width: 60%; height: 100%; background-color: #fff; border-left: 2px solid var(--primary-blue); box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2); z-index: 999; transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; }
.drawer-header { padding: 15px; background-color: var(--header-blue); color: #fff; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--primary-blue); }
.drawer-title { font-weight: bold; font-size: 1em; }
.drawer-close { cursor: pointer; font-size: 1.2em; border: 1px solid #fff; padding: 2px 8px; }
.drawer-close:hover { background: #fff; color: var(--header-blue); }
.drawer-content { flex: 1; width: 100%; height: 100%; border: none; }
@media (max-width: 768px) { .drawer-container { width: 90%; right: -90%; } }
.drawer-open { right: 0 !important; }
