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

body {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    background: #fff;
    color: #000;
    padding: 10px;
}

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

.header {
    border: 1px solid #000;
    padding: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.header h1 {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 5px;
}

.header p {
    font-size: 10px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.block {
    border: 1px solid #000;
    padding: 8px;
    background: #fff;
    cursor: pointer;
    transition: background 0.1s;
}

.block:hover {
    background: #f0f0f0;
}

.block-title {
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.block-type {
    font-size: 9px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.block-content {
    font-size: 10px;
    line-height: 1.3;
    margin-bottom: 4px;
    white-space: pre-line;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.block-links {
    font-size: 9px;
    color: #666;
    border-top: 1px solid #ccc;
    padding-top: 4px;
    margin-top: 4px;
}

.block-links a {
    color: #000;
    text-decoration: underline;
    margin-right: 8px;
}

.block-links a:hover {
    background: #000;
    color: #fff;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #000;
    padding: 20px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 16px;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}

.modal-type {
    font-size: 10px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.modal-content-text {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 15px;
    white-space: pre-line;
    max-height: 300px;
    overflow-y: auto;
}

.modal-relationships {
    border-top: 1px solid #ccc;
    padding-top: 10px;
    margin-top: 10px;
}

.modal-relationships h4 {
    font-size: 10px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.modal-relationships a {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 5px;
    padding: 2px 4px;
    border: 1px solid #ccc;
    color: #000;
    text-decoration: none;
    font-size: 9px;
}

.modal-relationships a:hover {
    background: #000;
    color: #fff;
}

.media-links {
    border-top: 1px solid #ccc;
    padding-top: 10px;
    margin-top: 10px;
}

.media-links h4 {
    font-size: 10px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.media-item {
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

.media-item a {
    color: #000;
    text-decoration: underline;
    font-size: 10px;
}

.media-item .media-type {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 1px 4px;
    font-size: 8px;
    margin-right: 5px;
    text-transform: uppercase;
}

audio, video {
    width: 100%;
    max-width: 400px;
    margin-top: 5px;
}

.pdf-embed {
    width: 100%;
    height: 300px;
    border: 1px solid #ccc;
    margin-top: 5px;
}

.stats {
    border: 1px solid #000;
    padding: 10px;
    margin-top: 20px;
    font-size: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.stat-section h3 {
    font-size: 11px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

/* Block page view styles */
#blockView {
    display: none;
}

.block-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.block-type-page {
    font-size: 10px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.block-title-page {
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.block-tags-page {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.block-content-page {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 30px;
    white-space: pre-line;
}

.block-relationships-page h4 {
    font-size: 12px;
    margin-bottom: 10px;
    margin-top: 20px;
    text-transform: uppercase;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.related-blocks {
    margin-top: 20px;
}

.related-blocks a:hover {
    background: #000;
    color: #fff;
}
