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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d1b2a 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    padding: 30px;
}

h1 {
    color: #0d1b2a;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #444;
    margin-bottom: 30px;
    font-size: 14px;
}

.stats {
    display: none;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 15px;
    background: #e8e8e8;
    border-radius: 8px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #0d1b2a;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.tree {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    color: #333;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: pointer;
    user-select: none;
    color: #0d1b2a;
    font-weight: bold;
}

.tree-toggle:hover {
    color: #1a3a52;
}

.tree-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.folder-icon {
    color: #ffa500;
}

.file-icon {
    color: #666;
}

.pdf-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
}

.txt-badge {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
}

.file-link {
    color: #0d1b2a;
    text-decoration: none;
    cursor: pointer;
    word-break: break-word;
}

.file-link:hover {
    text-decoration: underline;
    color: #1a3a52;
}

.folder {
    margin-left: 20px;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.folder.collapsed {
    max-height: 0;
}

.folder-name {
    font-weight: bold;
    color: #333;
}

.contribute-btn {
    display: inline-block;
    margin: 15px 0;
    padding: 6px 16px;
    background: #0d1b2a;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.3s;
}

.contribute-btn:hover {
    background: #1a3a52;
    text-decoration: none;
}

.view-mode-btn {
    display: inline-block;
    margin: 15px 0 15px 10px;
    padding: 6px 16px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.3s;
}

.view-mode-btn:hover {
    background: #764ba2;
    text-decoration: none;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .tree {
        font-size: 12px;
    }
    
    .tree-content {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .file-link {
        flex: 1;
        min-width: 0;
    }
    
    .pdf-badge,
    .txt-badge {
        margin-left: 0;
        flex-shrink: 0;
    }
    
    .contribute-btn {
        font-size: 12px;
        padding: 5px 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .tree {
        font-size: 13px;
    }
    
    .folder {
        margin-left: 10px;
    }
    
    body {
        padding: 10px;
    }
    
    .contribute-btn {
        font-size: 11px;
        padding: 5px 12px;
        display: block;
        text-align: center;
    }
}
