@font-face {
    font-family: 'SourceSans3';
    src: url('SourceSans3-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'SourceSans3';
    src: url('SourceSans3-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SourceSans3', sans-serif;
    font-weight: 400;
    background-color: #ebebeb;
    color: #000000;
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    background-color: #ebebeb;
    border-bottom: 2px solid #000000;
    z-index: 1000;
}

.nav-link {
    font-family: 'SourceSans3', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #000000;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 0.6;
}

/* Layout */
.layout {
    display: flex;
    height: 100vh;
    padding-top: 70px;
}

/* Board Section (Main) */
.board-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 2px solid #000000;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid #000000;
    background-color: #ebebeb;
}

.section-title {
    font-family: 'SourceSans3', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.controls {
    display: flex;
    gap: 1rem;
}

.refresh-btn {
    font-family: 'SourceSans3', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    background-color: #000000;
    color: #ebebeb;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.3s ease;
}

.refresh-btn:hover {
    opacity: 0.8;
}

/* Drawings Grid */
.drawings-grid {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    align-content: start;
}

.drawing-card {
    background-color: #ffffff;
    border: 2px solid #000000;
    transition: transform 0.3s ease;
}

.drawing-card:hover {
    transform: translateY(-4px);
}

.drawing-image {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.drawing-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-footer {
    padding: 1rem;
    border-top: 2px solid #000000;
    font-family: 'SourceSans3', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Text Sidebar */
.text-sidebar {
    width: 380px;
    display: flex;
    flex-direction: column;
    background-color: #ebebeb;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 1.5rem;
    border-bottom: 2px solid #000000;
    background-color: #ebebeb;
}

.sidebar-title {
    font-family: 'SourceSans3', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-header .refresh-btn {
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
}

/* Text Feed */
.text-feed {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-card {
    background-color: #ffffff;
    border: 2px solid #000000;
    transition: transform 0.2s ease;
}

.text-card:hover {
    transform: translateX(-4px);
}

.text-content {
    padding: 1.5rem;
    min-height: 80px;
}

.text-content p {
    font-family: 'SourceSans3', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.text-footer {
    padding: 0.75rem 1.5rem;
    border-top: 2px solid #000000;
    font-family: 'SourceSans3', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Scrollbar Styling */
.drawings-grid::-webkit-scrollbar,
.text-feed::-webkit-scrollbar {
    width: 12px;
}

.drawings-grid::-webkit-scrollbar-track,
.text-feed::-webkit-scrollbar-track {
    background: #ebebeb;
}

.drawings-grid::-webkit-scrollbar-thumb,
.text-feed::-webkit-scrollbar-thumb {
    background: #000000;
    border: 2px solid #ebebeb;
}

.drawings-grid::-webkit-scrollbar-thumb:hover,
.text-feed::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

/* Loading and Empty States */
.loading-state,
.empty-state,
.sidebar-loading,
.sidebar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    font-family: 'SourceSans3', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    opacity: 0.7;
    text-align: center;
}

.sidebar-loading,
.sidebar-empty {
    flex: 1;
    padding: 2rem 1.5rem;
}

/* Timestamp */
.timestamp {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 1200px) {
    .text-sidebar {
        width: 320px;
    }
    
    .drawings-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    .drawing-image {
        height: 240px;
    }
}

@media (max-width: 968px) {
    .layout {
        flex-direction: column;
    }
    
    .board-section {
        border-right: none;
        border-bottom: 2px solid #000000;
        height: 60%;
    }
    
    .text-sidebar {
        width: 100%;
        height: 40%;
    }
    
    .section-header,
    .sidebar-header {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .sidebar-title {
        font-size: 1.2rem;
    }
    
    .drawings-grid {
        padding: 1.5rem;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .text-feed {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .nav {
        padding: 1rem 1.5rem;
    }
    
    .layout {
        padding-top: 60px;
    }
    
    .section-header,
    .sidebar-header {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .sidebar-title {
        font-size: 1rem;
    }
    
    .drawings-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .drawing-image {
        height: 200px;
    }
    
    .refresh-btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
    
    .sidebar-header .refresh-btn {
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
    }
}