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

body { 
    font-family: Arial, sans-serif; 
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    border-right: 1px solid #ccc;
    padding: 20px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

#search {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.result-item {
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
}

.result-item:hover {
    background-color: #e0e0e0;
}

.selected {
    background-color: #007bff;
    color: white;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.article-title {
    font-size: 24px;
}

.article-links {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.article-link {
    color: #007bff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-link:hover {
    text-decoration: underline;
}

.button {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.button:hover {
    background: #0056b3;
}

.article-content {
    line-height: 1.6;
    margin-bottom: 20px;
}

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

.image-gallery img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

#editor {
    width: 100%;
    min-height: 200px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.edit-buttons {
    display: flex;
    gap: 10px;
}

.new-article {
    margin-top: auto;
    padding-top: 20px;
}

.relationships-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.relationship-type {
    margin-bottom: 10px;
}

.relationship-link {
    color: #007bff;
    text-decoration: none;
}

.relationship-link:hover {
    text-decoration: underline;
}

.relationship-select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}.relationships-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.relationship-type {
    margin-bottom: 15px;
}

.relationship-type-title {
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
}

.relationship-link {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 5px;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.relationship-link:hover {
    background: #dee2e6;
    text-decoration: underline;
}

.instance-list {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.instance-list-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.instance-item {
    padding: 8px;
    margin-bottom: 4px;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.instance-item:hover {
    background: #e9ecef;
}

.relationship-edit-section {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.relationship-select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.result-section {
    padding: 8px;
    font-size: 0.9em;
    color: #666;
    background: #f5f5f5;
    margin-top: 10px;
    margin-bottom: 4px;
}

.result-preview {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

.result-preview strong {
    color: #000;
    background: #fff3cd;
}

.properties-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.property-entry {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.property-key, .property-value {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.property-key {
    width: 30%;
}

.property-value {
    width: 60%;
}

.property-item {
    margin-bottom: 8px;
    line-height: 1.5;
}

.property-item .property-key {
    font-weight: bold;
    color: #555;
}

.property-item .property-value {
    margin-left: 8px;
}

.property-value {
    flex: 2;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 2.5em;
}

.property-entry {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: start;
}

/* Add to existing CSS */

.quotes-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.quotes-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.quote-display {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}



.quote-voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.vote-button {
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.vote-button:hover {
    color: #007bff;
}

.vote-count {
    font-weight: bold;
    color: #333;
}


.quote-content {
    flex: 1;
}

.quote-text {

    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-left: 50px;
    margin-bottom: 8px;
}

.quote-source {
    color: #666;

    margin-left: 50px;
    font-style: italic;
}

.quote-entry {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: start;
}

.quote-entry .quote-text {
    flex: 2;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.quote-entry .quote-source {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}



.quotes-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.quotes-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.quote-display {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quote-voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.vote-button {
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    transition: color 0.2s;
}

.vote-button:hover {
    color: #007bff;
}

.vote-count {
    font-weight: bold;
    color: #333;
}

.quote-content {
    flex: 1;
}

.quote-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 8px;
    white-space: pre-wrap;
    font-family: inherit;
}

.quote-source {
    color: #666;
    font-style: italic;
}

.quote-entry {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: start;
}

.quote-entry .quote-text {
    flex: 2;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.quote-entry .quote-source {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.triangle {
  font-family: system-ui, -apple-system, sans-serif;
}




.vote-button {
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-button:hover {
    color: #007bff;
    transform: scale(1.1);
}

.vote-button:active {
    transform: scale(0.95);
}

.vote-button:focus {
    outline: 2px solid #007bff;
    border-radius: 4px;
}

.vote-button .triangle {
    display: block;
    line-height: 1;
}

.vote-count {
    font-weight: bold;
    color: #333;
    min-width: 20px;
    text-align: center;
}

.quote-voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px;
}




.filter-section {
    margin-bottom: 20px;
}

.filter-dropdown {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.instance-stats {
    background: white;
    border-radius: 4px;
    padding: 10px;
    font-size: 0.9em;
}

.stats-header {
    font-weight: bold;
    margin-bottom: 8px;
    color: #666;
}

.stat-bar {
    margin-bottom: 8px;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    font-size: 0.85em;
    color: #666;
}

.stat-bar-outer {
    width: 100%;
    height: 6px;
    background-color: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-inner {
    height: 100%;
    background-color: #007bff;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.stat-count {
    font-size: 0.8em;
    color: #666;
    text-align: right;
    margin-top: 2px;
}
