:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #333;
    --light-bg: #f5f6fa;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

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

header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

header h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.search-bar {
    max-width: 600px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.search-bar input {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.controls select {
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.controls button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.directory-list {
    display: block;
}

.directory-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    margin-bottom: 1rem;
}

.directory-item.list-view {
    display: flex;
    align-items: center;
}

.directory-item.list-view i {
    margin-right: 1rem;
}

.directory-item.list-view h3 {
    flex-grow: 1;
}

.directory-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.directory-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.directory-item h3 {
    margin: 0;
    font-size: 0.9em;
    text-align: left;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    height: 2.4em; /* 2 lines * 1.2 line-height */
    padding: 0 0.5rem; /* Add some padding on the sides */
}

.meta-info {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #888;
}

.breadcrumb {
    padding: 1rem;
    background: white;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.logout-container {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.logout-button {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Text file modal styles */
.text-file-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    word-break: break-word;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.text-content {
    margin: 0;
    padding: 1.5rem;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f8f9fa;
    border: none;
    max-width: 120ch; /* Accommodate 120 characters as requested */
    overflow-x: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0 0 10px 10px;
    border-top: 1px solid #dee2e6;
}

.modal-footer button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.download-btn {
    background-color: var(--accent-color);
    color: white;
}

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

.close-btn {
    background-color: #6c757d;
    color: white;
}

.close-btn:hover {
    background-color: #5a6268;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90%;
    }
    
    .text-content {
        font-size: 12px;
        padding: 1rem;
    }
    
    .modal-header, .modal-footer {
        padding: 0.75rem;
    }
} 